diff --git a/FontAwesomeKit.xcodeproj/project.pbxproj b/FontAwesomeKit.xcodeproj/project.pbxproj index ea2152a..9b41177 100644 --- a/FontAwesomeKit.xcodeproj/project.pbxproj +++ b/FontAwesomeKit.xcodeproj/project.pbxproj @@ -239,6 +239,7 @@ CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; @@ -259,10 +260,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; + SDKROOT = iphoneos9.3; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -290,6 +291,7 @@ CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; @@ -304,9 +306,9 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; + SDKROOT = iphoneos9.3; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -317,7 +319,7 @@ AD6F20331D6896B800DEF1F0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "iPhone Developer"; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 767R4Y4A3U; DYLIB_COMPATIBILITY_VERSION = 1; @@ -335,7 +337,7 @@ AD6F20341D6896B800DEF1F0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "iPhone Developer"; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 767R4Y4A3U; DYLIB_COMPATIBILITY_VERSION = 1; diff --git a/README.md b/README.md index 7379f14..a272353 100644 --- a/README.md +++ b/README.md @@ -101,28 +101,22 @@ FAKFoundationIcons *bookmarkIcon = [FAKFoundationIcons iconWithIdentifier:@"fi-b FAKZocial *twitterIcon = [FAKZocial iconWithIdentifier:@"zocial.twitter" size:15 error:error]; FAKIonIcons *mailIcon = [FAKIonIcons iconWithIdentifier:@"ion-ios-email" size:48 error:error]; ``` - ```swift -let error = NSError() -let starIcon = FAKFontAwesome.starIcon(withSize: 15, error: error) -let bookmarkIcon = FAKFoundationIcons.bookmarkIcon(withSize: 15, error: error) -let twitterIcon = FAKZocial.twitterIcon(withSize: 15, error: error) -let mailIcon = FAKIonIcons.ios7EmailIcon(withSize: 48, error: error) - +let starIcon: FAKFontAwesome? +do { + starIcon = try FAKFontAwesome.init(identifier: "er", size: 15) +} catch let error as NSError { + print(error.localizedDescription) +} ``` + ### Setting Attributes for An Icon ```objective-c [starIcon addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor]]; ``` - ```swift -let starIcon: FAKFontAwesome? -do { - starIcon = try FAKFontAwesome.init(identifier: "er", size: 15) -} catch let error as NSError { - print(error.localizedDescription) -} +starIcon.addAttribute(NSForegroundColorAttributeName, UIColor.white) ``` `NSAttributedString` did all the magics behind the scene. So you can set those attributes supported by `NSAttributedString` to an icon. For all available attributes, see [NSAttributedString UIKit Additions Reference](https://developer.apple.com/library/ios/documentation/UIKit/Reference/NSAttributedString_UIKit_Additions/Reference/Reference.html#//apple_ref/doc/uid/TP40011688-CH1-SW16)