├── FontTableView ├── FontTableView │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── ViewController.h │ ├── AppDelegate.h │ ├── main.m │ ├── CustomTableViewCell.h │ ├── FontTableView-Prefix.pch │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── FontTableView-Info.plist │ ├── CustomTableViewCell.m │ ├── AppDelegate.m │ ├── ViewController.m │ └── Base.lproj │ │ └── Main.storyboard ├── FontTableViewTests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── FontTableViewTests-Info.plist │ └── FontTableViewTests.m └── FontTableView.xcodeproj │ ├── xcuserdata │ ├── paul.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── FontTableView.xcscheme │ └── paulsolt.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── FontTableView.xcscheme │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ ├── paul.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ └── paulsolt.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── FontTableView.xccheckout │ └── project.pbxproj ├── Portait UITableViewCell Auto Layout.png ├── Landscape UITableViewCell Auto Layout.png ├── .gitignore ├── README.md └── LICENSE /FontTableView/FontTableView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /FontTableView/FontTableViewTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Portait UITableViewCell Auto Layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulSolt/AutoLayoutForUITableViewCell/HEAD/Portait UITableViewCell Auto Layout.png -------------------------------------------------------------------------------- /Landscape UITableViewCell Auto Layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulSolt/AutoLayoutForUITableViewCell/HEAD/Landscape UITableViewCell Auto Layout.png -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/xcuserdata/paul.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/project.xcworkspace/xcuserdata/paul.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulSolt/AutoLayoutForUITableViewCell/HEAD/FontTableView/FontTableView.xcodeproj/project.xcworkspace/xcuserdata/paul.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/project.xcworkspace/xcuserdata/paulsolt.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulSolt/AutoLayoutForUITableViewCell/HEAD/FontTableView/FontTableView.xcodeproj/project.xcworkspace/xcuserdata/paulsolt.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FontTableView/FontTableView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // FontTableView 4 | // 5 | // Created by Paul on 3/20/14. 6 | // Copyright (c) 2014 Paul Solt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CocoaPods 2 | # 3 | # We recommend against adding the Pods directory to your .gitignore. However 4 | # you should judge for yourself, the pros and cons are mentioned at: 5 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control? 6 | # 7 | # Pods/ 8 | 9 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // FontTableView 4 | // 5 | // Created by Paul on 3/20/14. 6 | // Copyright (c) 2014 Paul Solt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FontTableView 4 | // 5 | // Created by Paul on 3/20/14. 6 | // Copyright (c) 2014 Paul Solt. 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 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/CustomTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // CustomTableViewCell.h 3 | // FontTableView 4 | // 5 | // Created by Paul on 3/20/14. 6 | // Copyright (c) 2014 Paul Solt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CustomTableViewCell : UITableViewCell 12 | 13 | @property (weak, nonatomic) IBOutlet UILabel *quoteLabel; 14 | @property (weak, nonatomic) IBOutlet UILabel *fontNameLabel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/FontTableView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/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" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FontTableView/FontTableView/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/xcuserdata/paul.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FontTableView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | DACCB39018DB93BA005C394B 16 | 17 | primary 18 | 19 | 20 | DACCB3B118DB93BA005C394B 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/xcuserdata/paulsolt.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FontTableView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | DACCB39018DB93BA005C394B 16 | 17 | primary 18 | 19 | 20 | DACCB3B118DB93BA005C394B 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FontTableView/FontTableViewTests/FontTableViewTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.paulsolt.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /FontTableView/FontTableViewTests/FontTableViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FontTableViewTests.m 3 | // FontTableViewTests 4 | // 5 | // Created by Paul on 3/20/14. 6 | // Copyright (c) 2014 Paul Solt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FontTableViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation FontTableViewTests 16 | 17 | - (void)setUp 18 | { 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 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | AutoLayoutForUITableViewCell 2 | ============================ 3 | 4 | iPhone UITableView with Auto Layout in the UITableViewCell to Create Dynamic Heights 5 | 6 | This code is from my video tutorial on how to setup Auto Layout for UITableViewCell objects in iOS 7. 7 | 8 | There's some gotchas (lots) to get things working. 9 | 10 | Video: [https://www.youtube.com/watch?v=6KImie4ZMwk](https://www.youtube.com/watch?v=6KImie4ZMwk) 11 | 12 | The content is a few quotes from Steve Jobs and they can take up more or less vertical space. The type of font also changes the height for the cells. Note: To make it work in landscape, make sure you add constraints between the UIView and the UITableView if you embed the UITableView in your Storboard or .xib file. 13 | 14 | ![iPhone Auto Layout in UITableViewCell in Landscape](https://raw.githubusercontent.com/PaulSolt/AutoLayoutForUITableViewCell/master/Landscape%20UITableViewCell%20Auto%20Layout.png) 15 | 16 | ![iPhone Auto Layout in UITableViewCell in Portrait](https://raw.githubusercontent.com/PaulSolt/AutoLayoutForUITableViewCell/master/Portait%20UITableViewCell%20Auto%20Layout.png) 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Paul Solt 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. -------------------------------------------------------------------------------- /FontTableView/FontTableView/FontTableView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.paulsolt.${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 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/CustomTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // CustomTableViewCell.m 3 | // FontTableView 4 | // 5 | // Created by Paul on 3/20/14. 6 | // Copyright (c) 2014 Paul Solt. All rights reserved. 7 | // 8 | 9 | #import "CustomTableViewCell.h" 10 | 11 | @implementation CustomTableViewCell 12 | 13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 14 | { 15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 16 | if (self) { 17 | // Initialization code 18 | } 19 | return self; 20 | } 21 | 22 | - (void)awakeFromNib 23 | { 24 | // Initialization code 25 | } 26 | 27 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 28 | { 29 | [super setSelected:selected animated:animated]; 30 | 31 | // Configure the view for the selected state 32 | } 33 | 34 | // CODE FIX layouts by setting the maxPreferredWidth on any UILabel that can be 35 | // multiline – you may have to do similar settings to other UI elements 36 | // This logic fixes the layout for any UILabels that don't go up to the margins, they 37 | // might be offset by a constraint that isn't the standard. 38 | 39 | - (void)layoutSubviews { 40 | [super layoutSubviews]; 41 | [self.contentView layoutIfNeeded]; 42 | self.fontNameLabel.preferredMaxLayoutWidth = self.fontNameLabel.frame.size.width; 43 | self.quoteLabel.preferredMaxLayoutWidth = self.quoteLabel.frame.size.width; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/project.xcworkspace/xcshareddata/FontTableView.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 5A7F445D-0175-46A4-A9AF-48978147A850 9 | IDESourceControlProjectName 10 | FontTableView 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 4B54377C2A17556930A1E0E90D32C69430E55E7D 14 | https://github.com/PaulSolt/AutoLayoutForUITableViewCell.git 15 | 16 | IDESourceControlProjectPath 17 | FontTableView/FontTableView.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 4B54377C2A17556930A1E0E90D32C69430E55E7D 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/PaulSolt/AutoLayoutForUITableViewCell.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 4B54377C2A17556930A1E0E90D32C69430E55E7D 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 4B54377C2A17556930A1E0E90D32C69430E55E7D 36 | IDESourceControlWCCName 37 | AutoLayoutForUITableViewCell 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // FontTableView 4 | // 5 | // Created by Paul on 3/20/14. 6 | // Copyright (c) 2014 Paul Solt. 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 | -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/xcuserdata/paul.xcuserdatad/xcschemes/FontTableView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/xcuserdata/paulsolt.xcuserdatad/xcschemes/FontTableView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // FontTableView 4 | // 5 | // Created by Paul on 3/20/14. 6 | // Copyright (c) 2014 Paul Solt. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "CustomTableViewCell.h" 11 | 12 | @interface ViewController () { 13 | 14 | NSMutableArray *_fontArray; 15 | NSMutableArray *_quoteArray; 16 | 17 | } 18 | 19 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 20 | @property (strong, nonatomic) CustomTableViewCell *customCell; 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view, typically from a nib. 30 | 31 | self.tableView.delegate = self; 32 | self.tableView.dataSource = self; 33 | 34 | // self.navigationItem.rightBarButtonItem = self.editButtonItem; 35 | 36 | _fontArray = [[UIFont familyNames] mutableCopy]; 37 | for(int i = 0; i < 100; i++) { 38 | [_fontArray addObjectsFromArray:[UIFont familyNames]]; 39 | } 40 | NSLog(@"Size: %d", [_fontArray count]); 41 | 42 | _quoteArray = [@[@"For the past 33 years, I have looked in the mirror every morning and asked myself: 'If today were the last day of my life, would I want to do what I am about to do today?' And whenever the answer has been 'No' for too many days in a row, I know I need to change something. -Steve Jobs", 43 | @"Be a yardstick of quality. Some people aren't used to an environment where excellence is expected. - Steve Jobs", 44 | @"Innovation distinguishes between a leader and a follower. -Steve Jobs"] mutableCopy]; 45 | 46 | 47 | // Use iOS 8 new auto sizing feature for heights (don't need to calculate yourself) 48 | // _tableView.rowHeight = UITableViewAutomaticDimension; 49 | 50 | } 51 | 52 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 53 | 54 | return [_fontArray count]; 55 | } 56 | 57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 58 | 59 | CustomTableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"CustomCell"]; 60 | 61 | cell.fontNameLabel.text = _fontArray[indexPath.row]; 62 | 63 | int quoteIndex = indexPath.row % [_quoteArray count]; 64 | cell.quoteLabel.text = _quoteArray[quoteIndex]; 65 | NSString *fontName = _fontArray[indexPath.row]; 66 | cell.quoteLabel.font = [UIFont fontWithName:fontName size:17]; 67 | return cell; 68 | 69 | } 70 | 71 | // NOTE: in iOS 8 you can use the automatic height calculations from AutoLayout, 72 | // and you can avoid writing this height method. Just comment it out, and uncomment 73 | // the line in viewDidLoad for 74 | // _tableView.rowHeight = UITableViewAutomaticDimension; 75 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 76 | 77 | // Calculate a height based on a cell 78 | if(!self.customCell) { 79 | self.customCell = [self.tableView dequeueReusableCellWithIdentifier:@"CustomCell"]; 80 | } 81 | 82 | // Configure the cell 83 | self.customCell.fontNameLabel.text = _fontArray[indexPath.row]; 84 | 85 | int quoteIndex = indexPath.row % [_quoteArray count]; 86 | self.customCell.quoteLabel.text = _quoteArray[quoteIndex]; 87 | NSString *fontName = _fontArray[indexPath.row]; 88 | self.customCell.quoteLabel.font = [UIFont fontWithName:fontName size:17]; 89 | 90 | 91 | // Layout the cell 92 | 93 | [self.customCell layoutIfNeeded]; 94 | 95 | // Get the height for the cell 96 | 97 | CGFloat height = [self.customCell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height; 98 | 99 | // Padding of 1 point (cell separator) 100 | CGFloat separatorHeight = 1; 101 | 102 | return height + separatorHeight; 103 | } 104 | 105 | - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath { 106 | 107 | return 140; 108 | 109 | } 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /FontTableView/FontTableView/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 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 59 | 67 | 68 | 69 | 70 | 71 | 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 | 109 | 110 | -------------------------------------------------------------------------------- /FontTableView/FontTableView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DACCB39518DB93BA005C394B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACCB39418DB93BA005C394B /* Foundation.framework */; }; 11 | DACCB39718DB93BA005C394B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACCB39618DB93BA005C394B /* CoreGraphics.framework */; }; 12 | DACCB39918DB93BA005C394B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACCB39818DB93BA005C394B /* UIKit.framework */; }; 13 | DACCB39F18DB93BA005C394B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DACCB39D18DB93BA005C394B /* InfoPlist.strings */; }; 14 | DACCB3A118DB93BA005C394B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DACCB3A018DB93BA005C394B /* main.m */; }; 15 | DACCB3A518DB93BA005C394B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DACCB3A418DB93BA005C394B /* AppDelegate.m */; }; 16 | DACCB3A818DB93BA005C394B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DACCB3A618DB93BA005C394B /* Main.storyboard */; }; 17 | DACCB3AB18DB93BA005C394B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DACCB3AA18DB93BA005C394B /* ViewController.m */; }; 18 | DACCB3AD18DB93BA005C394B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DACCB3AC18DB93BA005C394B /* Images.xcassets */; }; 19 | DACCB3B418DB93BA005C394B /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACCB3B318DB93BA005C394B /* XCTest.framework */; }; 20 | DACCB3B518DB93BA005C394B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACCB39418DB93BA005C394B /* Foundation.framework */; }; 21 | DACCB3B618DB93BA005C394B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DACCB39818DB93BA005C394B /* UIKit.framework */; }; 22 | DACCB3BE18DB93BA005C394B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DACCB3BC18DB93BA005C394B /* InfoPlist.strings */; }; 23 | DACCB3C018DB93BA005C394B /* FontTableViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DACCB3BF18DB93BA005C394B /* FontTableViewTests.m */; }; 24 | DACCB3CB18DB95CB005C394B /* CustomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DACCB3CA18DB95CB005C394B /* CustomTableViewCell.m */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | DACCB3B718DB93BA005C394B /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = DACCB38918DB93BA005C394B /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = DACCB39018DB93BA005C394B; 33 | remoteInfo = FontTableView; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | DACCB39118DB93BA005C394B /* FontTableView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FontTableView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | DACCB39418DB93BA005C394B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 40 | DACCB39618DB93BA005C394B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 41 | DACCB39818DB93BA005C394B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 42 | DACCB39C18DB93BA005C394B /* FontTableView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FontTableView-Info.plist"; sourceTree = ""; }; 43 | DACCB39E18DB93BA005C394B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 44 | DACCB3A018DB93BA005C394B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 45 | DACCB3A218DB93BA005C394B /* FontTableView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FontTableView-Prefix.pch"; sourceTree = ""; }; 46 | DACCB3A318DB93BA005C394B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 47 | DACCB3A418DB93BA005C394B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 48 | DACCB3A718DB93BA005C394B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | DACCB3A918DB93BA005C394B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 50 | DACCB3AA18DB93BA005C394B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 51 | DACCB3AC18DB93BA005C394B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 52 | DACCB3B218DB93BA005C394B /* FontTableViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FontTableViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | DACCB3B318DB93BA005C394B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 54 | DACCB3BB18DB93BA005C394B /* FontTableViewTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FontTableViewTests-Info.plist"; sourceTree = ""; }; 55 | DACCB3BD18DB93BA005C394B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 56 | DACCB3BF18DB93BA005C394B /* FontTableViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FontTableViewTests.m; sourceTree = ""; }; 57 | DACCB3C918DB95CB005C394B /* CustomTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomTableViewCell.h; sourceTree = ""; }; 58 | DACCB3CA18DB95CB005C394B /* CustomTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomTableViewCell.m; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | DACCB38E18DB93BA005C394B /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | DACCB39718DB93BA005C394B /* CoreGraphics.framework in Frameworks */, 67 | DACCB39918DB93BA005C394B /* UIKit.framework in Frameworks */, 68 | DACCB39518DB93BA005C394B /* Foundation.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | DACCB3AF18DB93BA005C394B /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | DACCB3B418DB93BA005C394B /* XCTest.framework in Frameworks */, 77 | DACCB3B618DB93BA005C394B /* UIKit.framework in Frameworks */, 78 | DACCB3B518DB93BA005C394B /* Foundation.framework in Frameworks */, 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | /* End PBXFrameworksBuildPhase section */ 83 | 84 | /* Begin PBXGroup section */ 85 | DACCB38818DB93BA005C394B = { 86 | isa = PBXGroup; 87 | children = ( 88 | DACCB39A18DB93BA005C394B /* FontTableView */, 89 | DACCB3B918DB93BA005C394B /* FontTableViewTests */, 90 | DACCB39318DB93BA005C394B /* Frameworks */, 91 | DACCB39218DB93BA005C394B /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | DACCB39218DB93BA005C394B /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | DACCB39118DB93BA005C394B /* FontTableView.app */, 99 | DACCB3B218DB93BA005C394B /* FontTableViewTests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | DACCB39318DB93BA005C394B /* Frameworks */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | DACCB39418DB93BA005C394B /* Foundation.framework */, 108 | DACCB39618DB93BA005C394B /* CoreGraphics.framework */, 109 | DACCB39818DB93BA005C394B /* UIKit.framework */, 110 | DACCB3B318DB93BA005C394B /* XCTest.framework */, 111 | ); 112 | name = Frameworks; 113 | sourceTree = ""; 114 | }; 115 | DACCB39A18DB93BA005C394B /* FontTableView */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | DACCB3A318DB93BA005C394B /* AppDelegate.h */, 119 | DACCB3A418DB93BA005C394B /* AppDelegate.m */, 120 | DACCB3A618DB93BA005C394B /* Main.storyboard */, 121 | DACCB3A918DB93BA005C394B /* ViewController.h */, 122 | DACCB3AA18DB93BA005C394B /* ViewController.m */, 123 | DACCB3C918DB95CB005C394B /* CustomTableViewCell.h */, 124 | DACCB3CA18DB95CB005C394B /* CustomTableViewCell.m */, 125 | DACCB3AC18DB93BA005C394B /* Images.xcassets */, 126 | DACCB39B18DB93BA005C394B /* Supporting Files */, 127 | ); 128 | path = FontTableView; 129 | sourceTree = ""; 130 | }; 131 | DACCB39B18DB93BA005C394B /* Supporting Files */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | DACCB39C18DB93BA005C394B /* FontTableView-Info.plist */, 135 | DACCB39D18DB93BA005C394B /* InfoPlist.strings */, 136 | DACCB3A018DB93BA005C394B /* main.m */, 137 | DACCB3A218DB93BA005C394B /* FontTableView-Prefix.pch */, 138 | ); 139 | name = "Supporting Files"; 140 | sourceTree = ""; 141 | }; 142 | DACCB3B918DB93BA005C394B /* FontTableViewTests */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | DACCB3BF18DB93BA005C394B /* FontTableViewTests.m */, 146 | DACCB3BA18DB93BA005C394B /* Supporting Files */, 147 | ); 148 | path = FontTableViewTests; 149 | sourceTree = ""; 150 | }; 151 | DACCB3BA18DB93BA005C394B /* Supporting Files */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | DACCB3BB18DB93BA005C394B /* FontTableViewTests-Info.plist */, 155 | DACCB3BC18DB93BA005C394B /* InfoPlist.strings */, 156 | ); 157 | name = "Supporting Files"; 158 | sourceTree = ""; 159 | }; 160 | /* End PBXGroup section */ 161 | 162 | /* Begin PBXNativeTarget section */ 163 | DACCB39018DB93BA005C394B /* FontTableView */ = { 164 | isa = PBXNativeTarget; 165 | buildConfigurationList = DACCB3C318DB93BA005C394B /* Build configuration list for PBXNativeTarget "FontTableView" */; 166 | buildPhases = ( 167 | DACCB38D18DB93BA005C394B /* Sources */, 168 | DACCB38E18DB93BA005C394B /* Frameworks */, 169 | DACCB38F18DB93BA005C394B /* Resources */, 170 | ); 171 | buildRules = ( 172 | ); 173 | dependencies = ( 174 | ); 175 | name = FontTableView; 176 | productName = FontTableView; 177 | productReference = DACCB39118DB93BA005C394B /* FontTableView.app */; 178 | productType = "com.apple.product-type.application"; 179 | }; 180 | DACCB3B118DB93BA005C394B /* FontTableViewTests */ = { 181 | isa = PBXNativeTarget; 182 | buildConfigurationList = DACCB3C618DB93BA005C394B /* Build configuration list for PBXNativeTarget "FontTableViewTests" */; 183 | buildPhases = ( 184 | DACCB3AE18DB93BA005C394B /* Sources */, 185 | DACCB3AF18DB93BA005C394B /* Frameworks */, 186 | DACCB3B018DB93BA005C394B /* Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | DACCB3B818DB93BA005C394B /* PBXTargetDependency */, 192 | ); 193 | name = FontTableViewTests; 194 | productName = FontTableViewTests; 195 | productReference = DACCB3B218DB93BA005C394B /* FontTableViewTests.xctest */; 196 | productType = "com.apple.product-type.bundle.unit-test"; 197 | }; 198 | /* End PBXNativeTarget section */ 199 | 200 | /* Begin PBXProject section */ 201 | DACCB38918DB93BA005C394B /* Project object */ = { 202 | isa = PBXProject; 203 | attributes = { 204 | LastUpgradeCheck = 0510; 205 | ORGANIZATIONNAME = "Paul Solt"; 206 | TargetAttributes = { 207 | DACCB3B118DB93BA005C394B = { 208 | TestTargetID = DACCB39018DB93BA005C394B; 209 | }; 210 | }; 211 | }; 212 | buildConfigurationList = DACCB38C18DB93BA005C394B /* Build configuration list for PBXProject "FontTableView" */; 213 | compatibilityVersion = "Xcode 3.2"; 214 | developmentRegion = English; 215 | hasScannedForEncodings = 0; 216 | knownRegions = ( 217 | en, 218 | Base, 219 | ); 220 | mainGroup = DACCB38818DB93BA005C394B; 221 | productRefGroup = DACCB39218DB93BA005C394B /* Products */; 222 | projectDirPath = ""; 223 | projectRoot = ""; 224 | targets = ( 225 | DACCB39018DB93BA005C394B /* FontTableView */, 226 | DACCB3B118DB93BA005C394B /* FontTableViewTests */, 227 | ); 228 | }; 229 | /* End PBXProject section */ 230 | 231 | /* Begin PBXResourcesBuildPhase section */ 232 | DACCB38F18DB93BA005C394B /* Resources */ = { 233 | isa = PBXResourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | DACCB3AD18DB93BA005C394B /* Images.xcassets in Resources */, 237 | DACCB39F18DB93BA005C394B /* InfoPlist.strings in Resources */, 238 | DACCB3A818DB93BA005C394B /* Main.storyboard in Resources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | DACCB3B018DB93BA005C394B /* Resources */ = { 243 | isa = PBXResourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | DACCB3BE18DB93BA005C394B /* InfoPlist.strings in Resources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXResourcesBuildPhase section */ 251 | 252 | /* Begin PBXSourcesBuildPhase section */ 253 | DACCB38D18DB93BA005C394B /* Sources */ = { 254 | isa = PBXSourcesBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | DACCB3AB18DB93BA005C394B /* ViewController.m in Sources */, 258 | DACCB3A518DB93BA005C394B /* AppDelegate.m in Sources */, 259 | DACCB3CB18DB95CB005C394B /* CustomTableViewCell.m in Sources */, 260 | DACCB3A118DB93BA005C394B /* main.m in Sources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | DACCB3AE18DB93BA005C394B /* Sources */ = { 265 | isa = PBXSourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | DACCB3C018DB93BA005C394B /* FontTableViewTests.m in Sources */, 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | /* End PBXSourcesBuildPhase section */ 273 | 274 | /* Begin PBXTargetDependency section */ 275 | DACCB3B818DB93BA005C394B /* PBXTargetDependency */ = { 276 | isa = PBXTargetDependency; 277 | target = DACCB39018DB93BA005C394B /* FontTableView */; 278 | targetProxy = DACCB3B718DB93BA005C394B /* PBXContainerItemProxy */; 279 | }; 280 | /* End PBXTargetDependency section */ 281 | 282 | /* Begin PBXVariantGroup section */ 283 | DACCB39D18DB93BA005C394B /* InfoPlist.strings */ = { 284 | isa = PBXVariantGroup; 285 | children = ( 286 | DACCB39E18DB93BA005C394B /* en */, 287 | ); 288 | name = InfoPlist.strings; 289 | sourceTree = ""; 290 | }; 291 | DACCB3A618DB93BA005C394B /* Main.storyboard */ = { 292 | isa = PBXVariantGroup; 293 | children = ( 294 | DACCB3A718DB93BA005C394B /* Base */, 295 | ); 296 | name = Main.storyboard; 297 | sourceTree = ""; 298 | }; 299 | DACCB3BC18DB93BA005C394B /* InfoPlist.strings */ = { 300 | isa = PBXVariantGroup; 301 | children = ( 302 | DACCB3BD18DB93BA005C394B /* en */, 303 | ); 304 | name = InfoPlist.strings; 305 | sourceTree = ""; 306 | }; 307 | /* End PBXVariantGroup section */ 308 | 309 | /* Begin XCBuildConfiguration section */ 310 | DACCB3C118DB93BA005C394B /* Debug */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ALWAYS_SEARCH_USER_PATHS = NO; 314 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 315 | CLANG_CXX_LIBRARY = "libc++"; 316 | CLANG_ENABLE_MODULES = YES; 317 | CLANG_ENABLE_OBJC_ARC = YES; 318 | CLANG_WARN_BOOL_CONVERSION = YES; 319 | CLANG_WARN_CONSTANT_CONVERSION = YES; 320 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 321 | CLANG_WARN_EMPTY_BODY = YES; 322 | CLANG_WARN_ENUM_CONVERSION = YES; 323 | CLANG_WARN_INT_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 326 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 327 | COPY_PHASE_STRIP = NO; 328 | GCC_C_LANGUAGE_STANDARD = gnu99; 329 | GCC_DYNAMIC_NO_PIC = NO; 330 | GCC_OPTIMIZATION_LEVEL = 0; 331 | GCC_PREPROCESSOR_DEFINITIONS = ( 332 | "DEBUG=1", 333 | "$(inherited)", 334 | ); 335 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 336 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 337 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 338 | GCC_WARN_UNDECLARED_SELECTOR = YES; 339 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 340 | GCC_WARN_UNUSED_FUNCTION = YES; 341 | GCC_WARN_UNUSED_VARIABLE = YES; 342 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 343 | ONLY_ACTIVE_ARCH = YES; 344 | SDKROOT = iphoneos; 345 | }; 346 | name = Debug; 347 | }; 348 | DACCB3C218DB93BA005C394B /* Release */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | ALWAYS_SEARCH_USER_PATHS = NO; 352 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 353 | CLANG_CXX_LIBRARY = "libc++"; 354 | CLANG_ENABLE_MODULES = YES; 355 | CLANG_ENABLE_OBJC_ARC = YES; 356 | CLANG_WARN_BOOL_CONVERSION = YES; 357 | CLANG_WARN_CONSTANT_CONVERSION = YES; 358 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 359 | CLANG_WARN_EMPTY_BODY = YES; 360 | CLANG_WARN_ENUM_CONVERSION = YES; 361 | CLANG_WARN_INT_CONVERSION = YES; 362 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 363 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 364 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 365 | COPY_PHASE_STRIP = YES; 366 | ENABLE_NS_ASSERTIONS = NO; 367 | GCC_C_LANGUAGE_STANDARD = gnu99; 368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 370 | GCC_WARN_UNDECLARED_SELECTOR = YES; 371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 372 | GCC_WARN_UNUSED_FUNCTION = YES; 373 | GCC_WARN_UNUSED_VARIABLE = YES; 374 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 375 | SDKROOT = iphoneos; 376 | VALIDATE_PRODUCT = YES; 377 | }; 378 | name = Release; 379 | }; 380 | DACCB3C418DB93BA005C394B /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 384 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 385 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 386 | GCC_PREFIX_HEADER = "FontTableView/FontTableView-Prefix.pch"; 387 | INFOPLIST_FILE = "FontTableView/FontTableView-Info.plist"; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | WRAPPER_EXTENSION = app; 390 | }; 391 | name = Debug; 392 | }; 393 | DACCB3C518DB93BA005C394B /* Release */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 397 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 398 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 399 | GCC_PREFIX_HEADER = "FontTableView/FontTableView-Prefix.pch"; 400 | INFOPLIST_FILE = "FontTableView/FontTableView-Info.plist"; 401 | PRODUCT_NAME = "$(TARGET_NAME)"; 402 | WRAPPER_EXTENSION = app; 403 | }; 404 | name = Release; 405 | }; 406 | DACCB3C718DB93BA005C394B /* Debug */ = { 407 | isa = XCBuildConfiguration; 408 | buildSettings = { 409 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FontTableView.app/FontTableView"; 410 | FRAMEWORK_SEARCH_PATHS = ( 411 | "$(SDKROOT)/Developer/Library/Frameworks", 412 | "$(inherited)", 413 | "$(DEVELOPER_FRAMEWORKS_DIR)", 414 | ); 415 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 416 | GCC_PREFIX_HEADER = "FontTableView/FontTableView-Prefix.pch"; 417 | GCC_PREPROCESSOR_DEFINITIONS = ( 418 | "DEBUG=1", 419 | "$(inherited)", 420 | ); 421 | INFOPLIST_FILE = "FontTableViewTests/FontTableViewTests-Info.plist"; 422 | PRODUCT_NAME = "$(TARGET_NAME)"; 423 | TEST_HOST = "$(BUNDLE_LOADER)"; 424 | WRAPPER_EXTENSION = xctest; 425 | }; 426 | name = Debug; 427 | }; 428 | DACCB3C818DB93BA005C394B /* Release */ = { 429 | isa = XCBuildConfiguration; 430 | buildSettings = { 431 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FontTableView.app/FontTableView"; 432 | FRAMEWORK_SEARCH_PATHS = ( 433 | "$(SDKROOT)/Developer/Library/Frameworks", 434 | "$(inherited)", 435 | "$(DEVELOPER_FRAMEWORKS_DIR)", 436 | ); 437 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 438 | GCC_PREFIX_HEADER = "FontTableView/FontTableView-Prefix.pch"; 439 | INFOPLIST_FILE = "FontTableViewTests/FontTableViewTests-Info.plist"; 440 | PRODUCT_NAME = "$(TARGET_NAME)"; 441 | TEST_HOST = "$(BUNDLE_LOADER)"; 442 | WRAPPER_EXTENSION = xctest; 443 | }; 444 | name = Release; 445 | }; 446 | /* End XCBuildConfiguration section */ 447 | 448 | /* Begin XCConfigurationList section */ 449 | DACCB38C18DB93BA005C394B /* Build configuration list for PBXProject "FontTableView" */ = { 450 | isa = XCConfigurationList; 451 | buildConfigurations = ( 452 | DACCB3C118DB93BA005C394B /* Debug */, 453 | DACCB3C218DB93BA005C394B /* Release */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | DACCB3C318DB93BA005C394B /* Build configuration list for PBXNativeTarget "FontTableView" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | DACCB3C418DB93BA005C394B /* Debug */, 462 | DACCB3C518DB93BA005C394B /* Release */, 463 | ); 464 | defaultConfigurationIsVisible = 0; 465 | }; 466 | DACCB3C618DB93BA005C394B /* Build configuration list for PBXNativeTarget "FontTableViewTests" */ = { 467 | isa = XCConfigurationList; 468 | buildConfigurations = ( 469 | DACCB3C718DB93BA005C394B /* Debug */, 470 | DACCB3C818DB93BA005C394B /* Release */, 471 | ); 472 | defaultConfigurationIsVisible = 0; 473 | }; 474 | /* End XCConfigurationList section */ 475 | }; 476 | rootObject = DACCB38918DB93BA005C394B /* Project object */; 477 | } 478 | --------------------------------------------------------------------------------