grouper / flatuikit Goto Github PK
View Code? Open in Web Editor NEWA collection of awesome flat UI components for iOS.
License: MIT License
A collection of awesome flat UI components for iOS.
License: MIT License
The custom FUISwitch
is not the exact equivalent of using UISwitch
since it will send the UIControlEventValueChanged
even when setting on
by hand.
The regular UISwitch
sends the event just when tapped or panned, while the FUISwitch
sends it also when programmatically set.
Navbar buttons, segmented controls, popovers. Even the example breaks on iOS 7. I obviously can't say too much. But, this obviously needs to be fixed.
Is there any plan for supoort UIPickerView?
Thanks.
If you call setTitleEdgeInsets on an FUIButton, the new insets are lost when the button is clicked.
In FUIButton.m it appears that titleEdgeInsets is saved to "defaultEdgeInsets" when instantiated. "defaultEdgeInsets" is then later used in "setShadowHeight" to reset titleEdgeInsets. So, any changes to titleEdgeInsets made after instantiation are potentially lost and overwritten by default values later.
I have the below code and i am able to see the appropriate theme assigned to the table, and selecting a cell in the table is triggering the didSelectRowAtIndexPath correctly but however it is not triggering a segue automatically (I am using this is a master view of a split view controller) and in the original tableView usage the seque was triggered..
I worked around it by manually calling performSegueWithIdentifier from the didSelectRowAtIndexPath method so it worked out ok (I am fairly new to ios programming so not sure if this is expected way or an issue )
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" ];
cell = [UITableViewCell configureFlatCellWithColor:[UIColor greenSeaColor]
selectedColor:[UIColor cloudsColor]
style:UITableViewCellStyleSubtitle
reuseIdentifier:@"Cell"
];
cell.cornerRadius = 5.0f; // optional
cell.separatorHeight = 2.0f; // optional
//When i originally used the regular tableView i used the tableView dequeueReusableCellWithIdentifier:forIndexPath: though.
Am I under the correct view that this will not work with iOS 5? Is there any chance iOS 5 computability can be implemented?
I can not find how to set the switch to OFF ?
The FUIAlertView is hidden by the modal view controller.
Checking if FUISwitch.on or [FUISwitch isOn] returns an incorrect value.
Hi,
I found that FUIAlertView doesn't show after [view dismissModalViewControllerAnimated:YES]
,so I looked into show
method and found that topController
still be view
after it dismissed.
I thought it's a bug since the UIAlertView
works just fine.
Drop-in replacement for UIPickerView would be great.
I call the following, as stated in the readme
[self.navigationController.navigationBar configureFlatNavigationBarWithColor:[UIColor clearColor]];
But an exception is raised on line 15 of UINavigationBar+FlatUI.m
[self setBackgroundImage:[UIImage imageWithColor:color cornerRadius:0]
forBarMetrics:UIBarMetricsDefault & UIBarMetricsLandscapePhone];
+[UIImage imageWithColor:cornerRadius:]: unrecognized selector sent to class 0xdd5c54
Is this an error with FlatUIKit?
How do I fix this?
I checked in the debugger, and my navigationBar does exist
You have this comment in UIBarButtonItem+FlatUI.h
// removes the text shadows off a single bar button item (sadly, this can't be easily done for all buttons simultaneously)
...but it is possible with...
[[UIBarButtonItem appearance] setTitleTextAttributes:@{ UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake(0, 0)]} forState:UIControlStateNormal];
Non integer values may be set as some result isn't divided. This causes blurry text on alert view on non-retina devises.
First of you did awesome work here!
But to improve the flat look I would suggest to remove drop/inner shadow from navigation buttons or navigation titles. With all the flat font colors this doesn't look very flat to me.
Ömer
Hi, When I use Storyboard, I can't make a connection between an Button in Interface Builder and FUIButton. But If I change FUIButton to UIButton, I am able to wire them. However, the app crashes and the warning is it can't find the selectors which are in FUIButton class. Would you let me know what I have done wrong? I did play around the demo project, it was OK when using xib.
UIFont+FlatUI.m only explicity uses the following fonts:
However these font files all go unused (in the Resources directory):
I'm loving this look so far. However I can't change the color of a specific uibarbuttonitem. There doesn't seem to be a way to do this. Any ideas?
I have my navigation buttons (which are fine with the current class methods) but I also had a camera scanning button to a navigationbar that stis below the default navigation bar. Is there any way I can change that specific buttons color?
Files:
FUICellBackgroundView.h
FUICellBackgroundView.m
UITableViewCell+FlatUI.h
UITableViewCell+FlatUI.m
are missing when I add FlatUIKit as a pod (pod 'FlatUIKit').
in FlatUIKitExample, UIPopoverController+FlatUI.h location is "Absolute Path" at present.
remap file to "Relative to Group" did fix this issue.
I found a bug when I created FUIButton with these details
FUIButton *theLoginButton = [[FUIButton alloc] initWithFrame:CGRectMake(200, 400, 100, 40)];
self.loginButton = theLoginButton;
[self.loginButton setTitle:@"Login" forState:UIControlStateNormal];
self.loginButton.buttonColor = [UIColor peterRiverColor];
self.loginButton.cornerRadius = 3.0f;
self.loginButton.titleLabel.font = [UIFont boldFlatFontOfSize:16];
[self.loginButton setHighlighted: NO];
[self.loginButton setTitleColor:[UIColor cloudsColor] forState:UIControlStateNormal];
[self.view addSubview:self.loginButton];
In output, I found a different color shadow outside the edge of corners.
Buttons are fine with press animation, but I wanted only flat buttons without animation.
Thanks,
Neetin
Dragging or tapping a FUISwitch crashes the app when it calls
[blendedColorWithForegroundColor:(UIColor *)foregroundColor
backgroundColor:(UIColor *)backgroundColor
percentBlend:(CGFloat) percentBlend]
Debugger gives:
"-[__NSCFArray getWhite:alpha:]: unrecognized selector sent to instance. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFArray getWhite:alpha:]: unrecognized selector sent to instance 0x1fdad9c0'"
Is UISearchBar supported at all?
Thanks a lot!
Hi,
On IOS7 button have a white fill on hightlighted state.
Not so ugly but it must be report here.
It appears that when using FUIAlertView, the button index returned in alertView:clickedButtonAtIndex: is numbered the other way up to UIAlertView.
Where the cancel button used to come out as button 0, for example, it is now button 1 (when two buttons are defined)
Can this be made to work the same way around, so the code can more easily be dropped into existing projects?
From current example didn't touch anything
2013-08-14 22:04:02.487 FlatUIKitExample[548:c07] *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2380.17/UITableView.m:5471
2013-08-14 22:04:02.490 FlatUIKitExample[548:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
*** First throw call stack:
(0x13cf012 0x11f4e7e 0x13cee78 0xc8a665 0x1eec1b 0x18340c 0x1eea7b 0x1f3919 0x1f39cf 0x1dc1bb 0x1ecb4b 0x1892dd 0x12086b0 0x2da0fc0 0x2d9533c 0x2d95150 0x2d130bc 0x2d14227 0x2d148e2 0x1397afe 0x1397a3d 0x13757c2 0x1374f44 0x1374e1b 0x184b7e3 0x184b668 0x138ffc 0x1d4d 0x1c75)
libc++abi.dylib: terminate called throwing an exception
No one got this error? only me?
When use this framework (nice work!) with cocoapos for some reason 4 files aren't downloaded.
UITableViewCell+FlatUI.h / .m
FUICellBackgroundView.h / .m
After having presented a modal UINavigationController on top of a FUISegmentedControl, dismissing the view controller results in a quick resizing of the FUISegmentedControl. It becomes vertically compressed, and resizes back to its normal size after about half a second.
Hey,
Using the following:
FUIAlertView *alert = [[FUIAlertView alloc] initWithTitle:@"Lorem Ipsum" message:@"Dolor sit amet" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Continue", nil]; [alert show];
If you rotate the device when the UIAlertView is still on screen, the overlay and the alert itself is not resized.
I'm trying to create a tableview that segue's to a new view controller when the cells are pressed. When I use the dequeueReusableCellWithIdentifier method, it works fine, but when I use a FlatUiKit table view cell the cell highlights, but the new scene isn't pushed. I'm going to investigate further.
UISegmentedControl+FlatUI.h the file not found
It would be really cool to have a bottom tab bar styled like Flat UI.
I have another case where I actually need to remove the button styling? Is there an easy way to accomplish this?
I noticed that when UITableViewCell comes from [tableView dequeueReusableCellWithIdentifier:forIndexPath:] instead of [tableView dequeueReusableCellWithIdentifier:] (which is used in your code example), the configuration [UITableViewCell configureFlatCellWithColor:selectedColor:style:reuseIdentifier:] will fail. It appears as nothing happened. However, if I use the latter dequeue method, it works properly.
Is that a tiny bug or it is designed this way? I am a little bit confused.
FUISegmentedControl not included in pod v1.0. When using cocoapods, the FUISegmentedControl.h/.m files are not included in v1.0.
I have tried several technics to avoid the resize of a FUIButton on iPad, with no success.
UIImage resizableImageWithCapInsets:resizingMode: method doesn't help, when creating the background images.
For the past 3 hours, I have been miserably failing in implementing this beautiful library.
Using storyboards, I create an FUIButton,
@Property (weak, nonatomic) IBOutlet FUIButton *randomProxyButton;
However, FUIButton does not come up in the list. I hit connect, and make the outlet. Xcode then recognizes FUIButton as it turns the type of the object to turquoise.
At the top, I import the following:
But, when I attempt to set an attribute via:
self.randomProxyButton.buttonColor = [UIColor turquoiseColor];
I run, and the application crashes, yielding the following error:
[UIRoundedRectButton setButtonColor:]: unrecognized selector sent to instance 0xfd36d30
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIRoundedRectButton setButtonColor:]: unrecognized selector sent to instance 0xfd36d30'
If anyone has some insight as to what may be wrong, that would be greatly appreciated.
Thank you so much.
Hi and great kit! :)
There is a way to add textfield on the FUIAlertView?
like:
UIAlertViewStyleSecureTextInput,
UIAlertViewStylePlainTextInput,
UIAlertViewStyleLoginAndPasswordInput.
The current pod 1.0 contains an older version of the FlatUIKit.
The addButtonWithTitle: method should not add a button when the title is nil. Because when i'm customizing a FUIAlertView , a blank button will always show at index of 0, just because i'm passing nil to cancle title.
thx
Happy to take a look at implementing this?
Hey Guys,
Love FlatUIKit! I was wondering if there are any plans to add a flat UIActionSheet component? If not, I'd love to try my hand at adding one if you think it would be a good addition.
Thanks!
Kyle
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.