├── .gitignore ├── LICENSE ├── README.md ├── UIImageView+Letters ├── UIImageView+Letters.h └── UIImageView+Letters.m ├── UIImageView-Letters.podspec └── UIImageViewLettersSample ├── UIImageViewLettersSample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── UIImageViewLettersSample.xccheckout └── xcuserdata │ ├── mf.xcuserdatad │ └── xcschemes │ │ ├── UIImageViewLettersSample.xcscheme │ │ └── xcschememanagement.plist │ └── tombachant.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── UIImageViewLettersSample.xcscheme │ └── xcschememanagement.plist ├── UIImageViewLettersSample ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m └── UIImageViewLettersSampleTests ├── Info.plist └── UIImageViewLettersSampleTests.m /.gitignore: -------------------------------------------------------------------------------- 1 | *.xcuserstate -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Tom Bachant 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | UIImageView+Letters 2 | =================== 3 | 4 | An easy, helpful UIImageView category that generates letter initials as a placeholder for user profile images, with a randomized background color 5 | 6 | *Note: Looking for a Swift 3 compatible version? Check out the new [InitialsImageView](https://github.com/bachonk/InitialsImageView) extension, rewritten entirely in Swift!* 7 | 8 | ![Example screenshot](https://i.imgur.com/KE8OfrL.png) 9 | 10 | ### Installation 11 | 12 | ##### CocoaPods 13 | 14 | Add this spec to your podfile: 15 | 16 | `pod "UIImageView-Letters"` 17 | 18 | Check out the [official guide](http://guides.cocoapods.org/using/index.html) for getting started with CocoaPods. 19 | 20 | ##### Manual 21 | 22 | 1. Drag the `UIImageView+Letters.{h,m}` files into your project 23 | 2. Enjoy! 24 | 25 | ### Usage 26 | 27 | In the file where you want to use the category, be sure to import the file. 28 | 29 | `#import "UIImageView+Letters.h"` 30 | 31 | ##### Methods 32 | 33 | Call the following methods on any `UIImageView` instance to set the image: 34 | 35 | + `- (void)setImageWithString:(NSString *)string` 36 | + `- (void)setImageWithString:(NSString *)string color:(UIColor *)color` 37 | + `- (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular` 38 | + `- (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular fontName:(NSString *)fontName` 39 | + `- (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular textAttributes:(NSDictionary *)textAttributes` 40 | 41 | `string` is the string used to generate the initials. This should be a user's full name if available. 42 | 43 | `color` is an optional parameter that sets the background color of the image. Pass in `nil` to have a color automatically generated for you. 44 | 45 | `isCircular` is a boolean parameter that will automatically clip the image to a circle if enabled. 46 | 47 | `fontName` is a string that specifies a custom font. Pass in `nil` to use the system font by default. The list of provided font identifiers can be found [here](http://iosfonts.com). 48 | 49 | `textAttributes` is an NSDictionary that allows you to specify font, text color, shadow properties, etc., for the letters text, using the keys found in `NSAttributedString.h`. 50 | 51 | ##### Example 52 | 53 | ``` 54 | NSString *userName = @"Michael Bluth"; 55 | UIImageView *myImgView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 50, 50)]; 56 | [myImgView setImageWithString:userName color:nil circular:YES]; 57 | ``` 58 | 59 | ### Saying Thanks 60 | 61 | If you like this tool, show your support by downloading the free [Turnout](https://itunes.apple.com/us/app/turnout-make-plans-w-friends/id1393733205?mt=8) app that inspired it! 62 | 63 | ### License 64 | 65 | Using the MIT license. See license file for details. 66 | -------------------------------------------------------------------------------- /UIImageView+Letters/UIImageView+Letters.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+Letters.h 3 | // 4 | // Created by Tom Bachant on 6/17/14. 5 | // Copyright (c) 2014 Tom Bachant. All rights reserved. 6 | // 7 | // Some code attributed to Nick Lockwood on 25/08/2013. 8 | // Copyright (c) 2013 Charcoal Design 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy 11 | // of this software and associated documentation files (the "Software"), to deal 12 | // in the Software without restriction, including without limitation the rights 13 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the Software is 15 | // furnished to do so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in 18 | // all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | // THE SOFTWARE. 27 | 28 | #import 29 | 30 | @interface UIImageView (Letters) 31 | 32 | /** 33 | Sets the image property of the view based on initial text. A random background color is automatically generated. 34 | 35 | @param string The string used to generate the initials. This should be a user's full name if available 36 | */ 37 | - (void)setImageWithString:(NSString *)string; 38 | 39 | /** 40 | Sets the image property of the view based on initial text and a specified background color. 41 | 42 | @param string The string used to generate the initials. This should be a user's full name if available 43 | @param color (optional) This optional paramter sets the background of the image. If not provided, a random color will be generated 44 | */ 45 | 46 | - (void)setImageWithString:(NSString *)string color:(UIColor *)color; 47 | 48 | /** 49 | Sets the image property of the view based on initial text, a specified background color, and a circular clipping 50 | 51 | @param string The string used to generate the initials. This should be a user's full name if available 52 | @param color (optional) This optional paramter sets the background of the image. If not provided, a random color will be generated 53 | @param isCircular This boolean will determine if the image view will be clipped to a circular shape 54 | */ 55 | - (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular; 56 | 57 | /** 58 | Sets the image property of the view based on initial text, a specified background color, a custom font, and a circular clipping 59 | 60 | @param string The string used to generate the initials. This should be a user's full name if available 61 | @param color (optional) This optional paramter sets the background of the image. If not provided, a random color will be generated 62 | @param isCircular This boolean will determine if the image view will be clipped to a circular shape 63 | @param fontName This will use a custom font attribute. If not provided, it will default to system font 64 | */ 65 | - (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular fontName:(NSString *)fontName; 66 | 67 | /** 68 | Sets the image property of the view based on initial text, a specified background color, custom text attributes, and a circular clipping 69 | 70 | @param string The string used to generate the initials. This should be a user's full name if available 71 | @param color (optional) This optional paramter sets the background of the image. If not provided, a random color will be generated 72 | @param isCircular This boolean will determine if the image view will be clipped to a circular shape 73 | @param textAttributes This dictionary allows you to specify font, text color, shadow properties, etc., for the letters text, using the keys found in NSAttributedString.h 74 | */ 75 | - (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular textAttributes:(NSDictionary *)textAttributes; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /UIImageView+Letters/UIImageView+Letters.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+Letters.m 3 | // 4 | // Created by Tom Bachant on 6/17/14. 5 | // Copyright (c) 2014 Tom Bachant. All rights reserved. 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 | // THE SOFTWARE. 24 | 25 | #import "UIImageView+Letters.h" 26 | 27 | // This multiplier sets the font size based on the view bounds 28 | static const CGFloat kFontResizingProportion = 0.42f; 29 | 30 | @interface UIImageView (LettersPrivate) 31 | 32 | - (UIImage *)imageSnapshotFromText:(NSString *)text backgroundColor:(UIColor *)color circular:(BOOL)isCircular textAttributes:(NSDictionary *)attributes; 33 | 34 | @end 35 | 36 | @implementation UIImageView (Letters) 37 | 38 | - (void)setImageWithString:(NSString *)string { 39 | [self setImageWithString:string color:nil circular:NO textAttributes:nil]; 40 | } 41 | 42 | - (void)setImageWithString:(NSString *)string color:(UIColor *)color { 43 | [self setImageWithString:string color:color circular:NO textAttributes:nil]; 44 | } 45 | 46 | - (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular { 47 | [self setImageWithString:string color:color circular:isCircular textAttributes:nil]; 48 | } 49 | 50 | - (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular fontName:(NSString *)fontName { 51 | [self setImageWithString:string color:color circular:isCircular textAttributes:@{ 52 | NSFontAttributeName:[self fontForFontName:fontName], 53 | NSForegroundColorAttributeName: [UIColor whiteColor] 54 | }]; 55 | } 56 | 57 | - (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular textAttributes:(NSDictionary *)textAttributes { 58 | if (!textAttributes) { 59 | textAttributes = @{ 60 | NSFontAttributeName: [self fontForFontName:nil], 61 | NSForegroundColorAttributeName: [UIColor whiteColor] 62 | }; 63 | } 64 | 65 | NSMutableString *displayString = [NSMutableString stringWithString:@""]; 66 | 67 | NSMutableArray *words = [[string componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] mutableCopy]; 68 | 69 | // 70 | // Get first letter of the first and last word 71 | // 72 | if ([words count]) { 73 | NSString *firstWord = [words firstObject]; 74 | if ([firstWord length]) { 75 | // Get character range to handle emoji (emojis consist of 2 characters in sequence) 76 | NSRange firstLetterRange = [firstWord rangeOfComposedCharacterSequencesForRange:NSMakeRange(0, 1)]; 77 | [displayString appendString:[firstWord substringWithRange:firstLetterRange]]; 78 | } 79 | 80 | if ([words count] >= 2) { 81 | NSString *lastWord = [words lastObject]; 82 | 83 | while ([lastWord length] == 0 && [words count] >= 2) { 84 | [words removeLastObject]; 85 | lastWord = [words lastObject]; 86 | } 87 | 88 | if ([words count] > 1) { 89 | // Get character range to handle emoji (emojis consist of 2 characters in sequence) 90 | NSRange lastLetterRange = [lastWord rangeOfComposedCharacterSequencesForRange:NSMakeRange(0, 1)]; 91 | [displayString appendString:[lastWord substringWithRange:lastLetterRange]]; 92 | } 93 | } 94 | } 95 | 96 | UIColor *backgroundColor = color ? color : [self randomColor]; 97 | 98 | self.image = [self imageSnapshotFromText:[displayString uppercaseString] backgroundColor:backgroundColor circular:isCircular textAttributes:textAttributes]; 99 | } 100 | 101 | #pragma mark - Helpers 102 | 103 | - (UIFont *)fontForFontName:(NSString *)fontName { 104 | 105 | CGFloat fontSize = CGRectGetWidth(self.bounds) * kFontResizingProportion; 106 | if (fontName) { 107 | return [UIFont fontWithName:fontName size:fontSize]; 108 | } 109 | else { 110 | return [UIFont systemFontOfSize:fontSize]; 111 | } 112 | 113 | } 114 | 115 | - (UIColor *)randomColor { 116 | 117 | srand48(arc4random()); 118 | 119 | float red = 0.0; 120 | while (red < 0.1 || red > 0.84) { 121 | red = drand48(); 122 | } 123 | 124 | float green = 0.0; 125 | while (green < 0.1 || green > 0.84) { 126 | green = drand48(); 127 | } 128 | 129 | float blue = 0.0; 130 | while (blue < 0.1 || blue > 0.84) { 131 | blue = drand48(); 132 | } 133 | 134 | return [UIColor colorWithRed:red green:green blue:blue alpha:1.0f]; 135 | } 136 | 137 | - (UIImage *)imageSnapshotFromText:(NSString *)text backgroundColor:(UIColor *)color circular:(BOOL)isCircular textAttributes:(NSDictionary *)textAttributes { 138 | 139 | CGFloat scale = [UIScreen mainScreen].scale; 140 | 141 | CGSize size = self.bounds.size; 142 | if (self.contentMode == UIViewContentModeScaleToFill || 143 | self.contentMode == UIViewContentModeScaleAspectFill || 144 | self.contentMode == UIViewContentModeScaleAspectFit || 145 | self.contentMode == UIViewContentModeRedraw) 146 | { 147 | size.width = floorf(size.width * scale) / scale; 148 | size.height = floorf(size.height * scale) / scale; 149 | } 150 | 151 | UIGraphicsBeginImageContextWithOptions(size, NO, scale); 152 | 153 | CGContextRef context = UIGraphicsGetCurrentContext(); 154 | 155 | if (isCircular) { 156 | // 157 | // Clip context to a circle 158 | // 159 | CGPathRef path = CGPathCreateWithEllipseInRect(self.bounds, NULL); 160 | CGContextAddPath(context, path); 161 | CGContextClip(context); 162 | CGPathRelease(path); 163 | } 164 | 165 | // 166 | // Fill background of context 167 | // 168 | CGContextSetFillColorWithColor(context, color.CGColor); 169 | CGContextFillRect(context, CGRectMake(0, 0, size.width, size.height)); 170 | 171 | // 172 | // Draw text in the context 173 | // 174 | CGSize textSize = [text sizeWithAttributes:textAttributes]; 175 | CGRect bounds = self.bounds; 176 | 177 | [text drawInRect:CGRectMake(bounds.size.width/2 - textSize.width/2, 178 | bounds.size.height/2 - textSize.height/2, 179 | textSize.width, 180 | textSize.height) 181 | withAttributes:textAttributes]; 182 | 183 | UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext(); 184 | UIGraphicsEndImageContext(); 185 | 186 | return snapshot; 187 | } 188 | 189 | @end 190 | -------------------------------------------------------------------------------- /UIImageView-Letters.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "UIImageView-Letters" 3 | s.version = "1.1.4" 4 | s.summary = "UIImageView category that generates letter initials as image." 5 | s.description = "An easy, helpful UIImageView category that generates letter initials as a placeholder for user profile images, with a randomized background color." 6 | s.homepage = "https://github.com/bachonk/UIImageView-Letters" 7 | s.screenshots = "http://i.imgur.com/xSBjVQ7.png" 8 | s.license = { :type => 'MIT', :file => 'LICENSE' } 9 | s.author = { "Tom Bachant" => "tom@dashride.com" } 10 | s.platform = :ios, '6.0' 11 | s.source = { :git => "https://github.com/bachonk/UIImageView-Letters.git", 12 | :tag => '1.1.4' } 13 | s.source_files = 'UIImageView+Letters' 14 | s.requires_arc = true 15 | end 16 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C855D2E71A00593300A5B693 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C855D2E61A00593300A5B693 /* main.m */; }; 11 | C855D2EA1A00593300A5B693 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C855D2E91A00593300A5B693 /* AppDelegate.m */; }; 12 | C855D2ED1A00593300A5B693 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C855D2EC1A00593300A5B693 /* ViewController.m */; }; 13 | C855D2F01A00593300A5B693 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C855D2EE1A00593300A5B693 /* Main.storyboard */; }; 14 | C855D2F21A00593300A5B693 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C855D2F11A00593300A5B693 /* Images.xcassets */; }; 15 | C855D2F51A00593300A5B693 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = C855D2F31A00593300A5B693 /* LaunchScreen.xib */; }; 16 | C855D3011A00593300A5B693 /* UIImageViewLettersSampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C855D3001A00593300A5B693 /* UIImageViewLettersSampleTests.m */; }; 17 | C855D30F1A005B1600A5B693 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C855D30E1A005B1600A5B693 /* QuartzCore.framework */; }; 18 | C86C71DC1ACF0731007BD322 /* UIImageView+Letters.m in Sources */ = {isa = PBXBuildFile; fileRef = C86C71DB1ACF0731007BD322 /* UIImageView+Letters.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | C855D2FB1A00593300A5B693 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = C855D2D91A00593300A5B693 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = C855D2E01A00593300A5B693; 27 | remoteInfo = UIImageViewLettersSample; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | C855D2E11A00593300A5B693 /* UIImageViewLettersSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIImageViewLettersSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | C855D2E51A00593300A5B693 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | C855D2E61A00593300A5B693 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 35 | C855D2E81A00593300A5B693 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 36 | C855D2E91A00593300A5B693 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 37 | C855D2EB1A00593300A5B693 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 38 | C855D2EC1A00593300A5B693 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 39 | C855D2EF1A00593300A5B693 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | C855D2F11A00593300A5B693 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | C855D2F41A00593300A5B693 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 42 | C855D2FA1A00593300A5B693 /* UIImageViewLettersSampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIImageViewLettersSampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | C855D2FF1A00593300A5B693 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | C855D3001A00593300A5B693 /* UIImageViewLettersSampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIImageViewLettersSampleTests.m; sourceTree = ""; }; 45 | C855D30E1A005B1600A5B693 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 46 | C86C71DA1ACF0731007BD322 /* UIImageView+Letters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+Letters.h"; sourceTree = ""; }; 47 | C86C71DB1ACF0731007BD322 /* UIImageView+Letters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+Letters.m"; sourceTree = ""; }; 48 | /* End PBXFileReference section */ 49 | 50 | /* Begin PBXFrameworksBuildPhase section */ 51 | C855D2DE1A00593300A5B693 /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | C855D30F1A005B1600A5B693 /* QuartzCore.framework in Frameworks */, 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | C855D2F71A00593300A5B693 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | C855D2D81A00593300A5B693 = { 70 | isa = PBXGroup; 71 | children = ( 72 | C855D30E1A005B1600A5B693 /* QuartzCore.framework */, 73 | C855D2E31A00593300A5B693 /* UIImageViewLettersSample */, 74 | C855D2FD1A00593300A5B693 /* UIImageViewLettersSampleTests */, 75 | C855D2E21A00593300A5B693 /* Products */, 76 | ); 77 | sourceTree = ""; 78 | }; 79 | C855D2E21A00593300A5B693 /* Products */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | C855D2E11A00593300A5B693 /* UIImageViewLettersSample.app */, 83 | C855D2FA1A00593300A5B693 /* UIImageViewLettersSampleTests.xctest */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | C855D2E31A00593300A5B693 /* UIImageViewLettersSample */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | C86C71D91ACF0731007BD322 /* UIImageView+Letters */, 92 | C855D2E81A00593300A5B693 /* AppDelegate.h */, 93 | C855D2E91A00593300A5B693 /* AppDelegate.m */, 94 | C855D2EB1A00593300A5B693 /* ViewController.h */, 95 | C855D2EC1A00593300A5B693 /* ViewController.m */, 96 | C855D2EE1A00593300A5B693 /* Main.storyboard */, 97 | C855D2F11A00593300A5B693 /* Images.xcassets */, 98 | C855D2F31A00593300A5B693 /* LaunchScreen.xib */, 99 | C855D2E41A00593300A5B693 /* Supporting Files */, 100 | ); 101 | path = UIImageViewLettersSample; 102 | sourceTree = ""; 103 | }; 104 | C855D2E41A00593300A5B693 /* Supporting Files */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | C855D2E51A00593300A5B693 /* Info.plist */, 108 | C855D2E61A00593300A5B693 /* main.m */, 109 | ); 110 | name = "Supporting Files"; 111 | sourceTree = ""; 112 | }; 113 | C855D2FD1A00593300A5B693 /* UIImageViewLettersSampleTests */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | C855D3001A00593300A5B693 /* UIImageViewLettersSampleTests.m */, 117 | C855D2FE1A00593300A5B693 /* Supporting Files */, 118 | ); 119 | path = UIImageViewLettersSampleTests; 120 | sourceTree = ""; 121 | }; 122 | C855D2FE1A00593300A5B693 /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | C855D2FF1A00593300A5B693 /* Info.plist */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | C86C71D91ACF0731007BD322 /* UIImageView+Letters */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | C86C71DA1ACF0731007BD322 /* UIImageView+Letters.h */, 134 | C86C71DB1ACF0731007BD322 /* UIImageView+Letters.m */, 135 | ); 136 | name = "UIImageView+Letters"; 137 | path = "../../UIImageView+Letters"; 138 | sourceTree = ""; 139 | }; 140 | /* End PBXGroup section */ 141 | 142 | /* Begin PBXNativeTarget section */ 143 | C855D2E01A00593300A5B693 /* UIImageViewLettersSample */ = { 144 | isa = PBXNativeTarget; 145 | buildConfigurationList = C855D3041A00593300A5B693 /* Build configuration list for PBXNativeTarget "UIImageViewLettersSample" */; 146 | buildPhases = ( 147 | C855D2DD1A00593300A5B693 /* Sources */, 148 | C855D2DE1A00593300A5B693 /* Frameworks */, 149 | C855D2DF1A00593300A5B693 /* Resources */, 150 | ); 151 | buildRules = ( 152 | ); 153 | dependencies = ( 154 | ); 155 | name = UIImageViewLettersSample; 156 | productName = UIImageViewLettersSample; 157 | productReference = C855D2E11A00593300A5B693 /* UIImageViewLettersSample.app */; 158 | productType = "com.apple.product-type.application"; 159 | }; 160 | C855D2F91A00593300A5B693 /* UIImageViewLettersSampleTests */ = { 161 | isa = PBXNativeTarget; 162 | buildConfigurationList = C855D3071A00593300A5B693 /* Build configuration list for PBXNativeTarget "UIImageViewLettersSampleTests" */; 163 | buildPhases = ( 164 | C855D2F61A00593300A5B693 /* Sources */, 165 | C855D2F71A00593300A5B693 /* Frameworks */, 166 | C855D2F81A00593300A5B693 /* Resources */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | C855D2FC1A00593300A5B693 /* PBXTargetDependency */, 172 | ); 173 | name = UIImageViewLettersSampleTests; 174 | productName = UIImageViewLettersSampleTests; 175 | productReference = C855D2FA1A00593300A5B693 /* UIImageViewLettersSampleTests.xctest */; 176 | productType = "com.apple.product-type.bundle.unit-test"; 177 | }; 178 | /* End PBXNativeTarget section */ 179 | 180 | /* Begin PBXProject section */ 181 | C855D2D91A00593300A5B693 /* Project object */ = { 182 | isa = PBXProject; 183 | attributes = { 184 | LastUpgradeCheck = 0600; 185 | ORGANIZATIONNAME = "Coincidental Code"; 186 | TargetAttributes = { 187 | C855D2E01A00593300A5B693 = { 188 | CreatedOnToolsVersion = 6.0; 189 | }; 190 | C855D2F91A00593300A5B693 = { 191 | CreatedOnToolsVersion = 6.0; 192 | TestTargetID = C855D2E01A00593300A5B693; 193 | }; 194 | }; 195 | }; 196 | buildConfigurationList = C855D2DC1A00593300A5B693 /* Build configuration list for PBXProject "UIImageViewLettersSample" */; 197 | compatibilityVersion = "Xcode 3.2"; 198 | developmentRegion = English; 199 | hasScannedForEncodings = 0; 200 | knownRegions = ( 201 | en, 202 | Base, 203 | ); 204 | mainGroup = C855D2D81A00593300A5B693; 205 | productRefGroup = C855D2E21A00593300A5B693 /* Products */; 206 | projectDirPath = ""; 207 | projectRoot = ""; 208 | targets = ( 209 | C855D2E01A00593300A5B693 /* UIImageViewLettersSample */, 210 | C855D2F91A00593300A5B693 /* UIImageViewLettersSampleTests */, 211 | ); 212 | }; 213 | /* End PBXProject section */ 214 | 215 | /* Begin PBXResourcesBuildPhase section */ 216 | C855D2DF1A00593300A5B693 /* Resources */ = { 217 | isa = PBXResourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | C855D2F01A00593300A5B693 /* Main.storyboard in Resources */, 221 | C855D2F51A00593300A5B693 /* LaunchScreen.xib in Resources */, 222 | C855D2F21A00593300A5B693 /* Images.xcassets in Resources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | C855D2F81A00593300A5B693 /* Resources */ = { 227 | isa = PBXResourcesBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | /* End PBXResourcesBuildPhase section */ 234 | 235 | /* Begin PBXSourcesBuildPhase section */ 236 | C855D2DD1A00593300A5B693 /* Sources */ = { 237 | isa = PBXSourcesBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | C855D2ED1A00593300A5B693 /* ViewController.m in Sources */, 241 | C855D2EA1A00593300A5B693 /* AppDelegate.m in Sources */, 242 | C86C71DC1ACF0731007BD322 /* UIImageView+Letters.m in Sources */, 243 | C855D2E71A00593300A5B693 /* main.m in Sources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | C855D2F61A00593300A5B693 /* Sources */ = { 248 | isa = PBXSourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | C855D3011A00593300A5B693 /* UIImageViewLettersSampleTests.m in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXSourcesBuildPhase section */ 256 | 257 | /* Begin PBXTargetDependency section */ 258 | C855D2FC1A00593300A5B693 /* PBXTargetDependency */ = { 259 | isa = PBXTargetDependency; 260 | target = C855D2E01A00593300A5B693 /* UIImageViewLettersSample */; 261 | targetProxy = C855D2FB1A00593300A5B693 /* PBXContainerItemProxy */; 262 | }; 263 | /* End PBXTargetDependency section */ 264 | 265 | /* Begin PBXVariantGroup section */ 266 | C855D2EE1A00593300A5B693 /* Main.storyboard */ = { 267 | isa = PBXVariantGroup; 268 | children = ( 269 | C855D2EF1A00593300A5B693 /* Base */, 270 | ); 271 | name = Main.storyboard; 272 | sourceTree = ""; 273 | }; 274 | C855D2F31A00593300A5B693 /* LaunchScreen.xib */ = { 275 | isa = PBXVariantGroup; 276 | children = ( 277 | C855D2F41A00593300A5B693 /* Base */, 278 | ); 279 | name = LaunchScreen.xib; 280 | sourceTree = ""; 281 | }; 282 | /* End PBXVariantGroup section */ 283 | 284 | /* Begin XCBuildConfiguration section */ 285 | C855D3021A00593300A5B693 /* Debug */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | ALWAYS_SEARCH_USER_PATHS = NO; 289 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 290 | CLANG_CXX_LIBRARY = "libc++"; 291 | CLANG_ENABLE_MODULES = YES; 292 | CLANG_ENABLE_OBJC_ARC = YES; 293 | CLANG_WARN_BOOL_CONVERSION = YES; 294 | CLANG_WARN_CONSTANT_CONVERSION = YES; 295 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 296 | CLANG_WARN_EMPTY_BODY = YES; 297 | CLANG_WARN_ENUM_CONVERSION = YES; 298 | CLANG_WARN_INT_CONVERSION = YES; 299 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 300 | CLANG_WARN_UNREACHABLE_CODE = YES; 301 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 302 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 303 | COPY_PHASE_STRIP = NO; 304 | ENABLE_STRICT_OBJC_MSGSEND = YES; 305 | GCC_C_LANGUAGE_STANDARD = gnu99; 306 | GCC_DYNAMIC_NO_PIC = NO; 307 | GCC_OPTIMIZATION_LEVEL = 0; 308 | GCC_PREPROCESSOR_DEFINITIONS = ( 309 | "DEBUG=1", 310 | "$(inherited)", 311 | ); 312 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 313 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 314 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 315 | GCC_WARN_UNDECLARED_SELECTOR = YES; 316 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 317 | GCC_WARN_UNUSED_FUNCTION = YES; 318 | GCC_WARN_UNUSED_VARIABLE = YES; 319 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 320 | MTL_ENABLE_DEBUG_INFO = YES; 321 | ONLY_ACTIVE_ARCH = YES; 322 | SDKROOT = iphoneos; 323 | }; 324 | name = Debug; 325 | }; 326 | C855D3031A00593300A5B693 /* Release */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | ALWAYS_SEARCH_USER_PATHS = NO; 330 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 331 | CLANG_CXX_LIBRARY = "libc++"; 332 | CLANG_ENABLE_MODULES = YES; 333 | CLANG_ENABLE_OBJC_ARC = YES; 334 | CLANG_WARN_BOOL_CONVERSION = YES; 335 | CLANG_WARN_CONSTANT_CONVERSION = YES; 336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 337 | CLANG_WARN_EMPTY_BODY = YES; 338 | CLANG_WARN_ENUM_CONVERSION = YES; 339 | CLANG_WARN_INT_CONVERSION = YES; 340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 341 | CLANG_WARN_UNREACHABLE_CODE = YES; 342 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 343 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 344 | COPY_PHASE_STRIP = YES; 345 | ENABLE_NS_ASSERTIONS = NO; 346 | ENABLE_STRICT_OBJC_MSGSEND = YES; 347 | GCC_C_LANGUAGE_STANDARD = gnu99; 348 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 349 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 350 | GCC_WARN_UNDECLARED_SELECTOR = YES; 351 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 352 | GCC_WARN_UNUSED_FUNCTION = YES; 353 | GCC_WARN_UNUSED_VARIABLE = YES; 354 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 355 | MTL_ENABLE_DEBUG_INFO = NO; 356 | SDKROOT = iphoneos; 357 | VALIDATE_PRODUCT = YES; 358 | }; 359 | name = Release; 360 | }; 361 | C855D3051A00593300A5B693 /* Debug */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 365 | INFOPLIST_FILE = UIImageViewLettersSample/Info.plist; 366 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 367 | PRODUCT_NAME = "$(TARGET_NAME)"; 368 | }; 369 | name = Debug; 370 | }; 371 | C855D3061A00593300A5B693 /* Release */ = { 372 | isa = XCBuildConfiguration; 373 | buildSettings = { 374 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 375 | INFOPLIST_FILE = UIImageViewLettersSample/Info.plist; 376 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 377 | PRODUCT_NAME = "$(TARGET_NAME)"; 378 | }; 379 | name = Release; 380 | }; 381 | C855D3081A00593300A5B693 /* Debug */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | BUNDLE_LOADER = "$(TEST_HOST)"; 385 | FRAMEWORK_SEARCH_PATHS = ( 386 | "$(SDKROOT)/Developer/Library/Frameworks", 387 | "$(inherited)", 388 | ); 389 | GCC_PREPROCESSOR_DEFINITIONS = ( 390 | "DEBUG=1", 391 | "$(inherited)", 392 | ); 393 | INFOPLIST_FILE = UIImageViewLettersSampleTests/Info.plist; 394 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 395 | PRODUCT_NAME = "$(TARGET_NAME)"; 396 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIImageViewLettersSample.app/UIImageViewLettersSample"; 397 | }; 398 | name = Debug; 399 | }; 400 | C855D3091A00593300A5B693 /* Release */ = { 401 | isa = XCBuildConfiguration; 402 | buildSettings = { 403 | BUNDLE_LOADER = "$(TEST_HOST)"; 404 | FRAMEWORK_SEARCH_PATHS = ( 405 | "$(SDKROOT)/Developer/Library/Frameworks", 406 | "$(inherited)", 407 | ); 408 | INFOPLIST_FILE = UIImageViewLettersSampleTests/Info.plist; 409 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 410 | PRODUCT_NAME = "$(TARGET_NAME)"; 411 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIImageViewLettersSample.app/UIImageViewLettersSample"; 412 | }; 413 | name = Release; 414 | }; 415 | /* End XCBuildConfiguration section */ 416 | 417 | /* Begin XCConfigurationList section */ 418 | C855D2DC1A00593300A5B693 /* Build configuration list for PBXProject "UIImageViewLettersSample" */ = { 419 | isa = XCConfigurationList; 420 | buildConfigurations = ( 421 | C855D3021A00593300A5B693 /* Debug */, 422 | C855D3031A00593300A5B693 /* Release */, 423 | ); 424 | defaultConfigurationIsVisible = 0; 425 | defaultConfigurationName = Release; 426 | }; 427 | C855D3041A00593300A5B693 /* Build configuration list for PBXNativeTarget "UIImageViewLettersSample" */ = { 428 | isa = XCConfigurationList; 429 | buildConfigurations = ( 430 | C855D3051A00593300A5B693 /* Debug */, 431 | C855D3061A00593300A5B693 /* Release */, 432 | ); 433 | defaultConfigurationIsVisible = 0; 434 | defaultConfigurationName = Release; 435 | }; 436 | C855D3071A00593300A5B693 /* Build configuration list for PBXNativeTarget "UIImageViewLettersSampleTests" */ = { 437 | isa = XCConfigurationList; 438 | buildConfigurations = ( 439 | C855D3081A00593300A5B693 /* Debug */, 440 | C855D3091A00593300A5B693 /* Release */, 441 | ); 442 | defaultConfigurationIsVisible = 0; 443 | defaultConfigurationName = Release; 444 | }; 445 | /* End XCConfigurationList section */ 446 | }; 447 | rootObject = C855D2D91A00593300A5B693 /* Project object */; 448 | } 449 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj/project.xcworkspace/xcshareddata/UIImageViewLettersSample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | A3F1ED25-0928-4526-9FF8-C73C2AFAA60A 9 | IDESourceControlProjectName 10 | UIImageViewLettersSample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 9FFD21C6A65AE22198CFA6E939DC569037B4263C 14 | github.com:MattFaluotico/UIImageView-Letters.git 15 | 16 | IDESourceControlProjectPath 17 | UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 9FFD21C6A65AE22198CFA6E939DC569037B4263C 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:MattFaluotico/UIImageView-Letters.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 9FFD21C6A65AE22198CFA6E939DC569037B4263C 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 9FFD21C6A65AE22198CFA6E939DC569037B4263C 36 | IDESourceControlWCCName 37 | UIImageView-Letters 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj/xcuserdata/mf.xcuserdatad/xcschemes/UIImageViewLettersSample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj/xcuserdata/mf.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIImageViewLettersSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C855D2E01A00593300A5B693 16 | 17 | primary 18 | 19 | 20 | C855D2F91A00593300A5B693 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj/xcuserdata/tombachant.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj/xcuserdata/tombachant.xcuserdatad/xcschemes/UIImageViewLettersSample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample.xcodeproj/xcuserdata/tombachant.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIImageViewLettersSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C855D2E01A00593300A5B693 16 | 17 | primary 18 | 19 | 20 | C855D2F91A00593300A5B693 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // UIImageViewLettersSample 4 | // 5 | // Created by Tom Bachant on 10/28/14. 6 | // Copyright (c) 2014 Coincidental Code. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // UIImageViewLettersSample 4 | // 5 | // Created by Tom Bachant on 10/28/14. 6 | // Copyright (c) 2014 Coincidental Code. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // 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. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // 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. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 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 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/Base.lproj/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 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 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 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.coincidentalCode.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // UIImageViewLettersSample 4 | // 5 | // Created by Tom Bachant on 10/28/14. 6 | // Copyright (c) 2014 Coincidental Code. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ViewController : UIViewController 13 | 14 | @property (nonatomic, weak) IBOutlet UIImageView *sampleImageView; 15 | 16 | @property (nonatomic, weak) IBOutlet UITextField *nameField; 17 | 18 | @property (nonatomic, weak) IBOutlet UISwitch *circularSwitch; 19 | 20 | @property (weak, nonatomic) IBOutlet UISwitch *useFuturaSwitch; 21 | 22 | - (IBAction)refreshSampleImage:(id)sender; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // UIImageViewLettersSample 4 | // 5 | // Created by Tom Bachant on 10/28/14. 6 | // Copyright (c) 2014 Coincidental Code. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | #import "UIImageView+Letters.h" 12 | 13 | @interface ViewController () 14 | 15 | @end 16 | 17 | @implementation ViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view, typically from a nib. 22 | 23 | /** 24 | * Let's start with a sample 25 | */ 26 | _nameField.text = @"Michael Bluth"; // everyone's favorite son 27 | _circularSwitch.on = NO; 28 | [self refreshSampleImage:nil]; 29 | 30 | } 31 | 32 | - (void)didReceiveMemoryWarning { 33 | [super didReceiveMemoryWarning]; 34 | // Dispose of any resources that can be recreated. 35 | } 36 | 37 | #pragma mark - Actions 38 | 39 | - (IBAction)refreshSampleImage:(id)sender { 40 | 41 | if (_useFuturaSwitch.isOn) { 42 | [_sampleImageView setImageWithString:_nameField.text color:nil circular:_circularSwitch.isOn textAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"Futura-Medium" size:28.0f], NSForegroundColorAttributeName:[UIColor blueColor]}]; 43 | } else { 44 | [_sampleImageView setImageWithString:_nameField.text color:nil circular:_circularSwitch.isOn]; 45 | } 46 | 47 | 48 | 49 | 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UIImageViewLettersSample 4 | // 5 | // Created by Tom Bachant on 10/28/14. 6 | // Copyright (c) 2014 Coincidental Code. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.coincidentalCode.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /UIImageViewLettersSample/UIImageViewLettersSampleTests/UIImageViewLettersSampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageViewLettersSampleTests.m 3 | // UIImageViewLettersSampleTests 4 | // 5 | // Created by Tom Bachant on 10/28/14. 6 | // Copyright (c) 2014 Coincidental Code. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface UIImageViewLettersSampleTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation UIImageViewLettersSampleTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------