lbrndnr / lbactionsheet Goto Github PK
View Code? Open in Web Editor NEWA very customizable drop-in replacement for UIActionSheet
Home Page: http://laurinbrandner.ch
A very customizable drop-in replacement for UIActionSheet
Home Page: http://laurinbrandner.ch
It seems like
-(NSUInteger)cancelButtonIndex {
__block NSUInteger index = NSNotFound;
[self.controls enumerateObjectsUsingBlock:^(UIButton* obj, NSUInteger idx, BOOL *stop) {
if (obj.tag == LBActionSheetCancelButtonType) {
index = idx;
*stop = YES;
}
}];
return index;
}
does not always return the right index (NSNotFound
instead.). For example if one initializes the actionsheet passing NULL
for cancelButtonTitle
no button with type LBActionSheetCancelButtonType
is created since setting cancelButtonIndex
is just done via a default setter.
Or am I missing something?
Otherwise a good class, thank you.
Hi,
I know it's been a while since the last update, however I still find this library useable for the most part :)
However, I'm getting some warnings....
LBActionSheet/LBActionSheet.m:613:41: 'UITextAttributeFont' is deprecated: first deprecated in iOS 7.0 - Use NSFontAttributeName
LBActionSheet/LBActionSheet.m:614:38: 'UITextAttributeTextColor' is deprecated: first deprecated in iOS 7.0 - Use NSForegroundColorAttributeName
LBActionSheet/LBActionSheet.m:615:44: 'UITextAttributeTextShadowColor' is deprecated: first deprecated in iOS 7.0 - Use NSShadowAttributeName with an NSShadow instance as the value
LBActionSheet/LBActionSheet.m:616:60: 'UITextAttributeTextShadowOffset' is deprecated: first deprecated in iOS 7.0 - Use NSShadowAttributeName with an NSShadow instance as the value
Here's the code they refer to...
-(void)_button:(UIButton *)button setTitleAttributes:(NSDictionary *)attributes forState:(UIControlState)state {
button.titleLabel.font = attributes[UITextAttributeFont];
[button setTitleColor:attributes[UITextAttributeTextColor] forState:state];
[button setTitleShadowColor:attributes[UITextAttributeTextShadowColor] forState:state];
button.titleLabel.shadowOffset = [(NSValue*)attributes[UITextAttributeTextShadowOffset]
CGSizeValue];
}
I was looking for a replacement for the uialertview with three buttons, ok, forgot and cancel, be nice to see a screenshot with more buttons and a uitextfield, maybe example code showing how to access the text value too.
Does not work that well. Text shadows does not work. Needs to make display darken also so it points out like standard UIActionSheet
i tried :
[sheet buttonAtIndex:0].titleLabel.textAlignment = NSTextAlignmentLeft;
without success..
Regardless which parameter is set for showInView, the ActionSheet is displayed in the main view.
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.