├── SwiftTableViews.xcodeproj ├── xcuserdata │ └── Karunaratne.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── SwiftTableViews.xcscheme ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── Karunaratne.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── project.pbxproj ├── SwiftTableViews ├── ReusableCell.swift ├── TextCell.swift ├── Section.swift ├── SectionedDataSource.swift ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── ViewController.swift ├── Info.plist ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.xib ├── AppDelegate.swift └── TableViewDataSource.swift ├── README.md ├── SwiftTableViewsTests ├── Info.plist └── SwiftTableViewsTests.swift └── LICENSE /SwiftTableViews.xcodeproj/xcuserdata/Karunaratne.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SwiftTableViews.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftTableViews.xcodeproj/project.xcworkspace/xcuserdata/Karunaratne.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indragiek/SwiftTableViews/HEAD/SwiftTableViews.xcodeproj/project.xcworkspace/xcuserdata/Karunaratne.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SwiftTableViews/ReusableCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReusableCell.swift 3 | // 4 | // Created by Indragie on 10/10/14. 5 | // Copyright (c) 2014 Indragie Karunaratne. All rights reserved. 6 | // 7 | 8 | public protocol ReusableCell { 9 | class func reuseIdentifier() -> String 10 | } 11 | -------------------------------------------------------------------------------- /SwiftTableViews/TextCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextCell.swift 3 | // SwiftTableViews 4 | // 5 | // Created by Indragie on 10/10/14. 6 | // Copyright (c) 2014 indragie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class TextCell: UITableViewCell, ReusableCell { 12 | public class func reuseIdentifier() -> String { 13 | return "TextCell" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SwiftTableViews 2 | =============== 3 | 4 | Example project demonstrating a type-safe implementation of table view data sources. 5 | 6 | Read the accompanying blog post [here](http://blog.indragie.com/post/99740598364/type-safe-table-views-with-swift) 7 | 8 | ### Contact 9 | 10 | * Indragie Karunaratne 11 | * [@indragie](http://twitter.com/indragie) 12 | * [http://indragie.com](http://indragie.com) 13 | 14 | ### License 15 | 16 | SwiftTableViews is licensed under the MIT License. 17 | -------------------------------------------------------------------------------- /SwiftTableViews/Section.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Section.swift 3 | // 4 | // Created by Indragie on 10/10/14. 5 | // Copyright (c) 2014 indragie. All rights reserved. 6 | // 7 | 8 | import Foundation 9 | 10 | public struct Section { 11 | public let items: [T] 12 | 13 | public init(items: [T]) { 14 | self.items = items 15 | } 16 | 17 | func toObjC() -> SectionObjC { 18 | return SectionObjC(items: items) 19 | } 20 | } 21 | 22 | @objc class SectionObjC { 23 | let items: [AnyObject] 24 | 25 | init(items: [AnyObject]) { 26 | self.items = items 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SwiftTableViews.xcodeproj/xcuserdata/Karunaratne.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SwiftTableViews.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 72EDDBA019E8DBCF005BBE15 16 | 17 | primary 18 | 19 | 20 | 72EDDBB519E8DBCF005BBE15 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SwiftTableViews/SectionedDataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SectionedDataSource.swift 3 | // 4 | // Created by Indragie on 10/7/14. 5 | // Copyright (c) 2014 Indragie Karunaratne. All rights reserved. 6 | // 7 | 8 | import Foundation 9 | 10 | struct SectionedDataSource { 11 | let sections: [Section] 12 | 13 | init(sections: [Section]) { 14 | self.sections = sections 15 | } 16 | 17 | func numberOfSections() -> Int { 18 | return sections.count 19 | } 20 | 21 | func numberOfItemsInSection(section: Int) -> Int { 22 | return sections[section].items.count 23 | } 24 | 25 | func itemAtIndexPath(indexPath: NSIndexPath) -> T { 26 | return sections[indexPath.section].items[indexPath.row] 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /SwiftTableViews/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 | } -------------------------------------------------------------------------------- /SwiftTableViewsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.indragie.$(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 | -------------------------------------------------------------------------------- /SwiftTableViews/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftTableViews 4 | // 5 | // Created by Indragie on 10/10/14. 6 | // Copyright (c) 2014 indragie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UITableViewController { 12 | var dataSourceObjC: TableViewDataSourceObjC! 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | let section = Section(items: [ 18 | "Apple", 19 | "Banana", 20 | "Orange", 21 | "Strawberry" 22 | ]) 23 | let dataSource = TableViewDataSource(sections: [section]) { (text, cell: TextCell) in 24 | cell.textLabel?.text = text 25 | return 26 | } 27 | 28 | dataSourceObjC = dataSource.toObjC() 29 | self.tableView.registerClass(TextCell.self, forCellReuseIdentifier: TextCell.reuseIdentifier()) 30 | self.tableView.dataSource = dataSourceObjC 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /SwiftTableViewsTests/SwiftTableViewsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftTableViewsTests.swift 3 | // SwiftTableViewsTests 4 | // 5 | // Created by Indragie on 10/10/14. 6 | // Copyright (c) 2014 indragie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class SwiftTableViewsTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Indragie Karunaratne 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /SwiftTableViews/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.indragie.$(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 | -------------------------------------------------------------------------------- /SwiftTableViews/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 | -------------------------------------------------------------------------------- /SwiftTableViews/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftTableViews 4 | // 5 | // Created by Indragie on 10/10/14. 6 | // Copyright (c) 2014 indragie. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 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 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /SwiftTableViews/TableViewDataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewDataSource.swift 3 | // 4 | // Created by Indragie on 10/6/14. 5 | // Copyright (c) 2014 Indragie Karunaratne. All rights reserved. 6 | // 7 | 8 | import UIKit 9 | 10 | public struct TableViewDataSource { 11 | public typealias CellConfigurator = (T, U) -> Void 12 | 13 | let dataSource: SectionedDataSource 14 | let configurator: CellConfigurator 15 | 16 | public init(sections: [Section], configurator: CellConfigurator) { 17 | self.dataSource = SectionedDataSource(sections: sections) 18 | self.configurator = configurator 19 | } 20 | 21 | public func numberOfSections() -> Int { 22 | return dataSource.sections.count 23 | } 24 | 25 | public func numberOfRowsInSection(section: Int) -> Int { 26 | return dataSource.numberOfItemsInSection(section) 27 | } 28 | 29 | public func itemAtIndexPath(indexPath: NSIndexPath) -> T { 30 | return dataSource.itemAtIndexPath(indexPath) 31 | } 32 | 33 | public func toObjC() -> TableViewDataSourceObjC { 34 | let sections = dataSource.sections.map { section in section.toObjC() } 35 | let configurator = self.configurator 36 | return TableViewDataSourceObjC(sections: sections, reuseIdentifier: U.reuseIdentifier()) { (object, cell) in 37 | configurator(object as T, cell as U) 38 | } 39 | } 40 | } 41 | 42 | public class TableViewDataSourceObjC: NSObject, UITableViewDataSource { 43 | typealias ObjCCellConfigurator = (AnyObject, AnyObject) -> Void 44 | 45 | let sections: [SectionObjC] 46 | let reuseIdentifier: String 47 | let configurator: ObjCCellConfigurator 48 | 49 | init(sections: [SectionObjC], reuseIdentifier: String, configurator: ObjCCellConfigurator) { 50 | self.sections = sections 51 | self.reuseIdentifier = reuseIdentifier 52 | self.configurator = configurator 53 | } 54 | 55 | // MARK: UITableViewDataSource 56 | 57 | public func numberOfSectionsInTableView(tableView: UITableView) -> Int { 58 | return sections.count 59 | } 60 | 61 | public func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 62 | return sections[section].items.count 63 | } 64 | 65 | public func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 66 | if let cell = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier) as? UITableViewCell { 67 | let object: AnyObject = sections[indexPath.section].items[indexPath.row] 68 | self.configurator(object, cell) 69 | return cell 70 | } else { 71 | assert(false, "Unable to create table view cell for reuse identifier \(reuseIdentifier)") 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /SwiftTableViews/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 | -------------------------------------------------------------------------------- /SwiftTableViews.xcodeproj/xcuserdata/Karunaratne.xcuserdatad/xcschemes/SwiftTableViews.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 | -------------------------------------------------------------------------------- /SwiftTableViews.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 72A119FC19E8E590003A3A97 /* Section.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72A119FB19E8E590003A3A97 /* Section.swift */; }; 11 | 72EDDBA719E8DBCF005BBE15 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EDDBA619E8DBCF005BBE15 /* AppDelegate.swift */; }; 12 | 72EDDBA919E8DBCF005BBE15 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EDDBA819E8DBCF005BBE15 /* ViewController.swift */; }; 13 | 72EDDBAC19E8DBCF005BBE15 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 72EDDBAA19E8DBCF005BBE15 /* Main.storyboard */; }; 14 | 72EDDBAE19E8DBCF005BBE15 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 72EDDBAD19E8DBCF005BBE15 /* Images.xcassets */; }; 15 | 72EDDBB119E8DBCF005BBE15 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 72EDDBAF19E8DBCF005BBE15 /* LaunchScreen.xib */; }; 16 | 72EDDBBD19E8DBCF005BBE15 /* SwiftTableViewsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EDDBBC19E8DBCF005BBE15 /* SwiftTableViewsTests.swift */; }; 17 | 72EDDBD419E8DC50005BBE15 /* TableViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EDDBD119E8DC50005BBE15 /* TableViewDataSource.swift */; }; 18 | 72EDDBD519E8DC50005BBE15 /* SectionedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EDDBD219E8DC50005BBE15 /* SectionedDataSource.swift */; }; 19 | 72EDDBD619E8DC50005BBE15 /* ReusableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EDDBD319E8DC50005BBE15 /* ReusableCell.swift */; }; 20 | 72EDDBD819E8DC67005BBE15 /* TextCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EDDBD719E8DC67005BBE15 /* TextCell.swift */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 72EDDBB719E8DBCF005BBE15 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 72EDDB9919E8DBCF005BBE15 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 72EDDBA019E8DBCF005BBE15; 29 | remoteInfo = SwiftTableViews; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 72A119FB19E8E590003A3A97 /* Section.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Section.swift; sourceTree = ""; }; 35 | 72EDDBA119E8DBCF005BBE15 /* SwiftTableViews.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftTableViews.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 72EDDBA519E8DBCF005BBE15 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | 72EDDBA619E8DBCF005BBE15 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 38 | 72EDDBA819E8DBCF005BBE15 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 39 | 72EDDBAB19E8DBCF005BBE15 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | 72EDDBAD19E8DBCF005BBE15 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | 72EDDBB019E8DBCF005BBE15 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 42 | 72EDDBB619E8DBCF005BBE15 /* SwiftTableViewsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftTableViewsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 72EDDBBB19E8DBCF005BBE15 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 72EDDBBC19E8DBCF005BBE15 /* SwiftTableViewsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftTableViewsTests.swift; sourceTree = ""; }; 45 | 72EDDBD119E8DC50005BBE15 /* TableViewDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewDataSource.swift; sourceTree = ""; }; 46 | 72EDDBD219E8DC50005BBE15 /* SectionedDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SectionedDataSource.swift; sourceTree = ""; }; 47 | 72EDDBD319E8DC50005BBE15 /* ReusableCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReusableCell.swift; sourceTree = ""; }; 48 | 72EDDBD719E8DC67005BBE15 /* TextCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextCell.swift; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 72EDDB9E19E8DBCF005BBE15 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | 72EDDBB319E8DBCF005BBE15 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 72EDDB9819E8DBCF005BBE15 = { 70 | isa = PBXGroup; 71 | children = ( 72 | 72EDDBA319E8DBCF005BBE15 /* SwiftTableViews */, 73 | 72EDDBB919E8DBCF005BBE15 /* SwiftTableViewsTests */, 74 | 72EDDBA219E8DBCF005BBE15 /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 72EDDBA219E8DBCF005BBE15 /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 72EDDBA119E8DBCF005BBE15 /* SwiftTableViews.app */, 82 | 72EDDBB619E8DBCF005BBE15 /* SwiftTableViewsTests.xctest */, 83 | ); 84 | name = Products; 85 | sourceTree = ""; 86 | }; 87 | 72EDDBA319E8DBCF005BBE15 /* SwiftTableViews */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 72EDDBD919E8DC6C005BBE15 /* Data Source */, 91 | 72EDDBA619E8DBCF005BBE15 /* AppDelegate.swift */, 92 | 72EDDBA819E8DBCF005BBE15 /* ViewController.swift */, 93 | 72EDDBD719E8DC67005BBE15 /* TextCell.swift */, 94 | 72EDDBAA19E8DBCF005BBE15 /* Main.storyboard */, 95 | 72EDDBAD19E8DBCF005BBE15 /* Images.xcassets */, 96 | 72EDDBAF19E8DBCF005BBE15 /* LaunchScreen.xib */, 97 | 72EDDBA419E8DBCF005BBE15 /* Supporting Files */, 98 | ); 99 | path = SwiftTableViews; 100 | sourceTree = ""; 101 | }; 102 | 72EDDBA419E8DBCF005BBE15 /* Supporting Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 72EDDBA519E8DBCF005BBE15 /* Info.plist */, 106 | ); 107 | name = "Supporting Files"; 108 | sourceTree = ""; 109 | }; 110 | 72EDDBB919E8DBCF005BBE15 /* SwiftTableViewsTests */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 72EDDBBC19E8DBCF005BBE15 /* SwiftTableViewsTests.swift */, 114 | 72EDDBBA19E8DBCF005BBE15 /* Supporting Files */, 115 | ); 116 | path = SwiftTableViewsTests; 117 | sourceTree = ""; 118 | }; 119 | 72EDDBBA19E8DBCF005BBE15 /* Supporting Files */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 72EDDBBB19E8DBCF005BBE15 /* Info.plist */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | 72EDDBD919E8DC6C005BBE15 /* Data Source */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 72EDDBD119E8DC50005BBE15 /* TableViewDataSource.swift */, 131 | 72EDDBD219E8DC50005BBE15 /* SectionedDataSource.swift */, 132 | 72EDDBD319E8DC50005BBE15 /* ReusableCell.swift */, 133 | 72A119FB19E8E590003A3A97 /* Section.swift */, 134 | ); 135 | name = "Data Source"; 136 | sourceTree = ""; 137 | }; 138 | /* End PBXGroup section */ 139 | 140 | /* Begin PBXNativeTarget section */ 141 | 72EDDBA019E8DBCF005BBE15 /* SwiftTableViews */ = { 142 | isa = PBXNativeTarget; 143 | buildConfigurationList = 72EDDBC019E8DBCF005BBE15 /* Build configuration list for PBXNativeTarget "SwiftTableViews" */; 144 | buildPhases = ( 145 | 72EDDB9D19E8DBCF005BBE15 /* Sources */, 146 | 72EDDB9E19E8DBCF005BBE15 /* Frameworks */, 147 | 72EDDB9F19E8DBCF005BBE15 /* Resources */, 148 | ); 149 | buildRules = ( 150 | ); 151 | dependencies = ( 152 | ); 153 | name = SwiftTableViews; 154 | productName = SwiftTableViews; 155 | productReference = 72EDDBA119E8DBCF005BBE15 /* SwiftTableViews.app */; 156 | productType = "com.apple.product-type.application"; 157 | }; 158 | 72EDDBB519E8DBCF005BBE15 /* SwiftTableViewsTests */ = { 159 | isa = PBXNativeTarget; 160 | buildConfigurationList = 72EDDBC319E8DBCF005BBE15 /* Build configuration list for PBXNativeTarget "SwiftTableViewsTests" */; 161 | buildPhases = ( 162 | 72EDDBB219E8DBCF005BBE15 /* Sources */, 163 | 72EDDBB319E8DBCF005BBE15 /* Frameworks */, 164 | 72EDDBB419E8DBCF005BBE15 /* Resources */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | 72EDDBB819E8DBCF005BBE15 /* PBXTargetDependency */, 170 | ); 171 | name = SwiftTableViewsTests; 172 | productName = SwiftTableViewsTests; 173 | productReference = 72EDDBB619E8DBCF005BBE15 /* SwiftTableViewsTests.xctest */; 174 | productType = "com.apple.product-type.bundle.unit-test"; 175 | }; 176 | /* End PBXNativeTarget section */ 177 | 178 | /* Begin PBXProject section */ 179 | 72EDDB9919E8DBCF005BBE15 /* Project object */ = { 180 | isa = PBXProject; 181 | attributes = { 182 | LastUpgradeCheck = 0600; 183 | ORGANIZATIONNAME = indragie; 184 | TargetAttributes = { 185 | 72EDDBA019E8DBCF005BBE15 = { 186 | CreatedOnToolsVersion = 6.0; 187 | }; 188 | 72EDDBB519E8DBCF005BBE15 = { 189 | CreatedOnToolsVersion = 6.0; 190 | TestTargetID = 72EDDBA019E8DBCF005BBE15; 191 | }; 192 | }; 193 | }; 194 | buildConfigurationList = 72EDDB9C19E8DBCF005BBE15 /* Build configuration list for PBXProject "SwiftTableViews" */; 195 | compatibilityVersion = "Xcode 3.2"; 196 | developmentRegion = English; 197 | hasScannedForEncodings = 0; 198 | knownRegions = ( 199 | en, 200 | Base, 201 | ); 202 | mainGroup = 72EDDB9819E8DBCF005BBE15; 203 | productRefGroup = 72EDDBA219E8DBCF005BBE15 /* Products */; 204 | projectDirPath = ""; 205 | projectRoot = ""; 206 | targets = ( 207 | 72EDDBA019E8DBCF005BBE15 /* SwiftTableViews */, 208 | 72EDDBB519E8DBCF005BBE15 /* SwiftTableViewsTests */, 209 | ); 210 | }; 211 | /* End PBXProject section */ 212 | 213 | /* Begin PBXResourcesBuildPhase section */ 214 | 72EDDB9F19E8DBCF005BBE15 /* Resources */ = { 215 | isa = PBXResourcesBuildPhase; 216 | buildActionMask = 2147483647; 217 | files = ( 218 | 72EDDBAC19E8DBCF005BBE15 /* Main.storyboard in Resources */, 219 | 72EDDBB119E8DBCF005BBE15 /* LaunchScreen.xib in Resources */, 220 | 72EDDBAE19E8DBCF005BBE15 /* Images.xcassets in Resources */, 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | }; 224 | 72EDDBB419E8DBCF005BBE15 /* Resources */ = { 225 | isa = PBXResourcesBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXResourcesBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 72EDDB9D19E8DBCF005BBE15 /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 72EDDBD619E8DC50005BBE15 /* ReusableCell.swift in Sources */, 239 | 72EDDBD419E8DC50005BBE15 /* TableViewDataSource.swift in Sources */, 240 | 72EDDBD519E8DC50005BBE15 /* SectionedDataSource.swift in Sources */, 241 | 72A119FC19E8E590003A3A97 /* Section.swift in Sources */, 242 | 72EDDBA919E8DBCF005BBE15 /* ViewController.swift in Sources */, 243 | 72EDDBD819E8DC67005BBE15 /* TextCell.swift in Sources */, 244 | 72EDDBA719E8DBCF005BBE15 /* AppDelegate.swift in Sources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | 72EDDBB219E8DBCF005BBE15 /* Sources */ = { 249 | isa = PBXSourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 72EDDBBD19E8DBCF005BBE15 /* SwiftTableViewsTests.swift in Sources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | /* End PBXSourcesBuildPhase section */ 257 | 258 | /* Begin PBXTargetDependency section */ 259 | 72EDDBB819E8DBCF005BBE15 /* PBXTargetDependency */ = { 260 | isa = PBXTargetDependency; 261 | target = 72EDDBA019E8DBCF005BBE15 /* SwiftTableViews */; 262 | targetProxy = 72EDDBB719E8DBCF005BBE15 /* PBXContainerItemProxy */; 263 | }; 264 | /* End PBXTargetDependency section */ 265 | 266 | /* Begin PBXVariantGroup section */ 267 | 72EDDBAA19E8DBCF005BBE15 /* Main.storyboard */ = { 268 | isa = PBXVariantGroup; 269 | children = ( 270 | 72EDDBAB19E8DBCF005BBE15 /* Base */, 271 | ); 272 | name = Main.storyboard; 273 | sourceTree = ""; 274 | }; 275 | 72EDDBAF19E8DBCF005BBE15 /* LaunchScreen.xib */ = { 276 | isa = PBXVariantGroup; 277 | children = ( 278 | 72EDDBB019E8DBCF005BBE15 /* Base */, 279 | ); 280 | name = LaunchScreen.xib; 281 | sourceTree = ""; 282 | }; 283 | /* End PBXVariantGroup section */ 284 | 285 | /* Begin XCBuildConfiguration section */ 286 | 72EDDBBE19E8DBCF005BBE15 /* Debug */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ALWAYS_SEARCH_USER_PATHS = NO; 290 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 291 | CLANG_CXX_LIBRARY = "libc++"; 292 | CLANG_ENABLE_MODULES = YES; 293 | CLANG_ENABLE_OBJC_ARC = YES; 294 | CLANG_WARN_BOOL_CONVERSION = YES; 295 | CLANG_WARN_CONSTANT_CONVERSION = YES; 296 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 297 | CLANG_WARN_EMPTY_BODY = YES; 298 | CLANG_WARN_ENUM_CONVERSION = YES; 299 | CLANG_WARN_INT_CONVERSION = YES; 300 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 301 | CLANG_WARN_UNREACHABLE_CODE = YES; 302 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 303 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 304 | COPY_PHASE_STRIP = NO; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_DYNAMIC_NO_PIC = NO; 308 | GCC_OPTIMIZATION_LEVEL = 0; 309 | GCC_PREPROCESSOR_DEFINITIONS = ( 310 | "DEBUG=1", 311 | "$(inherited)", 312 | ); 313 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 314 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 315 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 316 | GCC_WARN_UNDECLARED_SELECTOR = YES; 317 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 318 | GCC_WARN_UNUSED_FUNCTION = YES; 319 | GCC_WARN_UNUSED_VARIABLE = YES; 320 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 321 | MTL_ENABLE_DEBUG_INFO = YES; 322 | ONLY_ACTIVE_ARCH = YES; 323 | SDKROOT = iphoneos; 324 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 325 | }; 326 | name = Debug; 327 | }; 328 | 72EDDBBF19E8DBCF005BBE15 /* Release */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 333 | CLANG_CXX_LIBRARY = "libc++"; 334 | CLANG_ENABLE_MODULES = YES; 335 | CLANG_ENABLE_OBJC_ARC = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_UNREACHABLE_CODE = YES; 344 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 346 | COPY_PHASE_STRIP = YES; 347 | ENABLE_NS_ASSERTIONS = NO; 348 | ENABLE_STRICT_OBJC_MSGSEND = YES; 349 | GCC_C_LANGUAGE_STANDARD = gnu99; 350 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 351 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 352 | GCC_WARN_UNDECLARED_SELECTOR = YES; 353 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 354 | GCC_WARN_UNUSED_FUNCTION = YES; 355 | GCC_WARN_UNUSED_VARIABLE = YES; 356 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 357 | MTL_ENABLE_DEBUG_INFO = NO; 358 | SDKROOT = iphoneos; 359 | VALIDATE_PRODUCT = YES; 360 | }; 361 | name = Release; 362 | }; 363 | 72EDDBC119E8DBCF005BBE15 /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 367 | INFOPLIST_FILE = SwiftTableViews/Info.plist; 368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 369 | PRODUCT_NAME = "$(TARGET_NAME)"; 370 | }; 371 | name = Debug; 372 | }; 373 | 72EDDBC219E8DBCF005BBE15 /* Release */ = { 374 | isa = XCBuildConfiguration; 375 | buildSettings = { 376 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 377 | INFOPLIST_FILE = SwiftTableViews/Info.plist; 378 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 379 | PRODUCT_NAME = "$(TARGET_NAME)"; 380 | }; 381 | name = Release; 382 | }; 383 | 72EDDBC419E8DBCF005BBE15 /* Debug */ = { 384 | isa = XCBuildConfiguration; 385 | buildSettings = { 386 | BUNDLE_LOADER = "$(TEST_HOST)"; 387 | FRAMEWORK_SEARCH_PATHS = ( 388 | "$(SDKROOT)/Developer/Library/Frameworks", 389 | "$(inherited)", 390 | ); 391 | GCC_PREPROCESSOR_DEFINITIONS = ( 392 | "DEBUG=1", 393 | "$(inherited)", 394 | ); 395 | INFOPLIST_FILE = SwiftTableViewsTests/Info.plist; 396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 397 | PRODUCT_NAME = "$(TARGET_NAME)"; 398 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftTableViews.app/SwiftTableViews"; 399 | }; 400 | name = Debug; 401 | }; 402 | 72EDDBC519E8DBCF005BBE15 /* Release */ = { 403 | isa = XCBuildConfiguration; 404 | buildSettings = { 405 | BUNDLE_LOADER = "$(TEST_HOST)"; 406 | FRAMEWORK_SEARCH_PATHS = ( 407 | "$(SDKROOT)/Developer/Library/Frameworks", 408 | "$(inherited)", 409 | ); 410 | INFOPLIST_FILE = SwiftTableViewsTests/Info.plist; 411 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftTableViews.app/SwiftTableViews"; 414 | }; 415 | name = Release; 416 | }; 417 | /* End XCBuildConfiguration section */ 418 | 419 | /* Begin XCConfigurationList section */ 420 | 72EDDB9C19E8DBCF005BBE15 /* Build configuration list for PBXProject "SwiftTableViews" */ = { 421 | isa = XCConfigurationList; 422 | buildConfigurations = ( 423 | 72EDDBBE19E8DBCF005BBE15 /* Debug */, 424 | 72EDDBBF19E8DBCF005BBE15 /* Release */, 425 | ); 426 | defaultConfigurationIsVisible = 0; 427 | defaultConfigurationName = Release; 428 | }; 429 | 72EDDBC019E8DBCF005BBE15 /* Build configuration list for PBXNativeTarget "SwiftTableViews" */ = { 430 | isa = XCConfigurationList; 431 | buildConfigurations = ( 432 | 72EDDBC119E8DBCF005BBE15 /* Debug */, 433 | 72EDDBC219E8DBCF005BBE15 /* Release */, 434 | ); 435 | defaultConfigurationIsVisible = 0; 436 | defaultConfigurationName = Release; 437 | }; 438 | 72EDDBC319E8DBCF005BBE15 /* Build configuration list for PBXNativeTarget "SwiftTableViewsTests" */ = { 439 | isa = XCConfigurationList; 440 | buildConfigurations = ( 441 | 72EDDBC419E8DBCF005BBE15 /* Debug */, 442 | 72EDDBC519E8DBCF005BBE15 /* Release */, 443 | ); 444 | defaultConfigurationIsVisible = 0; 445 | defaultConfigurationName = Release; 446 | }; 447 | /* End XCConfigurationList section */ 448 | }; 449 | rootObject = 72EDDB9919E8DBCF005BBE15 /* Project object */; 450 | } 451 | --------------------------------------------------------------------------------