├── .DS_Store ├── .gitignore ├── .idea ├── .name ├── PPiAwesomeButton.iml ├── encodings.xml ├── misc.xml ├── modules.xml ├── scopes │ └── scope_settings.xml ├── vcs.xml └── workspace.xml ├── .travis.yml ├── Control ├── .DS_Store ├── FontAwesome+iOS.podspec ├── UIAwesomeButton.h ├── UIAwesomeButton.m ├── UIButton+PPiAwesome.h └── UIButton+PPiAwesome.m ├── LICENSE ├── PPiAwesomeButton-Demo ├── .gitignore ├── .idea │ ├── .name │ ├── PPiAwesomeButton-Demo.iml │ ├── encodings.xml │ ├── misc.xml │ ├── modules.xml │ ├── runConfigurations │ │ └── PPiAwesomeButton_Demo.xml │ ├── scopes │ │ └── scope_settings.xml │ ├── vcs.xml │ ├── workspace.xml │ └── xcode.xml ├── PPiAwesomeButton-Demo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── pepibumur.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── PPiAwesomeButton-Demo.xcscheme │ └── xcuserdata │ │ ├── Isaac.xcuserdatad │ │ └── xcschemes │ │ │ ├── PPiAwesomeButton-Demo.xcscheme │ │ │ └── xcschememanagement.plist │ │ └── pepibumur.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── PPiAwesomeButton-Demo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ ├── Isaac.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── pepibumur.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── xcdebugger │ │ ├── Breakpoints.xcbkptlist │ │ └── Breakpoints_v2.xcbkptlist ├── PPiAwesomeButton-Demo │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── LaunchScreen.xib │ ├── PPiAwesomeButton-Demo-Info.plist │ ├── PPiAwesomeButton-Demo-Prefix.pch │ ├── Resources │ │ ├── bell.png │ │ └── bell@2x.png │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ └── MainStoryboard.storyboard │ └── main.m ├── Podfile ├── Podfile.lock └── Pods │ ├── FontAwesome+iOS │ ├── FAImageView.h │ ├── FAImageView.m │ ├── NSString+FontAwesome.h │ ├── NSString+FontAwesome.m │ ├── README.md │ ├── Resources │ │ └── FontAwesome.ttf │ ├── UIFont+FontAwesome.h │ └── UIFont+FontAwesome.m │ ├── Local Podspecs │ └── FontAwesome+iOS.podspec │ ├── Manifest.lock │ └── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ ├── Isaac.xcuserdatad │ └── xcschemes │ │ ├── Pods-FontAwesome+iOS.xcscheme │ │ ├── Pods.xcscheme │ │ └── xcschememanagement.plist │ └── pepibumur.xcuserdatad │ └── xcschemes │ ├── Pods-FontAwesome+iOS.xcscheme │ ├── Pods.xcscheme │ └── xcschememanagement.plist ├── PPiAwesomeButton.podspec └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.ipa 19 | *.xcuserstate 20 | 21 | # CocoaPods 22 | # 23 | # We recommend against adding the Pods directory to your .gitignore. However 24 | # you should judge for yourself, the pros and cons are mentioned at: 25 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 26 | # 27 | Pods/ 28 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | PPiAwesomeButton -------------------------------------------------------------------------------- /.idea/PPiAwesomeButton.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 30 | 33 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 1395698570002 83 | 1395698570002 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 112 | 113 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | xcode_sdk: iphonesimulator 3 | rvm: 1.9.3 4 | 5 | before_install: 6 | - cd PPiAwesomeButton-Demo 7 | - gem install --no-rdoc --no-ri cocoapods 8 | - gem install --no-rdoc --no-ri pr-changelog xcpretty 9 | - pod install 10 | script: 11 | - xctool -workspace PPiAwesomeButton-Demo.xcworkspace -scheme PPiAwesomeButton-Demo build -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO 12 | -------------------------------------------------------------------------------- /Control/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/Control/.DS_Store -------------------------------------------------------------------------------- /Control/FontAwesome+iOS.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "FontAwesome+iOS" 3 | s.version = "0.0.1" 4 | s.summary = "Category that makes FontAwesome even easier for iOS." 5 | s.homepage = "https://github.com/alexdrone/ios-fontawesome" 6 | s.license = { 7 | :type => 'Private', 8 | :text => <<-LICENSE 9 | This project uses the FontAwesome fix made by Pit Garbe that you can find at https://github.com/leberwurstsaft/FontAwesome-for-iOS Version 2.0 of the Font Awesome font, CSS, and LESS files are licensed under CC BY 3.0: http://creativecommons.org/licenses/by/3.0/ A mention of 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable source code is considered acceptable attribution (most common on the web). If human readable source code is not available to the end user, a mention in an 'About' or 'Credits' screen is considered acceptable (most common in desktop or mobile software) 10 | LICENSE 11 | } 12 | s.author = { "Alex Usbergo" => "alexakadrone@gmail.com" } 13 | s.source = { :git => "https://github.com/alexdrone/ios-fontawesome.git", :commit => "3b1521af4d40e69d4ebb0547e0eae1a4713dedb6" } 14 | s.platform = :ios, '5.0' 15 | s.source_files = '*.{h,m}' 16 | s.exclude_files = 'Demo' 17 | s.resources = "Resources/*.ttf" 18 | s.frameworks = 'UIKit', 'Foundation', 'CoreGraphics' 19 | s.requires_arc = true 20 | end 21 | -------------------------------------------------------------------------------- /Control/UIAwesomeButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIAwesomeButton.h 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendia on 30/12/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSString+FontAwesome.h" 11 | #import "UIButton+PPiAwesome.h" 12 | 13 | typedef void (^block)(); 14 | @interface UIAwesomeButton : UIControl 15 | 16 | @property (nonatomic) IconPosition iconPosition; 17 | @property (nonatomic, strong) NSDictionary *textAttributes; 18 | @property (copy) void (^actionBlock)(UIAwesomeButton *button); 19 | 20 | // Initializers 21 | + (UIAwesomeButton*)buttonWithType:(UIButtonType)type 22 | text:(NSString *)text 23 | icon:(NSString *)icon 24 | attributes:(NSDictionary *)attributes 25 | andIconPosition:(IconPosition)position; 26 | 27 | + (UIAwesomeButton*)buttonWithType:(UIButtonType)type 28 | text:(NSString *)text 29 | iconImage:(UIImage *)icon 30 | attributes:(NSDictionary *)attributes 31 | andIconPosition:(IconPosition)position; 32 | 33 | - (id)initWithFrame:(CGRect)frame 34 | text:(NSString *)text 35 | icon:(NSString *)icon 36 | attributes:(NSDictionary *)attributes 37 | andIconPosition:(IconPosition)position; 38 | 39 | - (id)initWithFrame:(CGRect)frame 40 | text:(NSString *)text 41 | iconImage:(UIImage *)icon 42 | attributes:(NSDictionary *)attributes 43 | andIconPosition:(IconPosition)position; 44 | 45 | // Setters 46 | - (void)setButtonText:(NSString *)buttonText; 47 | 48 | - (void)setIcon:(NSString *)icon; 49 | 50 | - (void)setIconImage:(UIImage *)icon; 51 | 52 | - (void)setAttributes:(NSDictionary*)attributes 53 | forUIControlState:(UIControlState)state; 54 | 55 | - (void)setBackgroundColor:(UIColor*)color 56 | forUIControlState:(UIControlState)state; 57 | 58 | - (void)setRadius:(CGFloat)radius; 59 | 60 | - (void)setBorderWidth:(CGFloat)width 61 | borderColor:(UIColor *)color; 62 | 63 | - (void)setControlState:(UIControlState)controlState; 64 | 65 | - (void)setSeparation:(CGFloat)separation; 66 | 67 | - (void)setTextAlignment:(NSTextAlignment)alignment; 68 | 69 | - (void)setHorizontalMargin:(CGFloat)margin; 70 | 71 | - (void)setIconImageView:(UIImageView *)iconImageView; 72 | 73 | //Getters 74 | -(NSString*)getButtonText; 75 | -(NSString*)getIcon; 76 | -(UIImage*)getIconImage; 77 | -(CGFloat)getRadius; 78 | -(CGFloat)getSeparation; 79 | -(NSTextAlignment)getTextAlignment; 80 | -(CGFloat)getHorizontalMargin; 81 | -(UIImageView*)getIconImageView; 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /Control/UIAwesomeButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIAwesomeButton.m 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendia on 30/12/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import "UIAwesomeButton.h" 10 | @interface UIAwesomeButton () 11 | @property (nonatomic) CGFloat separation; 12 | @property (nonatomic) NSTextAlignment textAligment; 13 | @property (nonatomic) UIControlState controlState; 14 | @property (nonatomic,strong) NSMutableDictionary *attributes; 15 | @property (nonatomic,strong) NSMutableDictionary *backgroundColors; 16 | @property (nonatomic,strong) NSNumber *horizontalmargin; 17 | @property (nonatomic,strong) NSString *buttonText; 18 | @property (nonatomic,strong) NSString *icon; 19 | @property (nonatomic,strong) UIImage *iconImage; 20 | @property (nonatomic,strong) UIImageView *iconImageView; 21 | @property (nonatomic,strong) UILabel *iconLabel, *textLabel; 22 | @end 23 | 24 | @implementation UIAwesomeButton 25 | @synthesize iconImageView = _iconImageView; 26 | 27 | +(UIAwesomeButton*)buttonWithType:(UIButtonType)type text:(NSString *)text iconImage:(UIImage *)icon attributes:(NSDictionary *)attributes andIconPosition:(IconPosition)position 28 | { 29 | UIAwesomeButton *button = [[UIAwesomeButton alloc] initWithFrame:CGRectZero text:text iconImage:icon attributes:attributes andIconPosition:position]; 30 | return button; 31 | } 32 | 33 | +(UIAwesomeButton*)buttonWithType:(UIButtonType)type text:(NSString *)text icon:(NSString *)icon attributes:(NSDictionary *)attributes andIconPosition:(IconPosition)position 34 | { 35 | UIAwesomeButton *button = [[UIAwesomeButton alloc] initWithFrame:CGRectZero text:text icon:icon attributes:attributes andIconPosition:position]; 36 | return button; 37 | } 38 | 39 | -(id)initWithFrame:(CGRect)frame text:(NSString *)text icon:(NSString *)icon attributes:(NSDictionary *)attributes andIconPosition:(IconPosition)position 40 | { 41 | self=[super initWithFrame:frame]; 42 | if(self){ 43 | [self setIcon:icon andButtonText:text]; 44 | [self setAttributes:attributes forUIControlState:UIControlStateNormal]; 45 | [self setIconPosition:position]; 46 | [self setTextAlignment:NSTextAlignmentCenter]; 47 | [self setControlState:UIControlStateNormal]; 48 | } 49 | return self; 50 | } 51 | 52 | -(id)initWithFrame:(CGRect)frame text:(NSString *)text iconImage:(UIImage *)icon attributes:(NSDictionary *)attributes andIconPosition:(IconPosition)position 53 | { 54 | self=[super initWithFrame:frame]; 55 | if(self){ 56 | [self setIconImage:icon andButtonText:text]; 57 | [self setAttributes:attributes forUIControlState:UIControlStateNormal]; 58 | [self setIconPosition:position]; 59 | [self setTextAlignment:NSTextAlignmentCenter]; 60 | [self setControlState:UIControlStateNormal]; 61 | } 62 | return self; 63 | } 64 | 65 | - (void)setFrame:(CGRect)frame 66 | { 67 | [super setFrame:frame]; 68 | [self updateButtonContent]; 69 | } 70 | 71 | 72 | -(void)updateButtonContent{ 73 | // Removing from superView 74 | [self.textLabel removeFromSuperview]; 75 | [self.iconLabel removeFromSuperview]; 76 | [self.iconImageView removeFromSuperview]; 77 | 78 | for (UIView *view in self.subviews) { 79 | [view removeFromSuperview]; 80 | } 81 | 82 | //Setting labels 83 | [self updateSubviewsContent]; 84 | 85 | // Horizontal layout 86 | [self addSubview:self.textLabel]; 87 | if (self.icon) { 88 | [self addSubview:self.iconLabel]; 89 | } 90 | if (self.iconImageView.image) { 91 | [self addSubview:self.iconImageView]; 92 | } 93 | 94 | // Elements order ICON/TEXT 95 | UIView *iconElement = self.icon? self.iconLabel : self.iconImageView.image ? self.iconImageView : nil; 96 | UIView *element1 = iconElement; 97 | UIView *element2 = self.textLabel; 98 | if(self.iconPosition == IconPositionRight){ 99 | element1 = self.textLabel; 100 | element2 = iconElement; 101 | } 102 | 103 | //Horizontal layout 104 | [self centerHorizontally:element1 element2:element2]; 105 | 106 | // Vertical layout 107 | float margin = self.frame.size.height*0.10; 108 | [self centerVertically:element1 element2:element2 margin:margin]; 109 | } 110 | 111 | 112 | - (void)centerHorizontally:(UIView *)element1 element2:(UIView *)element2 113 | { 114 | //Set aligment of subviews 115 | if([element1 isKindOfClass:[UILabel class]]) 116 | { 117 | [(UILabel*)element1 setTextAlignment:NSTextAlignmentLeft]; 118 | } 119 | if([element2 isKindOfClass:[UILabel class]]) 120 | { 121 | [(UILabel*)element2 setTextAlignment:NSTextAlignmentLeft]; 122 | } 123 | 124 | [self ditributeHorizontally:element1 element2:element2]; 125 | } 126 | 127 | 128 | - (void)centerVertically:(UIView *)element1 element2:(UIView *)element2 margin:(float)margin 129 | { 130 | if ([element1 isKindOfClass:[UILabel class]]) { 131 | [element1 setFrame:CGRectMake(element1.frame.origin.x, 0, element1.frame.size.width, self.frame.size.height)]; 132 | 133 | } 134 | else if ([element1 isKindOfClass:[UIImageView class]]) { 135 | [element1 setFrame:CGRectMake(element1.frame.origin.x, self.frame.size.height/2 - element1.frame.size.height/2, element1.frame.size.width, element1.frame.size.height)]; 136 | } 137 | if ([element2 isKindOfClass:[UILabel class]]) { 138 | [element2 setFrame:CGRectMake(element2.frame.origin.x, 0, element2.frame.size.width, self.frame.size.height)]; 139 | 140 | } 141 | else if ([element2 isKindOfClass:[UIImageView class]]) { 142 | [element2 setFrame:CGRectMake(element2.frame.origin.x, self.frame.size.height/2 - element2.frame.size.height/2, element2.frame.size.width, element2.frame.size.height)]; 143 | } 144 | } 145 | 146 | 147 | - (void)ditributeHorizontally:(UIView *)element1 element2:(UIView *)element2 148 | { 149 | CGFloat element1Width = 0; 150 | CGFloat element2Width = 0; 151 | if([element1 isKindOfClass:[UILabel class]]) 152 | { 153 | [(UILabel*)element1 setTextAlignment:NSTextAlignmentRight]; 154 | element1Width = [((UILabel*)element1).text sizeWithAttributes:@{NSFontAttributeName:((UILabel*)element1).font}].width; 155 | } 156 | else if([element1 isKindOfClass:[UIImageView class]]) 157 | { 158 | if (self.iconImageView.frame.size.width) { 159 | element1Width = self.iconImageView.frame.size.width; 160 | } 161 | else { 162 | element1Width = self.iconImage.size.width; 163 | } 164 | } 165 | if([element2 isKindOfClass:[UILabel class]]) 166 | { 167 | [(UILabel*)element2 setTextAlignment:NSTextAlignmentLeft]; 168 | element2Width = [((UILabel*)element2).text sizeWithAttributes:@{NSFontAttributeName:((UILabel*)element2).font}].width; 169 | 170 | } 171 | else if([element2 isKindOfClass:[UIImageView class]]) 172 | { 173 | if (self.iconImageView.frame.size.width) { 174 | element1Width = self.iconImageView.frame.size.width; 175 | } 176 | else { 177 | element1Width = self.iconImage.size.width; 178 | } 179 | } 180 | 181 | if(self.textAligment == NSTextAlignmentCenter){ 182 | CGFloat originX = (self.frame.size.width - (element1Width+ self.separation +element2Width))/2; 183 | [element1 setFrame:CGRectMake(originX, element1.frame.origin.y, element1Width, element1.frame.size.height)]; 184 | [element2 setFrame:CGRectMake(originX + element1Width + self.separation, element2.frame.origin.y, element2Width, element2.frame.size.height)]; 185 | } 186 | else if (self.textAligment == NSTextAlignmentLeft){ 187 | [element1 setFrame:CGRectMake(self.horizontalmargin.intValue, element1.frame.origin.y, element1Width, element1.frame.size.height)]; 188 | [element2 setFrame:CGRectMake(self.horizontalmargin.intValue + element1Width + self.separation, element2.frame.origin.y, element2Width, element2.frame.size.height)]; 189 | } 190 | else if (self.textAligment == NSTextAlignmentRight){ 191 | [element1 setFrame:CGRectMake(self.frame.size.width-self.horizontalmargin.intValue-element2Width-self.separation-element1Width, element1.frame.origin.y, element1Width, element1.frame.size.height)]; 192 | [element2 setFrame:CGRectMake(element1.frame.origin.x + element1Width + self.separation, element2.frame.origin.y, element2Width, element2.frame.size.height)]; 193 | } 194 | } 195 | 196 | 197 | -(void)updateButtonFormat 198 | { 199 | [self setBackgroundColor:[self backgroundColorForState:self.controlState]]; 200 | [self updateSubviewsContent]; 201 | } 202 | 203 | -(void)updateSubviewsContent 204 | { 205 | // Setting the constraints 206 | if(self.buttonText) { 207 | [self.textLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.buttonText attributes:[self textAttributesForState:self.controlState]]]; 208 | [self.textLabel setBackgroundColor:[UIColor clearColor]]; 209 | } 210 | else{ 211 | [self.textLabel setText:@""]; 212 | } 213 | 214 | if(self.icon){ 215 | [self.iconLabel setAttributedText:[[NSAttributedString alloc] initWithString:[NSString fontAwesomeIconStringForIconIdentifier:self.icon] attributes:[self iconAttributesForState:self.controlState]]]; 216 | [self.iconLabel setBackgroundColor:[UIColor clearColor]]; 217 | } 218 | else{ 219 | [self.iconLabel setText:@""]; 220 | } 221 | 222 | if (self.iconImage) { 223 | [self.iconImageView setImage:self.iconImage]; 224 | } 225 | } 226 | 227 | 228 | #pragma mark - Touches 229 | 230 | - (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 231 | { 232 | [super touchesBegan:touches withEvent:event]; 233 | [self setControlState:UIControlStateHighlighted]; 234 | } 235 | 236 | - (void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event 237 | { 238 | [super touchesCancelled:touches withEvent:event]; 239 | [self setControlState:UIControlStateNormal]; 240 | } 241 | 242 | - (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 243 | { 244 | [super touchesEnded:touches withEvent:event]; 245 | [self setControlState:UIControlStateNormal]; 246 | 247 | // Calling action block if it exists 248 | if(self.actionBlock){ 249 | self.actionBlock(self); 250 | } 251 | } 252 | 253 | 254 | #pragma mark - Lazy Instantiation 255 | 256 | -(NSMutableDictionary*)attributes 257 | { 258 | if(!_attributes) _attributes = [NSMutableDictionary new]; 259 | return _attributes; 260 | } 261 | 262 | -(NSMutableDictionary*)backgroundColors 263 | { 264 | if(!_backgroundColors) _backgroundColors = [NSMutableDictionary new]; 265 | return _backgroundColors; 266 | } 267 | 268 | -(UILabel*)textLabel 269 | { 270 | if(!_textLabel){ 271 | _textLabel = [UILabel new]; 272 | [_textLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; 273 | [_textLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; 274 | } 275 | return _textLabel; 276 | } 277 | 278 | -(UILabel*)iconLabel 279 | { 280 | if(!_iconLabel){ 281 | _iconLabel = [UILabel new]; 282 | [_iconLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; 283 | [_iconLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; 284 | } 285 | return _iconLabel; 286 | } 287 | 288 | -(UIImageView*)iconImageView 289 | { 290 | if(!_iconImageView) { 291 | _iconImageView = [UIImageView new]; 292 | [_iconImageView setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; 293 | [_iconImageView setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; 294 | [_iconImageView setContentMode:UIViewContentModeCenter]; 295 | } 296 | return _iconImageView; 297 | } 298 | 299 | 300 | #pragma mark - Custom getters 301 | 302 | -(NSDictionary*)iconAttributesForState:(UIControlState)state 303 | { 304 | NSMutableDictionary *iconAttributes = [[self textAttributesForState:state] mutableCopy]; 305 | if ([iconAttributes objectForKey:@"IconFont"]) { 306 | iconAttributes[NSFontAttributeName] = iconAttributes[@"IconFont"]; 307 | }else{ 308 | UIFont *textFont = ((UIFont*)iconAttributes[NSFontAttributeName]); 309 | iconAttributes[NSFontAttributeName]=[UIFont fontWithName:@"fontawesome" size:textFont.pointSize]; 310 | } 311 | return iconAttributes; 312 | } 313 | 314 | -(NSDictionary*)textAttributesForState:(UIControlState)state 315 | { 316 | if(self.attributes[@(state)]) return self.attributes[@(state)]; 317 | else return self.attributes[@(UIControlStateNormal)]; 318 | } 319 | 320 | -(UIColor*)backgroundColorForState:(UIControlState)state 321 | { 322 | if(self.backgroundColors[@(state)]) return self.backgroundColors[@(state)]; 323 | else return self.backgroundColors[@(UIControlStateNormal)]; 324 | 325 | } 326 | 327 | -(NSNumber*)horizontalmargin 328 | { 329 | if(!_horizontalmargin) _horizontalmargin = @(5); 330 | return _horizontalmargin; 331 | } 332 | 333 | 334 | #pragma mark - Setters 335 | 336 | -(void)setHorizontalMargin:(CGFloat)margin 337 | { 338 | _horizontalmargin = @(margin); 339 | [self updateButtonContent]; 340 | } 341 | 342 | -(void)setTextAlignment:(NSTextAlignment)alignment 343 | { 344 | _textAligment=alignment; 345 | [self updateButtonContent]; 346 | } 347 | 348 | -(void)setRadius:(CGFloat)radius 349 | { 350 | self.layer.cornerRadius=radius; 351 | } 352 | 353 | - (void)setBorderWidth:(CGFloat)width 354 | borderColor:(UIColor *)color 355 | { 356 | [self.layer setBorderWidth:width]; 357 | [self.layer setBorderColor:color.CGColor]; 358 | } 359 | 360 | -(void)setSeparation:(CGFloat)separation 361 | { 362 | _separation = separation; 363 | [self updateButtonContent]; 364 | } 365 | 366 | -(void)setAttributes:(NSDictionary*)attributes forUIControlState:(UIControlState)state 367 | { 368 | //Setting attributes 369 | self.attributes[@(state)]=attributes; 370 | [self updateButtonFormat]; 371 | [self updateButtonContent]; 372 | } 373 | 374 | -(void)setBackgroundColor:(UIColor*)color forUIControlState:(UIControlState)state 375 | { 376 | self.backgroundColors[@(state)]=color; 377 | [self updateButtonFormat]; 378 | } 379 | 380 | -(void)setControlState:(UIControlState)controlState 381 | { 382 | _controlState = controlState; 383 | [self updateButtonFormat]; 384 | } 385 | 386 | -(void)setIcon:(NSString *)icon andButtonText:(NSString*)text 387 | { 388 | _buttonText = text; 389 | _icon = icon; 390 | _iconImage = nil; 391 | [self updateButtonContent]; 392 | } 393 | 394 | -(void)setIconImage:(UIImage *)iconImage andButtonText:(NSString*)text 395 | { 396 | _buttonText = text; 397 | _iconImage = iconImage; 398 | _icon = nil; 399 | [self updateButtonContent]; 400 | } 401 | 402 | -(void)setButtonText:(NSString *)buttonText 403 | { 404 | _buttonText = buttonText; 405 | [self updateButtonContent]; 406 | } 407 | 408 | -(void)setIconImage:(UIImage *)icon 409 | { 410 | _icon = nil; 411 | _iconImage = icon; 412 | [self updateButtonContent]; 413 | } 414 | 415 | -(void)setIcon:(NSString *)icon 416 | { 417 | _icon = icon; 418 | _iconImage = nil; 419 | [self updateButtonContent]; 420 | } 421 | -(void)setIconPosition:(IconPosition)iconPosition 422 | { 423 | _iconPosition = iconPosition; 424 | } 425 | 426 | -(void)setIconImageView:(UIImageView *)iconImageView 427 | { 428 | _iconImageView = iconImageView; 429 | _iconImage = nil; 430 | [self updateButtonContent]; 431 | } 432 | 433 | 434 | #pragma mark - Getters 435 | 436 | -(NSString*)getButtonText 437 | { 438 | return _buttonText; 439 | } 440 | 441 | -(NSString*)getIcon 442 | { 443 | return _icon; 444 | } 445 | 446 | -(UIImage*)getIconImage 447 | { 448 | return _iconImage; 449 | } 450 | 451 | -(UIImageView*)getIconImageView 452 | { 453 | return _iconImageView; 454 | } 455 | 456 | -(CGFloat)getRadius 457 | { 458 | return self.layer.cornerRadius; 459 | } 460 | 461 | -(CGFloat)getSeparation 462 | { 463 | return _separation; 464 | } 465 | 466 | -(NSTextAlignment)getTextAlignment 467 | { 468 | return _textAligment; 469 | } 470 | 471 | -(CGFloat)getHorizontalMargin 472 | { 473 | return _horizontalmargin.intValue; 474 | } 475 | 476 | @end 477 | -------------------------------------------------------------------------------- /Control/UIButton+PPiAwesome.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+PPiAwesome.h 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendía on 19/08/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSString+FontAwesome.h" 11 | #import 12 | #import 13 | 14 | typedef enum { 15 | IconPositionRight, 16 | IconPositionLeft, 17 | } IconPosition; 18 | 19 | @interface UIButton (PPiAwesome) 20 | 21 | + (UIButton*)buttonWithType:(UIButtonType)type 22 | text:(NSString*)text 23 | icon:(NSString*)icon 24 | textAttributes:(NSDictionary*)attributes 25 | andIconPosition:(IconPosition)position; 26 | 27 | - (id)initWithFrame:(CGRect)frame 28 | text:(NSString*)text 29 | icon:(NSString*)icon 30 | textAttributes:(NSDictionary*)attributes 31 | andIconPosition:(IconPosition)position; 32 | 33 | - (id)initWithFrame:(CGRect)frame 34 | text:(NSString*)text 35 | iconString:(NSString*)iconString 36 | textAttributes:(NSDictionary*)attributes 37 | andIconPosition:(IconPosition)position; 38 | 39 | + (UIButton*)buttonWithType:(UIButtonType)type 40 | text:(NSString*)text 41 | iconString:(NSString*)iconString 42 | textAttributes:(NSDictionary*)attributes 43 | andIconPosition:(IconPosition)position; 44 | 45 | - (void)setTextAttributes:(NSDictionary*)attributes 46 | forUIControlState:(UIControlState)state; 47 | 48 | - (void)setBackgroundColor:(UIColor*)color 49 | forUIControlState:(UIControlState)state; 50 | 51 | - (void)setIconPosition:(IconPosition)position; 52 | 53 | - (void)setButtonText:(NSString*)text; 54 | 55 | - (void)setButtonIcon:(NSString*)icon; 56 | 57 | - (void)setButtonIconString:(NSString *)icon; 58 | 59 | - (void)setRadius:(CGFloat)radius; 60 | 61 | - (void)setBorderWidth:(CGFloat)width 62 | borderColor:(UIColor *)color; 63 | 64 | - (void)setSeparation:(NSUInteger)separation; 65 | 66 | - (void)setIsAwesome:(BOOL)isAwesome; 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Control/UIButton+PPiAwesome.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+PPiAwesome.m 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendía on 19/08/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import "UIButton+PPiAwesome.h" 10 | 11 | static char buttonTextKey; 12 | static char buttonIconKey; 13 | static char buttonIconStringKey; 14 | static char iconPositionKey; 15 | static char backgroundColorsKey; 16 | static char textAttributesKey; 17 | static char isAwesomeKey; 18 | static char separationKey; 19 | 20 | 21 | @implementation UIButton (PPiAwesome) 22 | 23 | +(UIButton*)buttonWithType:(UIButtonType)type text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position{ 24 | UIButton *button =[UIButton buttonWithType:type]; 25 | [button setIsAwesome:YES]; 26 | [button setButtonText:text]; 27 | [button setButtonIcon:icon]; 28 | [button setTextAttributes:attributes forUIControlState:UIControlStateNormal]; 29 | [button setIconPosition:position]; 30 | [button setIsAwesome:YES]; 31 | 32 | return button; 33 | } 34 | -(id)initWithFrame:(CGRect)frame text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position{ 35 | self=[super initWithFrame:frame]; 36 | if(self){ 37 | [self setIsAwesome:YES]; 38 | 39 | [self setButtonText:text]; 40 | [self setButtonIcon:icon]; 41 | [self setTextAttributes:attributes forUIControlState:UIControlStateNormal]; 42 | [self setIconPosition:position]; 43 | } 44 | return self; 45 | } 46 | 47 | -(id)initWithFrame:(CGRect)frame text:(NSString*)text iconString:(NSString*)iconString textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position{ 48 | self=[super initWithFrame:frame]; 49 | if(self){ 50 | [self setIsAwesome:YES]; 51 | 52 | [self setButtonText:text]; 53 | [self setButtonIconString:iconString]; 54 | [self setTextAttributes:attributes forUIControlState:UIControlStateNormal]; 55 | [self setIconPosition:position]; 56 | } 57 | return self; 58 | } 59 | +(UIButton*)buttonWithType:(UIButtonType)type text:(NSString*)text iconString:(NSString*)iconString textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position{ 60 | UIButton *button =[UIButton buttonWithType:type]; 61 | [button setIsAwesome:YES]; 62 | [button setButtonText:text]; 63 | [button setButtonIconString:iconString]; 64 | [button setTextAttributes:attributes forUIControlState:UIControlStateNormal]; 65 | [button setIconPosition:position]; 66 | [button setIsAwesome:YES]; 67 | 68 | return button; 69 | 70 | } 71 | 72 | -(void)updateButtonFormatForUIControlState:(UIControlState)state{ 73 | if([self isAwesome]){ 74 | //Mutable String to set to the button 75 | NSMutableAttributedString *mutableString=[[NSMutableAttributedString alloc] init]; 76 | 77 | //Mutable String of text 78 | NSMutableAttributedString *mutableStringText=[[NSMutableAttributedString alloc] initWithString:@""]; 79 | if([self buttonText]) 80 | [mutableStringText appendAttributedString:[[NSAttributedString alloc] initWithString:[self buttonText]]]; 81 | 82 | //Mutable String of icon 83 | NSMutableAttributedString *mutableStringIcon=[[NSMutableAttributedString alloc] initWithString:@""]; 84 | if([self buttonIconString]){ 85 | [mutableStringIcon appendAttributedString:[[NSAttributedString alloc] initWithString:[self buttonIconString]]]; 86 | } 87 | else if([self buttonIcon]){ 88 | [mutableStringIcon appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString fontAwesomeIconStringForIconIdentifier:[self buttonIcon]]]]; 89 | } 90 | 91 | //Setting color 92 | UIColor *color=[self backgroundColors][@(state)]; 93 | if(!color) 94 | color=[self backgroundColors][@(UIControlStateNormal)]; 95 | 96 | if(color){ 97 | [self setBackgroundColor:color]; 98 | } 99 | 100 | //Setting attributes 101 | NSMutableDictionary *textAttributes=[[self textAttributes][@(state)] mutableCopy]; 102 | if(!textAttributes) 103 | textAttributes=[[self textAttributes][@(UIControlStateNormal)] mutableCopy]; 104 | if(textAttributes){ 105 | //Setting attributes to text 106 | [mutableStringText setAttributes:textAttributes range:NSMakeRange(0, [[self buttonText] length])]; 107 | 108 | //Setting attributes to icon 109 | if([self buttonIcon] || [self buttonIconString]){ 110 | UIFont *textFont=(UIFont*)textAttributes[NSFontAttributeName]; 111 | NSMutableDictionary *iconAttributes=[textAttributes mutableCopy]; 112 | if ([textAttributes objectForKey:@"IconFont"]) { 113 | iconAttributes[NSFontAttributeName] = textAttributes[@"IconFont"]; 114 | }else{ 115 | iconAttributes[NSFontAttributeName]=[UIFont fontWithName:@"fontawesome" size:textFont.pointSize]; 116 | } 117 | [mutableStringIcon setAttributes:iconAttributes range:NSMakeRange(0, [mutableStringIcon length])]; 118 | } 119 | } 120 | 121 | //Separation 122 | NSMutableString *separationString=[NSMutableString stringWithFormat:@""]; 123 | if([self separation]){ 124 | int separationInt=[[self separation] intValue]; 125 | for(int i=0;i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/.idea/runConfigurations/PPiAwesomeButton_Demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 90 | 91 | 92 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 131 | 132 | 135 | 136 | 137 | 138 | 141 | 142 | 145 | 146 | 149 | 150 | 151 | 152 | 155 | 156 | 159 | 160 | 163 | 164 | 167 | 168 | 169 | 170 | 173 | 174 | 177 | 178 | 181 | 182 | 185 | 186 | 187 | 188 | 191 | 192 | 195 | 196 | 199 | 200 | 201 | 202 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 264 | 265 | 266 | 267 | 1395698581036 268 | 1395698581036 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 318 | 319 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/.idea/xcode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 375E550BEA3B4FEF86894FCD /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 01020E9A65C847D5A94BCB83 /* libPods.a */; }; 11 | 3D16EB7217C2118200B5964F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D16EB7117C2118200B5964F /* UIKit.framework */; }; 12 | 3D16EB7417C2118200B5964F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D16EB7317C2118200B5964F /* Foundation.framework */; }; 13 | 3D16EB7617C2118200B5964F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D16EB7517C2118200B5964F /* CoreGraphics.framework */; }; 14 | 3D16EB7C17C2118200B5964F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3D16EB7A17C2118200B5964F /* InfoPlist.strings */; }; 15 | 3D16EB7E17C2118200B5964F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D16EB7D17C2118200B5964F /* main.m */; }; 16 | 3D16EB8217C2118200B5964F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D16EB8117C2118200B5964F /* AppDelegate.m */; }; 17 | 3D16EB8417C2118200B5964F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D16EB8317C2118200B5964F /* Default.png */; }; 18 | 3D16EB8617C2118200B5964F /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D16EB8517C2118200B5964F /* Default@2x.png */; }; 19 | 3D16EB8817C2118200B5964F /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D16EB8717C2118200B5964F /* Default-568h@2x.png */; }; 20 | 3D16EB8B17C2118200B5964F /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3D16EB8917C2118200B5964F /* MainStoryboard.storyboard */; }; 21 | 3D16EB8E17C2118200B5964F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D16EB8D17C2118200B5964F /* ViewController.m */; }; 22 | 3D16EB9717C211E000B5964F /* UIButton+PPiAwesome.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D16EB9617C211E000B5964F /* UIButton+PPiAwesome.m */; }; 23 | 3D89506D1871682100F6C289 /* UIAwesomeButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D89506C1871682100F6C289 /* UIAwesomeButton.m */; }; 24 | B749E005B5567C6256962EB6 /* bell.png in Resources */ = {isa = PBXBuildFile; fileRef = B749E7A99E66C8BC308E4CDD /* bell.png */; }; 25 | B749E12FB680891387FFC6E3 /* bell@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B749E62D9B2626674109ABF5 /* bell@2x.png */; }; 26 | BC3990E019F5668B00AA8BB2 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC3990DF19F5668B00AA8BB2 /* LaunchScreen.xib */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 01020E9A65C847D5A94BCB83 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 3D16EB6E17C2118200B5964F /* PPiAwesomeButton-Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PPiAwesomeButton-Demo.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 3D16EB7117C2118200B5964F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 33 | 3D16EB7317C2118200B5964F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 34 | 3D16EB7517C2118200B5964F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 35 | 3D16EB7917C2118200B5964F /* PPiAwesomeButton-Demo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PPiAwesomeButton-Demo-Info.plist"; sourceTree = ""; }; 36 | 3D16EB7B17C2118200B5964F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 37 | 3D16EB7D17C2118200B5964F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 38 | 3D16EB7F17C2118200B5964F /* PPiAwesomeButton-Demo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PPiAwesomeButton-Demo-Prefix.pch"; sourceTree = ""; }; 39 | 3D16EB8017C2118200B5964F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 40 | 3D16EB8117C2118200B5964F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 41 | 3D16EB8317C2118200B5964F /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 42 | 3D16EB8517C2118200B5964F /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 43 | 3D16EB8717C2118200B5964F /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 44 | 3D16EB8A17C2118200B5964F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; 45 | 3D16EB8C17C2118200B5964F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 46 | 3D16EB8D17C2118200B5964F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 47 | 3D16EB9517C211E000B5964F /* UIButton+PPiAwesome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+PPiAwesome.h"; sourceTree = ""; }; 48 | 3D16EB9617C211E000B5964F /* UIButton+PPiAwesome.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+PPiAwesome.m"; sourceTree = ""; }; 49 | 3D89506B1871682100F6C289 /* UIAwesomeButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIAwesomeButton.h; sourceTree = ""; }; 50 | 3D89506C1871682100F6C289 /* UIAwesomeButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIAwesomeButton.m; sourceTree = ""; }; 51 | 601DF387193B76A1161A91E3 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 52 | 83A0D9BC4894C21AC2DDEA26 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 53 | B749E62D9B2626674109ABF5 /* bell@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bell@2x.png"; sourceTree = ""; }; 54 | B749E7A99E66C8BC308E4CDD /* bell.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bell.png; sourceTree = ""; }; 55 | BC3990DF19F5668B00AA8BB2 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 3D16EB6B17C2118200B5964F /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 3D16EB7217C2118200B5964F /* UIKit.framework in Frameworks */, 64 | 3D16EB7417C2118200B5964F /* Foundation.framework in Frameworks */, 65 | 3D16EB7617C2118200B5964F /* CoreGraphics.framework in Frameworks */, 66 | 375E550BEA3B4FEF86894FCD /* libPods.a in Frameworks */, 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | /* End PBXFrameworksBuildPhase section */ 71 | 72 | /* Begin PBXGroup section */ 73 | 3D16EB6517C2118200B5964F = { 74 | isa = PBXGroup; 75 | children = ( 76 | 3D16EB7717C2118200B5964F /* PPiAwesomeButton-Demo */, 77 | 3D16EB7017C2118200B5964F /* Frameworks */, 78 | 3D16EB6F17C2118200B5964F /* Products */, 79 | F572172BA1E9971E8137459E /* Pods */, 80 | ); 81 | sourceTree = ""; 82 | }; 83 | 3D16EB6F17C2118200B5964F /* Products */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 3D16EB6E17C2118200B5964F /* PPiAwesomeButton-Demo.app */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | 3D16EB7017C2118200B5964F /* Frameworks */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 3D16EB7117C2118200B5964F /* UIKit.framework */, 95 | 3D16EB7317C2118200B5964F /* Foundation.framework */, 96 | 3D16EB7517C2118200B5964F /* CoreGraphics.framework */, 97 | 01020E9A65C847D5A94BCB83 /* libPods.a */, 98 | ); 99 | name = Frameworks; 100 | sourceTree = ""; 101 | }; 102 | 3D16EB7717C2118200B5964F /* PPiAwesomeButton-Demo */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 3D16EB9417C211A800B5964F /* Control */, 106 | 3D16EB8017C2118200B5964F /* AppDelegate.h */, 107 | 3D16EB8117C2118200B5964F /* AppDelegate.m */, 108 | 3D16EB8917C2118200B5964F /* MainStoryboard.storyboard */, 109 | 3D16EB8C17C2118200B5964F /* ViewController.h */, 110 | 3D16EB8D17C2118200B5964F /* ViewController.m */, 111 | BC3990DF19F5668B00AA8BB2 /* LaunchScreen.xib */, 112 | 3D16EB7817C2118200B5964F /* Supporting Files */, 113 | B749E3FBC26FFBBC3E0C9C6C /* Resources */, 114 | ); 115 | path = "PPiAwesomeButton-Demo"; 116 | sourceTree = ""; 117 | }; 118 | 3D16EB7817C2118200B5964F /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 3D16EB7917C2118200B5964F /* PPiAwesomeButton-Demo-Info.plist */, 122 | 3D16EB7A17C2118200B5964F /* InfoPlist.strings */, 123 | 3D16EB7D17C2118200B5964F /* main.m */, 124 | 3D16EB7F17C2118200B5964F /* PPiAwesomeButton-Demo-Prefix.pch */, 125 | 3D16EB8317C2118200B5964F /* Default.png */, 126 | 3D16EB8517C2118200B5964F /* Default@2x.png */, 127 | 3D16EB8717C2118200B5964F /* Default-568h@2x.png */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | 3D16EB9417C211A800B5964F /* Control */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 3D16EB9517C211E000B5964F /* UIButton+PPiAwesome.h */, 136 | 3D16EB9617C211E000B5964F /* UIButton+PPiAwesome.m */, 137 | 3D89506B1871682100F6C289 /* UIAwesomeButton.h */, 138 | 3D89506C1871682100F6C289 /* UIAwesomeButton.m */, 139 | ); 140 | name = Control; 141 | path = ../../Control; 142 | sourceTree = ""; 143 | }; 144 | B749E3FBC26FFBBC3E0C9C6C /* Resources */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | B749E7A99E66C8BC308E4CDD /* bell.png */, 148 | B749E62D9B2626674109ABF5 /* bell@2x.png */, 149 | ); 150 | path = Resources; 151 | sourceTree = ""; 152 | }; 153 | F572172BA1E9971E8137459E /* Pods */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 83A0D9BC4894C21AC2DDEA26 /* Pods.debug.xcconfig */, 157 | 601DF387193B76A1161A91E3 /* Pods.release.xcconfig */, 158 | ); 159 | name = Pods; 160 | sourceTree = ""; 161 | }; 162 | /* End PBXGroup section */ 163 | 164 | /* Begin PBXNativeTarget section */ 165 | 3D16EB6D17C2118200B5964F /* PPiAwesomeButton-Demo */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = 3D16EB9117C2118200B5964F /* Build configuration list for PBXNativeTarget "PPiAwesomeButton-Demo" */; 168 | buildPhases = ( 169 | 79CA005E05ED4D27AF767A1F /* Check Pods Manifest.lock */, 170 | 3D16EB6A17C2118200B5964F /* Sources */, 171 | 3D16EB6B17C2118200B5964F /* Frameworks */, 172 | 3D16EB6C17C2118200B5964F /* Resources */, 173 | 84FCDC430BC7428EADECE59C /* Copy Pods Resources */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | ); 179 | name = "PPiAwesomeButton-Demo"; 180 | productName = "PPiAwesomeButton-Demo"; 181 | productReference = 3D16EB6E17C2118200B5964F /* PPiAwesomeButton-Demo.app */; 182 | productType = "com.apple.product-type.application"; 183 | }; 184 | /* End PBXNativeTarget section */ 185 | 186 | /* Begin PBXProject section */ 187 | 3D16EB6617C2118200B5964F /* Project object */ = { 188 | isa = PBXProject; 189 | attributes = { 190 | LastUpgradeCheck = 0460; 191 | ORGANIZATIONNAME = PPinera; 192 | TargetAttributes = { 193 | 3D16EB6D17C2118200B5964F = { 194 | DevelopmentTeam = U6LC622NKF; 195 | }; 196 | }; 197 | }; 198 | buildConfigurationList = 3D16EB6917C2118200B5964F /* Build configuration list for PBXProject "PPiAwesomeButton-Demo" */; 199 | compatibilityVersion = "Xcode 3.2"; 200 | developmentRegion = English; 201 | hasScannedForEncodings = 0; 202 | knownRegions = ( 203 | en, 204 | ); 205 | mainGroup = 3D16EB6517C2118200B5964F; 206 | productRefGroup = 3D16EB6F17C2118200B5964F /* Products */; 207 | projectDirPath = ""; 208 | projectRoot = ""; 209 | targets = ( 210 | 3D16EB6D17C2118200B5964F /* PPiAwesomeButton-Demo */, 211 | ); 212 | }; 213 | /* End PBXProject section */ 214 | 215 | /* Begin PBXResourcesBuildPhase section */ 216 | 3D16EB6C17C2118200B5964F /* Resources */ = { 217 | isa = PBXResourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 3D16EB7C17C2118200B5964F /* InfoPlist.strings in Resources */, 221 | 3D16EB8417C2118200B5964F /* Default.png in Resources */, 222 | 3D16EB8617C2118200B5964F /* Default@2x.png in Resources */, 223 | 3D16EB8817C2118200B5964F /* Default-568h@2x.png in Resources */, 224 | 3D16EB8B17C2118200B5964F /* MainStoryboard.storyboard in Resources */, 225 | B749E005B5567C6256962EB6 /* bell.png in Resources */, 226 | BC3990E019F5668B00AA8BB2 /* LaunchScreen.xib in Resources */, 227 | B749E12FB680891387FFC6E3 /* bell@2x.png in Resources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXResourcesBuildPhase section */ 232 | 233 | /* Begin PBXShellScriptBuildPhase section */ 234 | 79CA005E05ED4D27AF767A1F /* Check Pods Manifest.lock */ = { 235 | isa = PBXShellScriptBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | inputPaths = ( 240 | ); 241 | name = "Check Pods Manifest.lock"; 242 | outputPaths = ( 243 | ); 244 | runOnlyForDeploymentPostprocessing = 0; 245 | shellPath = /bin/sh; 246 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 247 | showEnvVarsInLog = 0; 248 | }; 249 | 84FCDC430BC7428EADECE59C /* Copy Pods Resources */ = { 250 | isa = PBXShellScriptBuildPhase; 251 | buildActionMask = 2147483647; 252 | files = ( 253 | ); 254 | inputPaths = ( 255 | ); 256 | name = "Copy Pods Resources"; 257 | outputPaths = ( 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | shellPath = /bin/sh; 261 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; 262 | showEnvVarsInLog = 0; 263 | }; 264 | /* End PBXShellScriptBuildPhase section */ 265 | 266 | /* Begin PBXSourcesBuildPhase section */ 267 | 3D16EB6A17C2118200B5964F /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | 3D89506D1871682100F6C289 /* UIAwesomeButton.m in Sources */, 272 | 3D16EB7E17C2118200B5964F /* main.m in Sources */, 273 | 3D16EB8217C2118200B5964F /* AppDelegate.m in Sources */, 274 | 3D16EB8E17C2118200B5964F /* ViewController.m in Sources */, 275 | 3D16EB9717C211E000B5964F /* UIButton+PPiAwesome.m in Sources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXSourcesBuildPhase section */ 280 | 281 | /* Begin PBXVariantGroup section */ 282 | 3D16EB7A17C2118200B5964F /* InfoPlist.strings */ = { 283 | isa = PBXVariantGroup; 284 | children = ( 285 | 3D16EB7B17C2118200B5964F /* en */, 286 | ); 287 | name = InfoPlist.strings; 288 | sourceTree = ""; 289 | }; 290 | 3D16EB8917C2118200B5964F /* MainStoryboard.storyboard */ = { 291 | isa = PBXVariantGroup; 292 | children = ( 293 | 3D16EB8A17C2118200B5964F /* en */, 294 | ); 295 | name = MainStoryboard.storyboard; 296 | sourceTree = ""; 297 | }; 298 | /* End PBXVariantGroup section */ 299 | 300 | /* Begin XCBuildConfiguration section */ 301 | 3D16EB8F17C2118200B5964F /* Debug */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ALWAYS_SEARCH_USER_PATHS = NO; 305 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 306 | CLANG_CXX_LIBRARY = "libc++"; 307 | CLANG_ENABLE_OBJC_ARC = YES; 308 | CLANG_WARN_CONSTANT_CONVERSION = YES; 309 | CLANG_WARN_EMPTY_BODY = YES; 310 | CLANG_WARN_ENUM_CONVERSION = YES; 311 | CLANG_WARN_INT_CONVERSION = YES; 312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 313 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 314 | COPY_PHASE_STRIP = NO; 315 | GCC_C_LANGUAGE_STANDARD = gnu99; 316 | GCC_DYNAMIC_NO_PIC = NO; 317 | GCC_OPTIMIZATION_LEVEL = 0; 318 | GCC_PREPROCESSOR_DEFINITIONS = ( 319 | "DEBUG=1", 320 | "$(inherited)", 321 | ); 322 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 323 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 324 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 325 | GCC_WARN_UNUSED_VARIABLE = YES; 326 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 327 | ONLY_ACTIVE_ARCH = YES; 328 | SDKROOT = iphoneos; 329 | }; 330 | name = Debug; 331 | }; 332 | 3D16EB9017C2118200B5964F /* Release */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 337 | CLANG_CXX_LIBRARY = "libc++"; 338 | CLANG_ENABLE_OBJC_ARC = YES; 339 | CLANG_WARN_CONSTANT_CONVERSION = YES; 340 | CLANG_WARN_EMPTY_BODY = YES; 341 | CLANG_WARN_ENUM_CONVERSION = YES; 342 | CLANG_WARN_INT_CONVERSION = YES; 343 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 344 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 345 | COPY_PHASE_STRIP = YES; 346 | GCC_C_LANGUAGE_STANDARD = gnu99; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 348 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 349 | GCC_WARN_UNUSED_VARIABLE = YES; 350 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 351 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 352 | SDKROOT = iphoneos; 353 | VALIDATE_PRODUCT = YES; 354 | }; 355 | name = Release; 356 | }; 357 | 3D16EB9217C2118200B5964F /* Debug */ = { 358 | isa = XCBuildConfiguration; 359 | baseConfigurationReference = 83A0D9BC4894C21AC2DDEA26 /* Pods.debug.xcconfig */; 360 | buildSettings = { 361 | CODE_SIGN_IDENTITY = "iPhone Developer"; 362 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 363 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 364 | GCC_PREFIX_HEADER = "PPiAwesomeButton-Demo/PPiAwesomeButton-Demo-Prefix.pch"; 365 | INFOPLIST_FILE = "PPiAwesomeButton-Demo/PPiAwesomeButton-Demo-Info.plist"; 366 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 367 | PRODUCT_NAME = "$(TARGET_NAME)"; 368 | PROVISIONING_PROFILE = ""; 369 | WRAPPER_EXTENSION = app; 370 | }; 371 | name = Debug; 372 | }; 373 | 3D16EB9317C2118200B5964F /* Release */ = { 374 | isa = XCBuildConfiguration; 375 | baseConfigurationReference = 601DF387193B76A1161A91E3 /* Pods.release.xcconfig */; 376 | buildSettings = { 377 | CODE_SIGN_IDENTITY = "iPhone Developer"; 378 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 379 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 380 | GCC_PREFIX_HEADER = "PPiAwesomeButton-Demo/PPiAwesomeButton-Demo-Prefix.pch"; 381 | INFOPLIST_FILE = "PPiAwesomeButton-Demo/PPiAwesomeButton-Demo-Info.plist"; 382 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 383 | PRODUCT_NAME = "$(TARGET_NAME)"; 384 | PROVISIONING_PROFILE = ""; 385 | WRAPPER_EXTENSION = app; 386 | }; 387 | name = Release; 388 | }; 389 | /* End XCBuildConfiguration section */ 390 | 391 | /* Begin XCConfigurationList section */ 392 | 3D16EB6917C2118200B5964F /* Build configuration list for PBXProject "PPiAwesomeButton-Demo" */ = { 393 | isa = XCConfigurationList; 394 | buildConfigurations = ( 395 | 3D16EB8F17C2118200B5964F /* Debug */, 396 | 3D16EB9017C2118200B5964F /* Release */, 397 | ); 398 | defaultConfigurationIsVisible = 0; 399 | defaultConfigurationName = Release; 400 | }; 401 | 3D16EB9117C2118200B5964F /* Build configuration list for PBXNativeTarget "PPiAwesomeButton-Demo" */ = { 402 | isa = XCConfigurationList; 403 | buildConfigurations = ( 404 | 3D16EB9217C2118200B5964F /* Debug */, 405 | 3D16EB9317C2118200B5964F /* Release */, 406 | ); 407 | defaultConfigurationIsVisible = 0; 408 | defaultConfigurationName = Release; 409 | }; 410 | /* End XCConfigurationList section */ 411 | }; 412 | rootObject = 3D16EB6617C2118200B5964F /* Project object */; 413 | } 414 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcodeproj/project.xcworkspace/xcuserdata/pepibumur.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcodeproj/project.xcworkspace/xcuserdata/pepibumur.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcodeproj/xcshareddata/xcschemes/PPiAwesomeButton-Demo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcodeproj/xcuserdata/Isaac.xcuserdatad/xcschemes/PPiAwesomeButton-Demo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcodeproj/xcuserdata/Isaac.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PPiAwesomeButton-Demo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 3D16EB6D17C2118200B5964F 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcodeproj/xcuserdata/pepibumur.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PPiAwesomeButton-Demo.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 3D16EB6D17C2118200B5964F 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcworkspace/xcuserdata/Isaac.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcworkspace/xcuserdata/Isaac.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcworkspace/xcuserdata/pepibumur.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcworkspace/xcuserdata/pepibumur.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcworkspace/xcuserdata/pepibumur.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo.xcworkspace/xcuserdata/pepibumur.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendía on 19/08/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendía on 19/08/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Default-568h@2x.png -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Default.png -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Default@2x.png -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.PPinera.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIAppFonts 28 | 29 | FontAwesome.ttf 30 | 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | UIMainStoryboardFile 34 | MainStoryboard 35 | UIRequiredDeviceCapabilities 36 | 37 | armv7 38 | 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'PPiAwesomeButton-Demo' target in the 'PPiAwesomeButton-Demo' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Resources/bell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Resources/bell.png -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Resources/bell@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/Resources/bell@2x.png -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendía on 19/08/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendía on 19/08/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIButton+PPiAwesome.h" 11 | #import "UIAwesomeButton.h" 12 | @interface ViewController () 13 | @property (weak, nonatomic) IBOutlet UIButton *button1; 14 | @property (weak, nonatomic) IBOutlet UIButton *button2; 15 | @property (weak, nonatomic) IBOutlet UIButton *button3; 16 | 17 | @property (weak, nonatomic) IBOutlet UIButton *button4; 18 | @property (weak, nonatomic) IBOutlet UIButton *button5; 19 | @property (weak, nonatomic) IBOutlet UIButton *button6; 20 | 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | 30 | [self.button1 setIsAwesome:YES]; 31 | [self.button1 setButtonText:@"Twitter"]; 32 | [self.button1 setButtonIcon:@"icon-twitter"]; 33 | [self.button1 setIconPosition:IconPositionLeft]; 34 | [self.button1 setTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], 35 | NSForegroundColorAttributeName:[UIColor whiteColor], 36 | @"IconFont":[UIFont fontWithName:@"fontawesome" size:50]} 37 | forUIControlState:UIControlStateNormal]; 38 | [self.button1 setBackgroundColor:[UIColor colorWithRed:27.0f/255 green:178.0f/255 blue:233.0f/255 alpha:1.0] 39 | forUIControlState:UIControlStateNormal]; 40 | [self.button1 setBackgroundColor:[UIColor colorWithRed:60.0f/255 green:89.0f/255 blue:157.0f/255 alpha:1.0] 41 | forUIControlState:UIControlStateHighlighted]; 42 | [self.button1 setRadius:5.0]; 43 | 44 | 45 | [self.button2 setIsAwesome:YES]; 46 | [self.button2 setButtonText:@"Twitter"]; 47 | [self.button2 setButtonIcon:@"icon-twitter"]; 48 | [self.button2 setIconPosition:IconPositionLeft]; 49 | [self.button2 setTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17], 50 | NSForegroundColorAttributeName:[UIColor whiteColor]} 51 | forUIControlState:UIControlStateNormal]; 52 | [self.button2 setBackgroundColor:[UIColor colorWithRed:27.0f/255 green:178.0f/255 blue:233.0f/255 alpha:1.0] 53 | forUIControlState:UIControlStateNormal]; 54 | [self.button2 setBackgroundColor:[UIColor colorWithRed:60.0f/255 green:89.0f/255 blue:157.0f/255 alpha:1.0] 55 | forUIControlState:UIControlStateHighlighted]; 56 | [self.button2 setRadius:5.0]; 57 | 58 | 59 | [self.button3 setIsAwesome:YES]; 60 | [self.button3 setButtonText:@"Twitter"]; 61 | [self.button3 setButtonIcon:@"icon-twitter"]; 62 | [self.button3 setIconPosition:IconPositionLeft]; 63 | [self.button3 setTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:19], 64 | NSForegroundColorAttributeName:[UIColor whiteColor]} 65 | forUIControlState:UIControlStateNormal]; 66 | [self.button3 setBackgroundColor:[UIColor colorWithRed:27.0f/255 green:178.0f/255 blue:233.0f/255 alpha:1.0] 67 | forUIControlState:UIControlStateNormal]; 68 | [self.button3 setBackgroundColor:[UIColor colorWithRed:60.0f/255 green:89.0f/255 blue:157.0f/255 alpha:1.0] 69 | forUIControlState:UIControlStateHighlighted]; 70 | [self.button3 setRadius:5.0]; 71 | 72 | 73 | [self.button4 setIsAwesome:YES]; 74 | [self.button4 setButtonText:@"Facebook"]; 75 | [self.button4 setButtonIcon:@"icon-facebook"]; 76 | [self.button4 setIconPosition:IconPositionLeft]; 77 | [self.button4 setTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:19], 78 | NSForegroundColorAttributeName:[UIColor whiteColor]} 79 | forUIControlState:UIControlStateNormal]; 80 | [self.button4 setBackgroundColor:[UIColor colorWithRed:27.0f/255 green:178.0f/255 blue:233.0f/255 alpha:1.0] 81 | forUIControlState:UIControlStateHighlighted]; 82 | [self.button4 setBackgroundColor:[UIColor colorWithRed:60.0f/255 green:89.0f/255 blue:157.0f/255 alpha:1.0] 83 | forUIControlState:UIControlStateNormal]; 84 | [self.button4 setRadius:0.0]; 85 | 86 | 87 | [self.button5 setIsAwesome:YES]; 88 | [self.button5 setButtonText:@"Facebook"]; 89 | [self.button5 setButtonIcon:@"icon-facebook"]; 90 | [self.button5 setIconPosition:IconPositionLeft]; 91 | [self.button5 setTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17], 92 | NSForegroundColorAttributeName:[UIColor whiteColor]} 93 | forUIControlState:UIControlStateNormal]; 94 | [self.button5 setBackgroundColor:[UIColor colorWithRed:27.0f/255 green:178.0f/255 blue:233.0f/255 alpha:1.0] 95 | forUIControlState:UIControlStateHighlighted]; 96 | [self.button5 setBackgroundColor:[UIColor colorWithRed:60.0f/255 green:89.0f/255 blue:157.0f/255 alpha:1.0] 97 | forUIControlState:UIControlStateNormal]; 98 | [self.button5 setRadius:0.0]; 99 | 100 | 101 | [self.button6 setIsAwesome:YES]; 102 | [self.button6 setButtonText:@"Facebook"]; 103 | [self.button6 setButtonIcon:@"icon-facebook"]; 104 | [self.button6 setIconPosition:IconPositionLeft]; 105 | [self.button6 setTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], 106 | NSForegroundColorAttributeName:[UIColor whiteColor]} 107 | forUIControlState:UIControlStateNormal]; 108 | [self.button6 setBackgroundColor:[UIColor colorWithRed:27.0f/255 green:178.0f/255 blue:233.0f/255 alpha:1.0] 109 | forUIControlState:UIControlStateHighlighted]; 110 | [self.button6 setBackgroundColor:[UIColor colorWithRed:60.0f/255 green:89.0f/255 blue:157.0f/255 alpha:1.0] 111 | forUIControlState:UIControlStateNormal]; 112 | [self.button6 setRadius:0.0]; 113 | 114 | UIButton *facetime1=[UIButton buttonWithType:UIButtonTypeCustom text:@"Facetime" icon:@"icon-facetime-video" textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15],NSForegroundColorAttributeName:[UIColor whiteColor]} andIconPosition:IconPositionRight]; 115 | [facetime1 setBackgroundColor:[UIColor colorWithRed:40.0f/255 green:219.0f/255 blue:31.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 116 | facetime1.frame=CGRectMake(10, 200, 120, 44); 117 | [facetime1 setRadius:22.0]; 118 | [facetime1 setEnabled:NO]; 119 | [self.view addSubview:facetime1]; 120 | 121 | UIButton *facetime2=[UIButton buttonWithType:UIButtonTypeCustom text:@"" icon:@"icon-facetime-video" textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15],NSForegroundColorAttributeName:[UIColor whiteColor]} andIconPosition:IconPositionRight]; 122 | [facetime2 setBackgroundColor:[UIColor colorWithRed:40.0f/255 green:219.0f/255 blue:31.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 123 | facetime2.frame=CGRectMake(140, 200, 44, 44); 124 | [facetime2 setRadius:22.0]; 125 | [facetime2 setBorderWidth:2.f 126 | borderColor:[UIColor lightGrayColor]]; 127 | [self.view addSubview:facetime2]; 128 | 129 | UIButton *pinterest1=[UIButton buttonWithType:UIButtonTypeCustom text:@"Pin it!" icon:@"icon-html5" textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:32],NSForegroundColorAttributeName:[UIColor whiteColor]} andIconPosition:IconPositionLeft]; 130 | [pinterest1 setBackgroundColor:[UIColor colorWithRed:205.0f/255 green:35.0f/255 blue:44.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 131 | pinterest1.frame=CGRectMake(10, 260, 150, 50); 132 | [pinterest1 setRadius:0.0]; 133 | [self.view addSubview:pinterest1]; 134 | 135 | UIButton *pinterest2=[UIButton buttonWithType:UIButtonTypeCustom text:@"Pin it!" icon:@"icon-pinterest" textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:32],NSForegroundColorAttributeName:[UIColor whiteColor],@"IconFont":[UIFont fontWithName:@"fontawesome" size:20]} andIconPosition:IconPositionLeft]; 136 | [pinterest2 setBackgroundColor:[UIColor colorWithRed:205.0f/255 green:35.0f/255 blue:44.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 137 | [pinterest2 setBackgroundColor:[UIColor colorWithRed:244.0f/255 green:61.0f/255 blue:91.0f/255 alpha:1.0] forUIControlState:UIControlStateHighlighted]; 138 | 139 | pinterest2.frame=CGRectMake(10, 320, 280, 50); 140 | [pinterest2 setRadius:0.0]; 141 | [self.view addSubview:pinterest2]; 142 | 143 | UIButton *pinterest3=[UIButton buttonWithType:UIButtonTypeCustom text:@"Pin it!" icon:nil textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:32],NSForegroundColorAttributeName:[UIColor whiteColor]} andIconPosition:IconPositionLeft]; 144 | [pinterest3 setBackgroundColor:[UIColor colorWithRed:205.0f/255 green:35.0f/255 blue:44.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 145 | [pinterest3 setBackgroundColor:[UIColor colorWithRed:244.0f/255 green:61.0f/255 blue:91.0f/255 alpha:1.0] forUIControlState:UIControlStateHighlighted]; 146 | pinterest3.frame=CGRectMake(10, 380, 280, 50); 147 | [pinterest3 setRadius:0.0]; 148 | [pinterest3 setSeparation:15]; 149 | [self.view addSubview:pinterest3]; 150 | 151 | 152 | UIAwesomeButton *button4 = [[UIAwesomeButton alloc] initWithFrame:CGRectMake(10, 440, 280, 50) text:@"Testinggggg" iconImage:[UIImage imageNamed:@"bell.png"] attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:15], NSForegroundColorAttributeName : [UIColor whiteColor], @"IconFont" : [UIFont fontWithName:@"fontawesome" size:40]} andIconPosition:IconPositionLeft]; 153 | [button4 setBackgroundColor:[UIColor colorWithRed:205.0f/255 green:35.0f/255 blue:44.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 154 | [button4 setBackgroundColor:[UIColor colorWithRed:244.0f/255 green:61.0f/255 blue:91.0f/255 alpha:1.0] forUIControlState:UIControlStateHighlighted]; 155 | [button4 setRadius:3.0]; 156 | [button4 setSeparation:2]; 157 | [button4 setTextAlignment:NSTextAlignmentRight]; 158 | [button4 setButtonText:[NSString stringWithFormat:@"%@",@"Project!"]]; 159 | [button4 setAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], NSForegroundColorAttributeName:[UIColor whiteColor]} forUIControlState:UIControlStateNormal]; 160 | [button4 setButtonText:[NSString stringWithFormat:@"%@",@"Project!"]]; 161 | [button4 setAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], NSForegroundColorAttributeName:[UIColor whiteColor]} forUIControlState:UIControlStateNormal]; [button4 setButtonText:[NSString stringWithFormat:@"%@",@"Project!"]]; 162 | [button4 setAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], NSForegroundColorAttributeName:[UIColor whiteColor]} forUIControlState:UIControlStateNormal]; 163 | [button4 setActionBlock:^(UIAwesomeButton *button) { 164 | NSLog(@"Working!"); 165 | }]; 166 | [self.view addSubview:button4]; 167 | 168 | } 169 | 170 | - (void)didReceiveMemoryWarning 171 | { 172 | [super didReceiveMemoryWarning]; 173 | // Dispose of any resources that can be recreated. 174 | } 175 | -(void)buttonAction{ 176 | NSLog(@"Press button"); 177 | } 178 | 179 | @end 180 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/en.lproj/MainStoryboard.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/PPiAwesomeButton-Demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PPiAwesomeButton-Demo 4 | // 5 | // Created by Pedro Piñera Buendía on 19/08/13. 6 | // Copyright (c) 2013 PPinera. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '7.0' 3 | pod 'FontAwesome+iOS' 4 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FontAwesome+iOS (0.1.4) 3 | 4 | DEPENDENCIES: 5 | - FontAwesome+iOS 6 | 7 | SPEC CHECKSUMS: 8 | FontAwesome+iOS: 816c20304edef4ca92835de669577005cbaaf261 9 | 10 | COCOAPODS: 0.34.2 11 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/FontAwesome+iOS/FAImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FAImageView.m 3 | // 4 | // Copyright (c) 2012 Alex Usbergo. All rights reserved. 5 | // 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // 24 | // An UIImageView with the support of displaying 25 | // a vectorial icon (by using the fontawesome iconic font) 26 | // if the image is missing 27 | 28 | 29 | #import 30 | #import "NSString+FontAwesome.h" 31 | 32 | @interface FAImageView : UIImageView 33 | 34 | /* The background color for the default view displayed when the image is missing */ 35 | @property (nonatomic, strong) UIColor *defaultIconColor UI_APPEARANCE_SELECTOR; 36 | 37 | /* Set the icon using the fontawesome icon's identifier */ 38 | @property (nonatomic, strong) NSString *defaultIconIdentifier; 39 | 40 | /* Set the icon using the icon enumerations */ 41 | @property (nonatomic, assign) FAIcon defaultIcon; 42 | 43 | /* The view that is displayed when the image is set to nil */ 44 | @property (nonatomic, strong) UILabel *defaultView; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/FontAwesome+iOS/FAImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FAImageView.m 3 | // 4 | // Copyright (c) 2012 Alex Usbergo. All rights reserved. 5 | // 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // 24 | // An UIImageView with the support of displaying 25 | // a vectorial icon (by using the fontawesome iconic font) 26 | // if the image is missing 27 | 28 | 29 | #import "FAImageView.h" 30 | #import "UIFont+FontAwesome.h" 31 | 32 | @implementation FAImageView 33 | 34 | /* When the image is set to nil the defaultView will be added as subview, 35 | * otherwise it will be removed */ 36 | - (void)setImage:(UIImage*)image 37 | { 38 | [super setImage:image]; 39 | self.defaultView.hidden = (nil != image); 40 | } 41 | 42 | #pragma mark - Toggle the icon view 43 | 44 | /* Lazy initialization of the view */ 45 | - (UILabel*)defaultView 46 | { 47 | if (nil != _defaultView) 48 | return _defaultView; 49 | 50 | //The size of the default view is the same of self 51 | _defaultView = [[UILabel alloc] initWithFrame:self.bounds]; 52 | _defaultView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 53 | 54 | //The default icon is the ban icon 55 | [self setDefaultIcon:FAIconBanCircle]; 56 | 57 | _defaultView.font = [UIFont iconicFontOfSize:self.bounds.size.height]; 58 | _defaultView.textAlignment = NSTextAlignmentCenter; 59 | _defaultView.adjustsFontSizeToFitWidth = YES; 60 | 61 | //UIAppearance selectors 62 | _defaultView.textColor = [UIColor whiteColor]; 63 | _defaultView.backgroundColor = [UIColor colorWithRed:.9f green:.9f blue:.9f alpha:1.f]; 64 | 65 | //It starts hidden 66 | _defaultView.hidden = YES; 67 | 68 | [self addSubview:_defaultView]; 69 | 70 | return _defaultView; 71 | } 72 | 73 | #pragma mark - Properties 74 | 75 | - (void)setDefaultIconIdentifier:(NSString*)defaultIconIdentifier 76 | { 77 | self.defaultIcon = [NSString fontAwesomeEnumForIconIdentifier:defaultIconIdentifier]; 78 | } 79 | 80 | - (void)setDefaultIcon:(FAIcon)defaultIcon 81 | { 82 | _defaultIcon = defaultIcon; 83 | _defaultView.text = [NSString fontAwesomeIconStringForEnum:defaultIcon]; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/FontAwesome+iOS/NSString+FontAwesome.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+FontAwesome.m 3 | // 4 | // Copyright (c) 2012 Alex Usbergo. All rights reserved. 5 | // 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // 24 | 25 | #import "NSString+FontAwesome.h" 26 | 27 | @implementation NSString (FontAwesome) 28 | 29 | #pragma mark - Public API 30 | + (FAIcon)fontAwesomeEnumForIconIdentifier:(NSString*)string { 31 | NSDictionary *enums = [self enumDictionary]; 32 | return [enums[string] integerValue]; 33 | } 34 | 35 | + (NSString*)fontAwesomeIconStringForEnum:(FAIcon)value { 36 | return [NSString fontAwesomeUnicodeStrings][value]; 37 | } 38 | 39 | + (NSString*)fontAwesomeIconStringForIconIdentifier:(NSString*)identifier { 40 | return [self fontAwesomeIconStringForEnum:[self fontAwesomeEnumForIconIdentifier:identifier]]; 41 | } 42 | 43 | #pragma mark - Data Initialization 44 | + (NSArray *)fontAwesomeUnicodeStrings { 45 | 46 | static NSArray *fontAwesomeUnicodeStrings; 47 | 48 | static dispatch_once_t unicodeStringsOnceToken; 49 | dispatch_once(&unicodeStringsOnceToken, ^{ 50 | 51 | fontAwesomeUnicodeStrings = @[@"\uf000", @"\uf001", @"\uf002", @"\uf003", @"\uf004", @"\uf005", @"\uf006", @"\uf007", @"\uf008", @"\uf009", 52 | @"\uf00a", @"\uf00b", @"\uf00c", @"\uf00d", @"\uf00e", @"\uf010", @"\uf011", @"\uf011", @"\uf012", @"\uf013", 53 | @"\uf013", @"\uf014", @"\uf015", @"\uf016", @"\uf017", @"\uf018", @"\uf019", @"\uf01a", @"\uf01b", @"\uf01c", 54 | @"\uf01d", @"\uf01e", @"\uf01e", @"\uf021", @"\uf022", @"\uf023", @"\uf024", @"\uf025", @"\uf026", @"\uf027", 55 | @"\uf028", @"\uf029", @"\uf02a", @"\uf02b", @"\uf02c", @"\uf02d", @"\uf02e", @"\uf02f", @"\uf030", @"\uf031", 56 | @"\uf032", @"\uf033", @"\uf034", @"\uf035", @"\uf036", @"\uf037", @"\uf038", @"\uf039", @"\uf03a", @"\uf03b", 57 | @"\uf03c", @"\uf03d", @"\uf03e", @"\uf040", @"\uf041", @"\uf042", @"\uf043", @"\uf044", @"\uf045", @"\uf046", 58 | @"\uf047", @"\uf048", @"\uf049", @"\uf04a", @"\uf04b", @"\uf04c", @"\uf04d", @"\uf04e", @"\uf050", @"\uf051", 59 | @"\uf052", @"\uf053", @"\uf054", @"\uf055", @"\uf056", @"\uf057", @"\uf058", @"\uf059", @"\uf05a", @"\uf05b", 60 | @"\uf05c", @"\uf05d", @"\uf05e", @"\uf060", @"\uf061", @"\uf062", @"\uf063", @"\uf064", @"\uf064", @"\uf065", 61 | @"\uf066", @"\uf067", @"\uf068", @"\uf069", @"\uf06a", @"\uf06b", @"\uf06c", @"\uf06d", @"\uf06e", @"\uf070", 62 | @"\uf071", @"\uf072", @"\uf073", @"\uf074", @"\uf075", @"\uf076", @"\uf077", @"\uf078", @"\uf079", @"\uf07a", 63 | @"\uf07b", @"\uf07c", @"\uf07d", @"\uf07e", @"\uf080", @"\uf081", @"\uf082", @"\uf083", @"\uf084", @"\uf085", 64 | @"\uf085", @"\uf086", @"\uf087", @"\uf088", @"\uf089", @"\uf08a", @"\uf08b", @"\uf08c", @"\uf08d", @"\uf08e", 65 | @"\uf090", @"\uf091", @"\uf092", @"\uf093", @"\uf094", @"\uf095", @"\uf096", @"\uf096", @"\uf097", @"\uf098", 66 | @"\uf099", @"\uf09a", @"\uf09b", @"\uf09c", @"\uf09d", @"\uf09e", @"\uf0a0", @"\uf0a1", @"\uf0a2", @"\uf0a3", 67 | @"\uf0a4", @"\uf0a5", @"\uf0a6", @"\uf0a7", @"\uf0a8", @"\uf0a9", @"\uf0aa", @"\uf0ab", @"\uf0ac", @"\uf0ad", 68 | @"\uf0ae", @"\uf0b0", @"\uf0b1", @"\uf0b2", @"\uf0c0", @"\uf0c1", @"\uf0c2", @"\uf0c3", @"\uf0c4", @"\uf0c5", 69 | @"\uf0c6", @"\uf0c7", @"\uf0c8", @"\uf0c9", @"\uf0ca", @"\uf0cb", @"\uf0cc", @"\uf0cd", @"\uf0ce", @"\uf0d0", 70 | @"\uf0d1", @"\uf0d2", @"\uf0d3", @"\uf0d4", @"\uf0d5", @"\uf0d6", @"\uf0d7", @"\uf0d8", @"\uf0d9", @"\uf0da", 71 | @"\uf0db", @"\uf0dc", @"\uf0dd", @"\uf0de", @"\uf0e0", @"\uf0e1", @"\uf0e2", @"\uf0e2", @"\uf0e3", @"\uf0e4", 72 | @"\uf0e5", @"\uf0e6", @"\uf0e7", @"\uf0e8", @"\uf0e9", @"\uf0ea", @"\uf0eb", @"\uf0ec", @"\uf0ed", @"\uf0ee", 73 | @"\uf0f0", @"\uf0f1", @"\uf0f2", @"\uf0f3", @"\uf0f4", @"\uf0f5", @"\uf0f6", @"\uf0f7", @"\uf0f8", @"\uf0f9", 74 | @"\uf0fa", @"\uf0fb", @"\uf0fc", @"\uf0fd", @"\uf0fe", @"\uf100", @"\uf101", @"\uf102", @"\uf103", @"\uf104", 75 | @"\uf105", @"\uf106", @"\uf107", @"\uf108", @"\uf109", @"\uf10a", @"\uf10b", @"\uf10c", @"\uf10d", @"\uf10e", 76 | @"\uf110", @"\uf111", @"\uf112", @"\uf112", @"\uf113", @"\uf114", @"\uf115", @"\uf116", @"\uf117", @"\uf118", 77 | @"\uf119", @"\uf11a", @"\uf11b", @"\uf11c", @"\uf11d", @"\uf11e", @"\uf120", @"\uf121", @"\uf122", @"\uf122", 78 | @"\uf123", @"\uf123", @"\uf124", @"\uf125", @"\uf126", @"\uf127", @"\uf128", @"\uf129", @"\uf12a", @"\uf12b", 79 | @"\uf12c", @"\uf12d", @"\uf12e", @"\uf130", @"\uf131", @"\uf132", @"\uf133", @"\uf134", @"\uf135", @"\uf136", 80 | @"\uf137", @"\uf138", @"\uf139", @"\uf13a", @"\uf13b", @"\uf13c", @"\uf13d", @"\uf13e", @"\uf140", @"\uf141", 81 | @"\uf142", @"\uf143", @"\uf144", @"\uf145", @"\uf146", @"\uf147", @"\uf148", @"\uf149", @"\uf14a", @"\uf14b", 82 | @"\uf14c", @"\uf14d", @"\uf14e", @"\uf150", @"\uf151", @"\uf152", @"\uf153", @"\uf153", @"\uf154", @"\uf155", 83 | @"\uf155", @"\uf156", @"\uf156", @"\uf157", @"\uf157", @"\uf158", @"\uf158", @"\uf159", @"\uf159", @"\uf15a", 84 | @"\uf15a", @"\uf15a", @"\uf15b", @"\uf15c", @"\uf15d", @"\uf15e", @"\uf160", @"\uf161", @"\uf162", @"\uf163", 85 | @"\uf164", @"\uf165", @"\uf166", @"\uf167", @"\uf168", @"\uf169", @"\uf16a", @"\uf16b", @"\uf16c", @"\uf16d", 86 | @"\uf16e", @"\uf170", @"\uf171", @"\uf172", @"\uf173", @"\uf174", @"\uf175", @"\uf176", @"\uf177", @"\uf178", 87 | @"\uf179", @"\uf17a", @"\uf17b", @"\uf17c", @"\uf17d", @"\uf17e", @"\uf180", @"\uf181", @"\uf182", @"\uf183", 88 | @"\uf184", @"\uf185", @"\uf186", @"\uf187", @"\uf188", @"\uf189", @"\uf18a", @"\uf18b", @"\uf209", @"\uf207", 89 | @"\uf1f2", @"\uf1ee", @"\uf203", @"\uf1fc", @"\uf20b", @"\uf204", @"\uf1e8", @"\uf1fe", @"\uf206", @"\uf1ec", 90 | @"\uf1f1", @"\uf1f9", @"\uf201", @"\uf1ed", @"\uf205", @"\uf1eb", @"\uf1fa", @"\uf1e5", @"\uf20a", @"\uf1f4", 91 | @"\uf1fb", @"\uf208", @"\uf20c", @"\uf200", @"\uf1e7", @"\uf1f8", @"\uf1e9", @"\uf1f6", @"\uf1fd", @"\uf1f3", 92 | @"\uf1f5", @"\uf1e3", @"\uf202", @"\uf1ea", @"\uf1e6", @"\uf1e4"]; 93 | 94 | }); 95 | 96 | return fontAwesomeUnicodeStrings; 97 | } 98 | 99 | + (NSDictionary *)enumDictionary { 100 | 101 | static NSDictionary *enumDictionary; 102 | 103 | static dispatch_once_t enumDictionaryOnceToken; 104 | dispatch_once(&enumDictionaryOnceToken, ^{ 105 | 106 | NSMutableDictionary *tmp = [[NSMutableDictionary alloc] init]; 107 | tmp[@"icon-glass"] = @(FAIconGlass); 108 | tmp[@"icon-music"] = @(FAIconMusic); 109 | tmp[@"icon-search"] = @(FAIconSearch); 110 | tmp[@"icon-envelope-alt"] = @(FAIconEnvelopeAlt); 111 | tmp[@"icon-heart"] = @(FAIconHeart); 112 | tmp[@"icon-star"] = @(FAIconStar); 113 | tmp[@"icon-star-empty"] = @(FAIconStarEmpty); 114 | tmp[@"icon-user"] = @(FAIconUser); 115 | tmp[@"icon-film"] = @(FAIconFilm); 116 | tmp[@"icon-th-large"] = @(FAIconThLarge); 117 | tmp[@"icon-th"] = @(FAIconTh); 118 | tmp[@"icon-th-list"] = @(FAIconThList); 119 | tmp[@"icon-ok"] = @(FAIconOk); 120 | tmp[@"icon-remove"] = @(FAIconRemove); 121 | tmp[@"icon-zoom-in"] = @(FAIconZoomIn); 122 | tmp[@"icon-zoom-out"] = @(FAIconZoomOut); 123 | tmp[@"icon-off"] = @(FAIconOff); 124 | tmp[@"icon-power-off"] = @(FAIconPowerOff); 125 | tmp[@"icon-signal"] = @(FAIconSignal); 126 | tmp[@"icon-cog"] = @(FAIconCog); 127 | tmp[@"icon-Gear"] = @(FAIconGear); 128 | tmp[@"icon-trash"] = @(FAIconTrash); 129 | tmp[@"icon-home"] = @(FAIconHome); 130 | tmp[@"icon-file-alt"] = @(FAIconFileAlt); 131 | tmp[@"icon-time"] = @(FAIconTime); 132 | tmp[@"icon-road"] = @(FAIconRoad); 133 | tmp[@"icon-download-alt"] = @(FAIconDownloadAlt); 134 | tmp[@"icon-download"] = @(FAIconDownload); 135 | tmp[@"icon-upload"] = @(FAIconUpload); 136 | tmp[@"icon-inbox"] = @(FAIconInbox); 137 | tmp[@"icon-play-circle"] = @(FAIconPlayCircle); 138 | tmp[@"icon-repeat"] = @(FAIconRepeat); 139 | tmp[@"icon-rotate-right"] = @(FAIconRotateRight); 140 | tmp[@"icon-refresh"] = @(FAIconRefresh); 141 | tmp[@"icon-list-alt"] = @(FAIconListAlt); 142 | tmp[@"icon-lock"] = @(FAIconLock); 143 | tmp[@"icon-flag"] = @(FAIconFlag); 144 | tmp[@"icon-headphones"] = @(FAIconHeadphones); 145 | tmp[@"icon-volume-off"] = @(FAIconVolumeOff); 146 | tmp[@"icon-volume-down"] = @(FAIconVolumeDown); 147 | tmp[@"icon-volume-up"] = @(FAIconVolumeUp); 148 | tmp[@"icon-qrcode"] = @(FAIconQrcode); 149 | tmp[@"icon-barcode"] = @(FAIconBarcode); 150 | tmp[@"icon-tag"] = @(FAIconTag); 151 | tmp[@"icon-tags"] = @(FAIconTags); 152 | tmp[@"icon-book"] = @(FAIconBook); 153 | tmp[@"icon-bookmark"] = @(FAIconBookmark); 154 | tmp[@"icon-print"] = @(FAIconPrint); 155 | tmp[@"icon-camera"] = @(FAIconCamera); 156 | tmp[@"icon-font"] = @(FAIconFont); 157 | tmp[@"icon-bold"] = @(FAIconBold); 158 | tmp[@"icon-italic"] = @(FAIconItalic); 159 | tmp[@"icon-text-height"] = @(FAIconTextHeight); 160 | tmp[@"icon-text-width"] = @(FAIconTextWidth); 161 | tmp[@"icon-align-left"] = @(FAIconAlignLeft); 162 | tmp[@"icon-align-center"] = @(FAIconAlignCenter); 163 | tmp[@"icon-align-right"] = @(FAIconAlignRight); 164 | tmp[@"icon-align-justify"] = @(FAIconAlignJustify); 165 | tmp[@"icon-list"] = @(FAIconList); 166 | tmp[@"icon-indent-left"] = @(FAIconIndentLeft); 167 | tmp[@"icon-indent-right"] = @(FAIconIndentRight); 168 | tmp[@"icon-facetime-video"] = @(FAIconFacetimeVideo); 169 | tmp[@"icon-picture"] = @(FAIconPicture); 170 | tmp[@"icon-pencil"] = @(FAIconPencil); 171 | tmp[@"icon-map-marker"] = @(FAIconMapMarker); 172 | tmp[@"icon-adjust"] = @(FAIconAdjust); 173 | tmp[@"icon-tint"] = @(FAIconTint); 174 | tmp[@"icon-edit"] = @(FAIconEdit); 175 | tmp[@"icon-share"] = @(FAIconShare); 176 | tmp[@"icon-check"] = @(FAIconCheck); 177 | tmp[@"icon-move"] = @(FAIconMove); 178 | tmp[@"icon-step-backward"] = @(FAIconStepBackward); 179 | tmp[@"icon-fast-backward"] = @(FAIconFastBackward); 180 | tmp[@"icon-backward"] = @(FAIconBackward); 181 | tmp[@"icon-play"] = @(FAIconPlay); 182 | tmp[@"icon-pause"] = @(FAIconPause); 183 | tmp[@"icon-stop"] = @(FAIconStop); 184 | tmp[@"icon-forward"] = @(FAIconForward); 185 | tmp[@"icon-fast-forward"] = @(FAIconFastForward); 186 | tmp[@"icon-step-forward"] = @(FAIconStepForward); 187 | tmp[@"icon-eject"] = @(FAIconEject); 188 | tmp[@"icon-chevron-left"] = @(FAIconChevronLeft); 189 | tmp[@"icon-chevron-right"] = @(FAIconChevronRight); 190 | tmp[@"icon-plus-sign"] = @(FAIconPlusSign); 191 | tmp[@"icon-minus-sign"] = @(FAIconMinusSign); 192 | tmp[@"icon-remove-sign"] = @(FAIconRemoveSign); 193 | tmp[@"icon-ok-sign"] = @(FAIconOkSign); 194 | tmp[@"icon-question-sign"] = @(FAIconQuestionSign); 195 | tmp[@"icon-info-sign"] = @(FAIconInfoSign); 196 | tmp[@"icon-screenshot"] = @(FAIconScreenshot); 197 | tmp[@"icon-remove-circle"] = @(FAIconRemoveCircle); 198 | tmp[@"icon-ok-circle"] = @(FAIconOkCircle); 199 | tmp[@"icon-ban-circle"] = @(FAIconBanCircle); 200 | tmp[@"icon-arrow-left"] = @(FAIconArrowLeft); 201 | tmp[@"icon-arrow-right"] = @(FAIconArrowRight); 202 | tmp[@"icon-arrow-up"] = @(FAIconArrowUp); 203 | tmp[@"icon-arrow-down"] = @(FAIconArrowDown); 204 | tmp[@"icon-share-alt"] = @(FAIconShareAlt); 205 | tmp[@"icon-mail-forward"] = @(FAIconMailForward); 206 | tmp[@"icon-resize-full"] = @(FAIconResizeFull); 207 | tmp[@"icon-resize-small"] = @(FAIconResizeSmall); 208 | tmp[@"icon-plus"] = @(FAIconPlus); 209 | tmp[@"icon-minus"] = @(FAIconMinus); 210 | tmp[@"icon-asterisk"] = @(FAIconAsterisk); 211 | tmp[@"icon-exclamation-sign"] = @(FAIconExclamationSign); 212 | tmp[@"icon-gift"] = @(FAIconGift); 213 | tmp[@"icon-leaf"] = @(FAIconLeaf); 214 | tmp[@"icon-fire"] = @(FAIconFire); 215 | tmp[@"icon-eye-open"] = @(FAIconEyeOpen); 216 | tmp[@"icon-eye-close"] = @(FAIconEyeClose); 217 | tmp[@"icon-warning-sign"] = @(FAIconWarningSign); 218 | tmp[@"icon-plane"] = @(FAIconPlane); 219 | tmp[@"icon-calendar"] = @(FAIconCalendar); 220 | tmp[@"icon-random"] = @(FAIconRandom); 221 | tmp[@"icon-comment"] = @(FAIconComment); 222 | tmp[@"icon-magnet"] = @(FAIconMagnet); 223 | tmp[@"icon-chevron-up"] = @(FAIconChevronUp); 224 | tmp[@"icon-chevron-down"] = @(FAIconChevronDown); 225 | tmp[@"icon-retweet"] = @(FAIconRetweet); 226 | tmp[@"icon-shopping-cart"] = @(FAIconShoppingCart); 227 | tmp[@"icon-folder-close"] = @(FAIconFolderClose); 228 | tmp[@"icon-folder-open"] = @(FAIconFolderOpen); 229 | tmp[@"icon-resize-vertical"] = @(FAIconResizeVertical); 230 | tmp[@"icon-resize-horizontal"] = @(FAIconResizeHorizontal); 231 | tmp[@"icon-bar-chart"] = @(FAIconBarChart); 232 | tmp[@"icon-twitter-sign"] = @(FAIconTwitterSign); 233 | tmp[@"icon-facebook-sign"] = @(FAIconFacebookSign); 234 | tmp[@"icon-camera-retro"] = @(FAIconCameraRetro); 235 | tmp[@"icon-key"] = @(FAIconKey); 236 | tmp[@"icon-cogs"] = @(FAIconCogs); 237 | tmp[@"icon-gears"] = @(FAIconGears); 238 | tmp[@"icon-comments"] = @(FAIconComments); 239 | tmp[@"icon-thumbs-up-alt"] = @(FAIconThumbsUpAlt); 240 | tmp[@"icon-thumbs-down-alt"] = @(FAIconThumbsDownAlt); 241 | tmp[@"icon-star-half"] = @(FAIconStarHalf); 242 | tmp[@"icon-heart-empty"] = @(FAIconHeartEmpty); 243 | tmp[@"icon-signout"] = @(FAIconSignout); 244 | tmp[@"icon-linkedin-sign"] = @(FAIconLinkedinSign); 245 | tmp[@"icon-pushpin"] = @(FAIconPushpin); 246 | tmp[@"icon-external-link"] = @(FAIconExternalLink); 247 | tmp[@"icon-signin"] = @(FAIconSignin); 248 | tmp[@"icon-trophy"] = @(FAIconTrophy); 249 | tmp[@"icon-github-sign"] = @(FAIconGithubSign); 250 | tmp[@"icon-upload-alt"] = @(FAIconUploadAlt); 251 | tmp[@"icon-lemon"] = @(FAIconLemon); 252 | tmp[@"icon-phone"] = @(FAIconPhone); 253 | tmp[@"icon-check-empty"] = @(FAIconCheckEmpty); 254 | tmp[@"icon-unchecked"] = @(FAIconUnchecked); 255 | tmp[@"icon-bookmark-empty"] = @(FAIconBookmarkEmpty); 256 | tmp[@"icon-phone-sign"] = @(FAIconPhoneSign); 257 | tmp[@"icon-twitter"] = @(FAIconTwitter); 258 | tmp[@"icon-facebook"] = @(FAIconFacebook); 259 | tmp[@"icon-github"] = @(FAIconGithub); 260 | tmp[@"icon-unlock"] = @(FAIconUnlock); 261 | tmp[@"icon-credit-card"] = @(FAIconCreditCard); 262 | tmp[@"icon-rss"] = @(FAIconRss); 263 | tmp[@"icon-hdd"] = @(FAIconHdd); 264 | tmp[@"icon-bullhorn"] = @(FAIconBullhorn); 265 | tmp[@"icon-bell"] = @(FAIconBell); 266 | tmp[@"icon-certificate"] = @(FAIconCertificate); 267 | tmp[@"icon-hand-right"] = @(FAIconHandRight); 268 | tmp[@"icon-hand-left"] = @(FAIconHandLeft); 269 | tmp[@"icon-hand-up"] = @(FAIconHandUp); 270 | tmp[@"icon-hand-down"] = @(FAIconHandDown); 271 | tmp[@"icon-circle-arrow-left"] = @(FAIconCircleArrowLeft); 272 | tmp[@"icon-circle-arrow-right"] = @(FAIconCircleArrowRight); 273 | tmp[@"icon-circle-arrow-up"] = @(FAIconCircleArrowUp); 274 | tmp[@"icon-circle-arrow-down"] = @(FAIconCircleArrowDown); 275 | tmp[@"icon-globe"] = @(FAIconGlobe); 276 | tmp[@"icon-wrench"] = @(FAIconWrench); 277 | tmp[@"icon-tasks"] = @(FAIconTasks); 278 | tmp[@"icon-filter"] = @(FAIconFilter); 279 | tmp[@"icon-briefcase"] = @(FAIconBriefcase); 280 | tmp[@"icon-fullscreen"] = @(FAIconFullscreen); 281 | tmp[@"icon-group"] = @(FAIconGroup); 282 | tmp[@"icon-link"] = @(FAIconLink); 283 | tmp[@"icon-cloud"] = @(FAIconCloud); 284 | tmp[@"icon-beaker"] = @(FAIconBeaker); 285 | tmp[@"icon-cut"] = @(FAIconCut); 286 | tmp[@"icon-copy"] = @(FAIconCopy); 287 | tmp[@"icon-paper-clip"] = @(FAIconPaperClip); 288 | tmp[@"icon-save"] = @(FAIconSave); 289 | tmp[@"icon-sign-blank"] = @(FAIconSignBlank); 290 | tmp[@"icon-reorder"] = @(FAIconReorder); 291 | tmp[@"icon-list-ul"] = @(FAIconListUl); 292 | tmp[@"icon-list-ol"] = @(FAIconListOl); 293 | tmp[@"icon-strikethrough"] = @(FAIconStrikethrough); 294 | tmp[@"icon-underline"] = @(FAIconUnderline); 295 | tmp[@"icon-table"] = @(FAIconTable); 296 | tmp[@"icon-magic"] = @(FAIconMagic); 297 | tmp[@"icon-truck"] = @(FAIconTruck); 298 | tmp[@"icon-pinterest"] = @(FAIconPinterest); 299 | tmp[@"icon-pinterest-sign"] = @(FAIconPinterestSign); 300 | tmp[@"icon-google-plus-sign"] = @(FAIconGooglePlusSign); 301 | tmp[@"icon-google-plus"] = @(FAIconGooglePlus); 302 | tmp[@"icon-money"] = @(FAIconMoney); 303 | tmp[@"icon-caret-down"] = @(FAIconCaretDown); 304 | tmp[@"icon-caret-up"] = @(FAIconCaretUp); 305 | tmp[@"icon-caret-left"] = @(FAIconCaretLeft); 306 | tmp[@"icon-caret-right"] = @(FAIconCaretRight); 307 | tmp[@"icon-columns"] = @(FAIconColumns); 308 | tmp[@"icon-sort"] = @(FAIconSort); 309 | tmp[@"icon-sort-down"] = @(FAIconSortDown); 310 | tmp[@"icon-sort-up"] = @(FAIconSortUp); 311 | tmp[@"icon-envelope"] = @(FAIconEnvelope); 312 | tmp[@"icon-linkedin"] = @(FAIconLinkedin); 313 | tmp[@"icon-undo"] = @(FAIconUndo); 314 | tmp[@"icon-rotate-left"] = @(FAIconRotateLeft); 315 | tmp[@"icon-legal"] = @(FAIconLegal); 316 | tmp[@"icon-dashboard"] = @(FAIconDashboard); 317 | tmp[@"icon-comment-alt"] = @(FAIconCommentAlt); 318 | tmp[@"icon-comments-alt"] = @(FAIconCommentsAlt); 319 | tmp[@"icon-bolt"] = @(FAIconBolt); 320 | tmp[@"icon-sitemap"] = @(FAIconSitemap); 321 | tmp[@"icon-umbrella"] = @(FAIconUmbrella); 322 | tmp[@"icon-paste"] = @(FAIconPaste); 323 | tmp[@"icon-lightbulb"] = @(FAIconLightbulb); 324 | tmp[@"icon-exchange"] = @(FAIconExchange); 325 | tmp[@"icon-cloud-download"] = @(FAIconCloudDownload); 326 | tmp[@"icon-cloud-upload"] = @(FAIconCloudUpload); 327 | tmp[@"icon-user-md"] = @(FAIconUserMd); 328 | tmp[@"icon-stethoscope"] = @(FAIconStethoscope); 329 | tmp[@"icon-suitcase"] = @(FAIconSuitcase); 330 | tmp[@"icon-bell-alt"] = @(FAIconBellAlt); 331 | tmp[@"icon-coffee"] = @(FAIconCoffee); 332 | tmp[@"icon-food"] = @(FAIconFood); 333 | tmp[@"icon-file-text-alt"] = @(FAIconFileTextAlt); 334 | tmp[@"icon-building"] = @(FAIconBuilding); 335 | tmp[@"icon-hospital"] = @(FAIconHospital); 336 | tmp[@"icon-ambulance"] = @(FAIconAmbulance); 337 | tmp[@"icon-medkit"] = @(FAIconMedkit); 338 | tmp[@"icon-fighter-jet"] = @(FAIconFighterJet); 339 | tmp[@"icon-beer"] = @(FAIconBeer); 340 | tmp[@"icon-h-sign"] = @(FAIconHSign); 341 | tmp[@"icon-plus-sign-alt"] = @(FAIconPlusSignAlt); 342 | tmp[@"icon-double-angle-left"] = @(FAIconDoubleAngleLeft); 343 | tmp[@"icon-double-angle-right"] = @(FAIconDoubleAngleRight); 344 | tmp[@"icon-double-angle-up"] = @(FAIconDoubleAngleUp); 345 | tmp[@"icon-double-angle-down"] = @(FAIconDoubleAngleDown); 346 | tmp[@"icon-angle-left"] = @(FAIconAngleLeft); 347 | tmp[@"icon-angle-right"] = @(FAIconAngleRight); 348 | tmp[@"icon-angle-up"] = @(FAIconAngleUp); 349 | tmp[@"icon-angle-down"] = @(FAIconAngleDown); 350 | tmp[@"icon-desktop"] = @(FAIconDesktop); 351 | tmp[@"icon-laptop"] = @(FAIconLaptop); 352 | tmp[@"icon-tablet"] = @(FAIconTablet); 353 | tmp[@"icon-mobile-phone"] = @(FAIconMobilePhone); 354 | tmp[@"icon-circle-blank"] = @(FAIconCircleBlank); 355 | tmp[@"icon-quote-left"] = @(FAIconQuoteLeft); 356 | tmp[@"icon-quote-right"] = @(FAIconQuoteRight); 357 | tmp[@"icon-spinner"] = @(FAIconSpinner); 358 | tmp[@"icon-circle"] = @(FAIconCircle); 359 | tmp[@"icon-reply"] = @(FAIconReply); 360 | tmp[@"icon-mail-reply"] = @(FAIconMailReply); 361 | tmp[@"icon-github-alt"] = @(FAIconGithubAlt); 362 | tmp[@"icon-folder-close-alt"] = @(FAIconFolderCloseAlt); 363 | tmp[@"icon-folder-open-alt"] = @(FAIconFolderOpenAlt); 364 | tmp[@"icon-expand-alt"] = @(FAIconExpandAlt); 365 | tmp[@"icon-collapse-alt"] = @(FAIconCollapseAlt); 366 | tmp[@"icon-smile"] = @(FAIconSmile); 367 | tmp[@"icon-frown"] = @(FAIconFrown); 368 | tmp[@"icon-meh"] = @(FAIconMeh); 369 | tmp[@"icon-gamepad"] = @(FAIconGamepad); 370 | tmp[@"icon-keyboard"] = @(FAIconKeyboard); 371 | tmp[@"icon-flag-alt"] = @(FAIconFlagAlt); 372 | tmp[@"icon-flag-checkered"] = @(FAIconFlagCheckered); 373 | tmp[@"icon-terminal"] = @(FAIconTerminal); 374 | tmp[@"icon-code"] = @(FAIconCode); 375 | tmp[@"icon-reply-all"] = @(FAIconReplyAll); 376 | tmp[@"icon-mail-reply-all"] = @(FAIconMailReplyAll); 377 | tmp[@"icon-star-half-empty"] = @(FAIconStarHalfEmpty); 378 | tmp[@"icon-star-half-full"] = @(FAIconStarHalfFull); 379 | tmp[@"icon-location-arrow"] = @(FAIconLocationArrow); 380 | tmp[@"icon-crop"] = @(FAIconCrop); 381 | tmp[@"icon-code-fork"] = @(FAIconCodeFork); 382 | tmp[@"icon-unlink"] = @(FAIconUnlink); 383 | tmp[@"icon-question"] = @(FAIconQuestion); 384 | tmp[@"icon-info"] = @(FAIconInfo); 385 | tmp[@"icon-exclamation"] = @(FAIconExclamation); 386 | tmp[@"icon-superscript"] = @(FAIconSuperscript); 387 | tmp[@"icon-subscript"] = @(FAIconSubscript); 388 | tmp[@"icon-eraser"] = @(FAIconEraser); 389 | tmp[@"icon-puzzle-piece"] = @(FAIconPuzzlePiece); 390 | tmp[@"icon-microphone"] = @(FAIconMicrophone); 391 | tmp[@"icon-microphone-off"] = @(FAIconMicrophoneOff); 392 | tmp[@"icon-shield"] = @(FAIconShield); 393 | tmp[@"icon-calendar-empty"] = @(FAIconCalendarEmpty); 394 | tmp[@"icon-fire-extinguisher"] = @(FAIconFireExtinguisher); 395 | tmp[@"icon-rocket"] = @(FAIconRocket); 396 | tmp[@"icon-maxcdn"] = @(FAIconMaxcdn); 397 | tmp[@"icon-chevron-sign-left"] = @(FAIconChevronSignLeft); 398 | tmp[@"icon-chevron-sign-right"] = @(FAIconChevronSignRight); 399 | tmp[@"icon-chevron-sign-up"] = @(FAIconChevronSignUp); 400 | tmp[@"icon-chevron-sign-down"] = @(FAIconChevronSignDown); 401 | tmp[@"icon-html5"] = @(FAIconHtml5); 402 | tmp[@"icon-css3"] = @(FAIconCss3); 403 | tmp[@"icon-anchor"] = @(FAIconAnchor); 404 | tmp[@"icon-unlock-alt"] = @(FAIconUnlockAlt); 405 | tmp[@"icon-bullseye"] = @(FAIconBullseye); 406 | tmp[@"icon-ellipsis-horizontal"] = @(FAIconEllipsisHorizontal); 407 | tmp[@"icon-ellipsis-vertical"] = @(FAIconEllipsisVertical); 408 | tmp[@"icon-rss-sign"] = @(FAIconRssSign); 409 | tmp[@"icon-play-sign"] = @(FAIconPlaySign); 410 | tmp[@"icon-ticket"] = @(FAIconTicket); 411 | tmp[@"icon-minus-sign-alt"] = @(FAIconMinusSignAlt); 412 | tmp[@"icon-check-minus"] = @(FAIconCheckMinus); 413 | tmp[@"icon-level-up"] = @(FAIconLevelUp); 414 | tmp[@"icon-level-down"] = @(FAIconLevelDown); 415 | tmp[@"icon-check-sign"] = @(FAIconCheckSign); 416 | tmp[@"icon-edit-sign"] = @(FAIconEditSign); 417 | tmp[@"icon-external-link-sign"] = @(FAIconExternalLinkSign); 418 | tmp[@"icon-share-sign"] = @(FAIconShareSign); 419 | tmp[@"icon-compass"] = @(FAIconCompass); 420 | tmp[@"icon-collapse"] = @(FAIconCollapse); 421 | tmp[@"icon-collapse-top"] = @(FAIconCollapseTop); 422 | tmp[@"icon-expand"] = @(FAIconExpand); 423 | tmp[@"icon-eur"] = @(FAIconEur); 424 | tmp[@"icon-euro"] = @(FAIconEuro); 425 | tmp[@"icon-gbp"] = @(FAIconGbp); 426 | tmp[@"icon-usd"] = @(FAIconUsd); 427 | tmp[@"icon-dollar"] = @(FAIconDollar); 428 | tmp[@"icon-inr"] = @(FAIconInr); 429 | tmp[@"icon-rupee"] = @(FAIconRupee); 430 | tmp[@"icon-jpy"] = @(FAIconJpy); 431 | tmp[@"icon-yen"] = @(FAIconYen); 432 | tmp[@"icon-cny"] = @(FAIconCny); 433 | tmp[@"icon-renminbi"] = @(FAIconRenminbi); 434 | tmp[@"icon-krw"] = @(FAIconKrw); 435 | tmp[@"icon-won"] = @(FAIconWon); 436 | tmp[@"icon-btc"] = @(FAIconBtc); 437 | tmp[@"icon-bitcoin"] = @(FAIconBitcoin); 438 | tmp[@"icon-brand-icons"] = @(FAIconBrandIcons); 439 | tmp[@"icon-file"] = @(FAIconFile); 440 | tmp[@"icon-file-text"] = @(FAIconFileText); 441 | tmp[@"icon-sort-by-alphabet"] = @(FAIconSortByAlphabet); 442 | tmp[@"icon-sort-by-alphabet-alt"] = @(FAIconSortByAlphabetAlt); 443 | tmp[@"icon-sort-by-attributes"] = @(FAIconSortByAttributes); 444 | tmp[@"icon-sort-by-attributes-alt"] = @(FAIconSortByAttributesAlt); 445 | tmp[@"icon-sort-by-order"] = @(FAIconSortByOrder); 446 | tmp[@"icon-sort-by-order-alt"] = @(FAIconSortByOrderAlt); 447 | tmp[@"icon-thumbs-up"] = @(FAIconThumbsUp); 448 | tmp[@"icon-thumbs-down"] = @(FAIconThumbsDown); 449 | tmp[@"icon-youtube-sign"] = @(FAIconYoutubeSign); 450 | tmp[@"icon-youtube"] = @(FAIconYoutube); 451 | tmp[@"icon-xing"] = @(FAIconXing); 452 | tmp[@"icon-xing-sign"] = @(FAIconXingSign); 453 | tmp[@"icon-youtube-play"] = @(FAIconYoutubePlay); 454 | tmp[@"icon-dropbox"] = @(FAIconDropbox); 455 | tmp[@"icon-stackexchange"] = @(FAIconStackexchange); 456 | tmp[@"icon-instagram"] = @(FAIconInstagram); 457 | tmp[@"icon-flickr"] = @(FAIconFlickr); 458 | tmp[@"icon-adn"] = @(FAIconAdn); 459 | tmp[@"icon-bitbucket"] = @(FAIconBitbucket); 460 | tmp[@"icon-bitbucket-sign"] = @(FAIconBitbucketSign); 461 | tmp[@"icon-tumblr"] = @(FAIconTumblr); 462 | tmp[@"icon-tumblr-sign"] = @(FAIconTumblrSign); 463 | tmp[@"icon-long-arrow-down"] = @(FAIconLongArrowDown); 464 | tmp[@"icon-long-arrow-up"] = @(FAIconLongArrowUp); 465 | tmp[@"icon-long-arrow-left"] = @(FAIconLongArrowLeft); 466 | tmp[@"icon-long-arrow-right"] = @(FAIconLongArrowRight); 467 | tmp[@"icon-apple"] = @(FAIconApple); 468 | tmp[@"icon-windows"] = @(FAIconWindows); 469 | tmp[@"icon-android"] = @(FAIconAndroid); 470 | tmp[@"icon-linux"] = @(FAIconLinux); 471 | tmp[@"icon-dribbble"] = @(FAIconDribbble); 472 | tmp[@"icon-skype"] = @(FAIconSkype); 473 | tmp[@"icon-foursquare"] = @(FAIconFoursquare); 474 | tmp[@"icon-trello"] = @(FAIconTrello); 475 | tmp[@"icon-female"] = @(FAIconFemale); 476 | tmp[@"icon-male"] = @(FAIconMale); 477 | tmp[@"icon-gittip"] = @(FAIconGittip); 478 | tmp[@"icon-sun"] = @(FAIconSun); 479 | tmp[@"icon-moon"] = @(FAIconMoon); 480 | tmp[@"icon-archive"] = @(FAIconArchive); 481 | tmp[@"icon-bug"] = @(FAIconBug); 482 | tmp[@"icon-vk"] = @(FAIconVk); 483 | tmp[@"icon-weibo"] = @(FAIconWeibo); 484 | tmp[@"icon-renren"] = @(FAIconRenren); 485 | tmp[@"icon-angel-list"] = @(FAIconAngelList); 486 | tmp[@"icon-bus"] = @(FAIconBus); 487 | tmp[@"icon-cc-discover"] = @(FACCDiscover); 488 | tmp[@"icon-google-wallet"] = @(FAGoogleWallet); 489 | tmp[@"icon-last-fm-square"] = @(FALastFMSquare); 490 | tmp[@"icon-paint-brush"] = @(FAPaintBrush); 491 | tmp[@"icon-ils"] = @(FAIls); 492 | tmp[@"icon-toggle-off"] = @(FAToggleOff); 493 | tmp[@"icon-switch"] = @(FATwitch); 494 | tmp[@"icon-area-chart"] = @(FAAreaChart); 495 | tmp[@"icon-bicycle"] = @(FABicycle); 496 | tmp[@"icon-calculator"] = @(FACalculator); 497 | tmp[@"icon-cc-mastercard"] = @(FACCMastercard); 498 | tmp[@"icon-copyright"] = @(FACopyright); 499 | tmp[@"icon-line-chart"] = @(FALineChart); 500 | tmp[@"icon-paypal"] = @(FAPaypal); 501 | tmp[@"icon-toggle-on"] = @(FAToggleOn); 502 | tmp[@"icon-wifi"] = @(FAWifi); 503 | tmp[@"icon-at"] = @(FAAt); 504 | tmp[@"icon-binoculars"] = @(FABinoculars); 505 | tmp[@"icon-cc"] = @(FACc); 506 | tmp[@"icon-cc-paypal"] = @(FACcpaypal); 507 | tmp[@"icon-eye-dropper"] = @(FAEyeDropper); 508 | tmp[@"icon-iox-host"] = @(FAIoxHost); 509 | tmp[@"icon-mean-path"] = @(FAMeanPath); 510 | tmp[@"icon-pie-chart"] = @(FAPieChart); 511 | tmp[@"icon-slide-share"] = @(FASlideShare); 512 | tmp[@"icon-trash"] = @(FATrash); 513 | tmp[@"icon-yelp"] = @(FAYelp); 514 | tmp[@"icon-bell-slash"] = @(FABellSlash); 515 | tmp[@"icon-birthday-cake"] = @(FABirthdayCake); 516 | tmp[@"icon-cc-amex"] = @(FACCAmex); 517 | tmp[@"icon-cc-stripe"] = @(FACCStripe); 518 | tmp[@"icon-futbol-o"] = @(FAFutbolO); 519 | tmp[@"icon-last-fm"] = @(FALastFM); 520 | tmp[@"icon-newspaper-o"] = @(FANewspaperO); 521 | tmp[@"icon-plug"] = @(FAPlug); 522 | tmp[@"icon-tty"] = @(FATty); 523 | enumDictionary = tmp; 524 | }); 525 | 526 | return enumDictionary; 527 | } 528 | 529 | @end 530 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/FontAwesome+iOS/README.md: -------------------------------------------------------------------------------- 1 | FontAwesome+iOS 2 | =================== 3 | 4 | Font awesome is an iconic font. Read more about it on http://fortawesome.github.com/Font-Awesome/ 5 | 6 | This category brings this great iconic font on iOS. 7 | 8 | Usage 9 | -------------------- 10 | 11 | First, make sure you have `FontAwesome.ttf` bundled in your project and that `UIAppFonts` key in the project's plist file contains a String item named `FontAwesome.ttf` 12 | Then add the `NSString+FontAwesome` category to the project. 13 | 14 | UILabel *label = [...] 15 | label.font = [UIFont fontWithName:kFontAwesomeFamilyName size:20]; 16 | 17 | You can now use enums for all the different iconic characters 18 | 19 | label.text = [NSString fontAwesomeIconStringForEnum:FAIconGithub]; 20 | 21 | or you can reference them by using the class identifiers listed here http://fortawesome.github.com/Font-Awesome/#all-icons 22 | 23 | label.text = [NSString fontAwesomeIconStringForIconIdentifier:@"icon-github"]; 24 | 25 | That's it! 26 | For further information have a look to the small demo project! 27 | 28 | FAImageView 29 | -------------------- 30 | 31 | FAImageView is now extended and contains a new property called `defaultView` that is shown when the image is set to nil. 32 | It is possible to use one the font-awesome icon as a default placeholder for an image view. 33 | 34 | FAImageView *imageView = [[FAImageView alloc] initWithFrame:CGRectMake(0.f, 0.f, 100.f, 100.f)]; 35 | imageView.image = nil; 36 | [imageView setDefaultIconIdentifier:@"icon-github"]; 37 | 38 | License 39 | ------------------- 40 | 41 | This project uses the FontAwesome fix made by Pit Garbe that you can find at https://github.com/leberwurstsaft/FontAwesome-for-iOS Version 2.0 of the Font Awesome font, CSS, and LESS files are licensed under CC BY 3.0: http://creativecommons.org/licenses/by/3.0/ A mention of 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable source code is considered acceptable attribution (most common on the web). If human readable source code is not available to the end user, a mention in an 'About' or 'Credits' screen is considered acceptable (most common in desktop or mobile software) -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/FontAwesome+iOS/Resources/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pepicrft/PPiAwesomeButton/77ca393515e3815c048442d234fc05dcb4d95668/PPiAwesomeButton-Demo/Pods/FontAwesome+iOS/Resources/FontAwesome.ttf -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/FontAwesome+iOS/UIFont+FontAwesome.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+FontAwesome.m 3 | // 4 | // Copyright (c) 2012 Alex Usbergo. All rights reserved. 5 | // 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | 24 | 25 | #import 26 | 27 | @interface UIFont (FontAwesome) 28 | 29 | /** 30 | @abstract Returns the FontAwesome iconic font 31 | */ 32 | + (UIFont*)iconicFontOfSize:(CGFloat)size __deprecated; 33 | 34 | /** 35 | @abstract Returns the FontAwesome iconic font. 36 | */ 37 | + (UIFont*)fontAwesomeFontOfSize:(CGFloat)size; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/FontAwesome+iOS/UIFont+FontAwesome.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+FontAwesome.m 3 | // FontAwesome-iOS Demo 4 | // 5 | // Created by Alex Usbergo on 1/16/13. 6 | // Copyright (c) 2013 Alex Usbergo. All rights reserved. 7 | // 8 | 9 | #import "UIFont+FontAwesome.h" 10 | #import "NSString+FontAwesome.h" 11 | 12 | @implementation UIFont (FontAwesome) 13 | 14 | #pragma mark - Public API 15 | + (UIFont *)iconicFontOfSize:(CGFloat)size { 16 | return [UIFont fontAwesomeFontOfSize:size]; 17 | } 18 | 19 | + (UIFont*)fontAwesomeFontOfSize:(CGFloat)size { 20 | return [UIFont fontWithName:kFontAwesomeFamilyName size:size]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/Local Podspecs/FontAwesome+iOS.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "FontAwesome+iOS" 3 | s.version = "0.0.1" 4 | s.summary = "Category that makes FontAwesome even easier for iOS." 5 | s.homepage = "https://github.com/alexdrone/ios-fontawesome" 6 | s.license = { 7 | :type => 'Private', 8 | :text => <<-LICENSE 9 | This project uses the FontAwesome fix made by Pit Garbe that you can find at https://github.com/leberwurstsaft/FontAwesome-for-iOS Version 2.0 of the Font Awesome font, CSS, and LESS files are licensed under CC BY 3.0: http://creativecommons.org/licenses/by/3.0/ A mention of 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable source code is considered acceptable attribution (most common on the web). If human readable source code is not available to the end user, a mention in an 'About' or 'Credits' screen is considered acceptable (most common in desktop or mobile software) 10 | LICENSE 11 | } 12 | s.author = { "Alex Usbergo" => "alexakadrone@gmail.com" } 13 | s.source = { :git => "https://github.com/alexdrone/ios-fontawesome.git", :commit => "3b1521af4d40e69d4ebb0547e0eae1a4713dedb6" } 14 | s.platform = :ios, '5.0' 15 | s.source_files = '*.{h,m}' 16 | s.exclude_files = 'Demo' 17 | s.resources = "Resources/*.ttf" 18 | s.frameworks = 'UIKit', 'Foundation', 'CoreGraphics' 19 | s.requires_arc = true 20 | end 21 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FontAwesome+iOS (0.1.4) 3 | 4 | DEPENDENCIES: 5 | - FontAwesome+iOS 6 | 7 | SPEC CHECKSUMS: 8 | FontAwesome+iOS: 816c20304edef4ca92835de669577005cbaaf261 9 | 10 | COCOAPODS: 0.34.2 11 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/Pods.xcodeproj/xcuserdata/Isaac.xcuserdatad/xcschemes/Pods-FontAwesome+iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/Pods.xcodeproj/xcuserdata/Isaac.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/Pods.xcodeproj/xcuserdata/Isaac.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-FontAwesome+iOS.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | Pods.xcscheme 13 | 14 | orderHint 15 | 2 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 0F2215476B504BE9ACA31F8F 21 | 22 | primary 23 | 24 | 25 | 97CC34BFBAB84CFB84BA22D8 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/Pods.xcodeproj/xcuserdata/pepibumur.xcuserdatad/xcschemes/Pods-FontAwesome+iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/Pods.xcodeproj/xcuserdata/pepibumur.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /PPiAwesomeButton-Demo/Pods/Pods.xcodeproj/xcuserdata/pepibumur.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-FontAwesome+iOS.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 18D327B820FCA778055A8528 21 | 22 | primary 23 | 24 | 25 | 2628ED548D814179FC04E528 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /PPiAwesomeButton.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'PPiAwesomeButton' 3 | s.version = '1.5.2' 4 | s.platform = :ios, '7.0' 5 | s.license = 'MIT' 6 | s.summary = 'UIButton category with Flat Design and extra methods to set Title+Icon from FontAwesome font' 7 | s.homepage = 'https://github.com/pepibumur/PPiAwesomeButton' 8 | s.author = { 'Pedro Piñera' => 'pepibumur@gmail.com' } 9 | s.source = { :git => 'https://github.com/pepibumur/PPiAwesomeButton.git', :tag => '1.5.2' } 10 | s.description = <<-DESC 11 | PPiAwesomeButton is a new category for UIButton that implements a new flat design and extra methods to set not only the title, also Icon from FontAwesome font using external library. Moreover you'll be able to setup UIColor background for different UIButton states. 12 | DESC 13 | s.requires_arc = true 14 | s.ios.dependency 'FontAwesome+iOS' 15 | s.source_files = 'Control/*.{h,m}' 16 | s.exclude_files = 'PPiAwesomeButton-Demo' 17 | s.framework = 'QuartzCore' 18 | s.public_header_files = 'Control/*.h' 19 | end 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PPiAwesomeButton 2 | ================ 3 | 4 | ### :warning: Important note! This library is not maintained anymore. Feel free to keep it updated by yourself, either forking or asking for bening the contributor. 5 | 6 | UIButton category with new methods to setup a button with text + FontAwesome Icon. 7 | Open App 8 | 9 | 10 | ### Updates 11 | ##### 7th - November 2014 - Cocoapods version - 1.4.2 12 | - Fixed a bug that caused users having empty buttons (when they tried to create the button with text but without icon) 13 | 14 | ##### 28th -June-2014 - Cocoapods version - 1.3.7 15 | - Updated demo project that didn't work due to UIView+Autolayout category 16 | 17 | ##### 26th-March-2014 - Cocoapods version - 1.3.7 18 | Added the feature to set the icon passing an UIImageView 19 | ```objc 20 | -(void)setIconImageView:(UIImageView *)iconImageView; 21 | ``` 22 | Fixed issue related with vertical size of subviews 23 | 24 | ##### 25th-March-2014 - Cocoapods version - 1.3.7 25 | Added the possibility to set the icon in UIImage format. The way to do that is just using the methods: 26 | ```objc 27 | +(UIAwesomeButton*)buttonWithType:(UIButtonType)type text:(NSString *)text icon:(NSString *)icon attributes:(NSDictionary *)attributes andIconPosition:(IconPosition)position; 28 | -(id)initWithFrame:(CGRect)frame text:(NSString *)text iconImage:(UIImage *)icon attributes:(NSDictionary *)attributes andIconPosition:(IconPosition)position; 29 | ``` 30 | 31 | ## Features 32 | 33 | * Background color can be setup dependending on the UIButton State thanks to its new method: ```-(void)setBackgroundColor:(UIColor*)color forUIControlState:(UIControlState)state;``` 34 | * UIButton can be initialized using following ```+(UIButton*)buttonWithType:(UIButtonType)type text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position;``` 35 | ```-(id)initWithFrame:(CGRect)frame text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position;``` where you can specify text/icon attributes using an NSDictionary ( you'll find more information in [Apple Documentation](http://developer.apple.com/library/ios/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSAttributedString_Class/Reference/Reference.html). Moreover you can specify position of Icon inside UIButton thanks to parameter IconPosition (Left or Right )) 36 | * Anytime you can change following properties of UIButton: 37 | **textAttributes-**```-(void)setTextAttributes:(NSDictionary*)attributes forUIControlState:(UIControlState)state;``` 38 | **backgroundColor-**```-(void)setBackgroundColor:(UIColor*)color forUIControlState:(UIControlState)state;``` 39 | **iconPosition-**```-(void)setIconPosition:(IconPosition)position;``` 40 | **buttonText-**```-(void)setButtonText:(NSString*)text;``` 41 | **buttonIcon-**```-(void)setButtonIcon:(NSString*)icon;``` 42 | **buttonRadius-**```-(void)setRadius:(CGFloat)radius;``` 43 | 44 | ## Install 45 | The easiest way to install PPiAwesomeButton is using CocoaPods: 46 | 47 | 1) Add the pod to podfile 48 | ``` 49 | pod 'PPiAwesomeButton' 50 | pod 'FontAwesome+iOS', :git => 'git@github.com:alexdrone/ios-fontawesome.git' 51 | ``` 52 | 53 | 2) Refresh your project pods ```pod install``` 54 | 55 | 3) Add awesome font to your Info.plists setting `UIAppFonts` entry as array and adding `FontAwesome.ttf` to this array. 56 | 57 | 58 | ## Example of using 59 | Here is an example of using for generate an UIButton with Twitter design 60 | ``` 61 | UIButton *twitter1=[UIButton buttonWithType:UIButtonTypeCustom text:@"Twitter" icon:@"icon-twitter" textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15],NSForegroundColorAttributeName:[UIColor whiteColor]} andIconPosition:IconPositionLeft]; 62 | [twitter1 setBackgroundColor:[UIColor colorWithRed:27.0f/255 green:178.0f/255 blue:233.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 63 | [twitter1 setBackgroundColor:[UIColor colorWithRed:60.0f/255 green:89.0f/255 blue:157.0f/255 alpha:1.0] forUIControlState:UIControlStateHighlighted]; 64 | twitter1.frame=CGRectMake(10, 10, 120, 44); 65 | [twitter1 setRadius:5.0]; 66 | [self.view addSubview:twitter1]; 67 | ``` 68 | ![image](http://img850.imageshack.us/img850/7708/8s89.png) 69 | 70 | Here another one for a Pinterest button 71 | ``` 72 | UIButton *pinterest2=[UIButton buttonWithType:UIButtonTypeCustom text:@"Pin it!" icon:@"icon-pinterest" textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:32],NSForegroundColorAttributeName:[UIColor whiteColor]} andIconPosition:IconPositionLeft]; 73 | [pinterest2 setBackgroundColor:[UIColor colorWithRed:205.0f/255 green:35.0f/255 blue:44.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 74 | [pinterest2 setBackgroundColor:[UIColor colorWithRed:244.0f/255 green:61.0f/255 blue:91.0f/255 alpha:1.0] forUIControlState:UIControlStateHighlighted]; 75 | 76 | pinterest2.frame=CGRectMake(10, 270, 280, 50); 77 | [pinterest2 setRadius:0.0]; 78 | [self.view addSubview:pinterest2]; 79 | ``` 80 | ![image](http://img837.imageshack.us/img837/2633/xe8x.png) 81 | 82 | And for Facetime too: 83 | ``` 84 | UIButton *facetime1=[UIButton buttonWithType:UIButtonTypeCustom text:@"Facetime" icon:@"icon-facetime-video" textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15],NSForegroundColorAttributeName:[UIColor whiteColor]} andIconPosition:IconPositionRight]; 85 | [facetime1 setBackgroundColor:[UIColor colorWithRed:40.0f/255 green:219.0f/255 blue:31.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 86 | facetime1.frame=CGRectMake(10, 160, 120, 44); 87 | [facetime1 setRadius:22.0]; 88 | [self.view addSubview:facetime1]; 89 | ``` 90 | ![image](http://img266.imageshack.us/img266/3530/4wb.png) 91 | ### --- Extra - UIAwesomeButton --- 92 | If you've detected some misalignments in icon and text I've created a new class called **UIAwesomeButton** (_UIView subclass_) that has the same behaviour an UIButton has but implemented from zero ( and without misalignments between elements ). Here's an example of implementation into your project: 93 | 94 | ```objective-c 95 | UIAwesomeButton *button4 = [[UIAwesomeButton alloc] initWithFrame:CGRectMake(10, 400, 280, 50) text:@"Test" icon:nil textAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15],NSForegroundColorAttributeName:[UIColor whiteColor],@"IconFont":[UIFont fontWithName:@"fontawesome" size:40]} andIconPosition:IconPositionLeft]; 96 | [button4 setBackgroundColor:[UIColor colorWithRed:205.0f/255 green:35.0f/255 blue:44.0f/255 alpha:1.0] forUIControlState:UIControlStateNormal]; 97 | [button4 setBackgroundColor:[UIColor colorWithRed:244.0f/255 green:61.0f/255 blue:91.0f/255 alpha:1.0] forUIControlState:UIControlStateHighlighted]; 98 | [button4 setRadius:3.0]; 99 | [button4 setSeparation:10]; 100 | [button4 setTextAlignment:NSTextAlignmentLeft]; 101 | [button4 setActionBlock:^{ 102 | NSLog(@"Working!"); 103 | }]; 104 | [self.view addSubview:button4]; 105 | ``` 106 | ## Screenshot 107 | ![image](http://img189.imageshack.us/img189/3955/07yh.gif) 108 | 109 | ## Attributed Strings : Attributes List 110 | 111 | Attributes that you can apply to text in an attributed string. 112 | ``` 113 | NSString *const NSFontAttributeName; 114 | NSString *const NSParagraphStyleAttributeName; 115 | NSString *const NSForegroundColorAttributeName; 116 | NSString *const NSBackgroundColorAttributeName; 117 | NSString *const NSLigatureAttributeName; 118 | NSString *const NSKernAttributeName; 119 | NSString *const NSStrikethroughStyleAttributeName; 120 | NSString *const NSUnderlineStyleAttributeName; 121 | NSString *const NSStrokeColorAttributeName; 122 | NSString *const NSStrokeWidthAttributeName; 123 | NSString *const NSShadowAttributeName; 124 | NSString *const NSVerticalGlyphFormAttributeName; 125 | ``` 126 | Full list [here](https://developer.apple.com/library/ios/documentation/uikit/reference/NSAttributedString_UIKit_Additions/Reference/Reference.html) 127 | 128 | ## Font Awesome Icons 129 | ![image](http://img819.imageshack.us/img819/7605/nw0b.png) 130 | 131 | You'll find the list of Awesome Icons [here](http://fortawesome.github.io/Font-Awesome/icons/). Each icon has an identifier that you have to use in UIButton to add an Icon to your UIButton. 132 | 133 | --------------------------------------------------------------------------------