├── .DS_Store ├── AVLighterTableViewController.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── angelvasa.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── angelvasa.xcuserdatad │ └── xcschemes │ ├── AVLighterTableViewController.xcscheme │ └── xcschememanagement.plist ├── AVLighterTableViewController ├── .DS_Store ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── DataSources │ ├── AVBaseTableViewCell.swift │ └── AVTableDataSource.swift ├── Info.plist ├── MyCustomTableViewCell.swift ├── MyCustomTableViewCell.xib └── ViewController.swift ├── AVLighterTableViewControllerTests ├── AVLighterTableViewControllerTests.swift └── Info.plist ├── AVLighterTableViewControllerUITests ├── AVLighterTableViewControllerUITests.swift └── Info.plist └── readme.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angelvasa/AVLighterTableViewController/cf68af48df9ead3b2e2134d4c68327ee5de6c19e/.DS_Store -------------------------------------------------------------------------------- /AVLighterTableViewController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B1C1BD411C352EC20024096A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C1BD401C352EC20024096A /* AppDelegate.swift */; }; 11 | B1C1BD431C352EC20024096A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C1BD421C352EC20024096A /* ViewController.swift */; }; 12 | B1C1BD461C352EC20024096A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B1C1BD441C352EC20024096A /* Main.storyboard */; }; 13 | B1C1BD481C352EC20024096A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B1C1BD471C352EC20024096A /* Assets.xcassets */; }; 14 | B1C1BD4B1C352EC20024096A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B1C1BD491C352EC20024096A /* LaunchScreen.storyboard */; }; 15 | B1C1BD561C352EC30024096A /* AVLighterTableViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C1BD551C352EC30024096A /* AVLighterTableViewControllerTests.swift */; }; 16 | B1C1BD611C352EC30024096A /* AVLighterTableViewControllerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C1BD601C352EC30024096A /* AVLighterTableViewControllerUITests.swift */; }; 17 | B1C1BD741C352F680024096A /* AVTableDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C1BD731C352F680024096A /* AVTableDataSource.swift */; }; 18 | B1C1BD761C352FD10024096A /* AVBaseTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C1BD751C352FD10024096A /* AVBaseTableViewCell.swift */; }; 19 | B1C1BD791C3530660024096A /* MyCustomTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C1BD771C3530660024096A /* MyCustomTableViewCell.swift */; }; 20 | B1C1BD7A1C3530660024096A /* MyCustomTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1C1BD781C3530660024096A /* MyCustomTableViewCell.xib */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | B1C1BD521C352EC30024096A /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = B1C1BD351C352EC20024096A /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = B1C1BD3C1C352EC20024096A; 29 | remoteInfo = AVLighterTableViewController; 30 | }; 31 | B1C1BD5D1C352EC30024096A /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = B1C1BD351C352EC20024096A /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = B1C1BD3C1C352EC20024096A; 36 | remoteInfo = AVLighterTableViewController; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | B1C1BD3D1C352EC20024096A /* AVLighterTableViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AVLighterTableViewController.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | B1C1BD401C352EC20024096A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 43 | B1C1BD421C352EC20024096A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 44 | B1C1BD451C352EC20024096A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | B1C1BD471C352EC20024096A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | B1C1BD4A1C352EC20024096A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | B1C1BD4C1C352EC20024096A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | B1C1BD511C352EC30024096A /* AVLighterTableViewControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AVLighterTableViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | B1C1BD551C352EC30024096A /* AVLighterTableViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVLighterTableViewControllerTests.swift; sourceTree = ""; }; 50 | B1C1BD571C352EC30024096A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | B1C1BD5C1C352EC30024096A /* AVLighterTableViewControllerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AVLighterTableViewControllerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | B1C1BD601C352EC30024096A /* AVLighterTableViewControllerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVLighterTableViewControllerUITests.swift; sourceTree = ""; }; 53 | B1C1BD621C352EC30024096A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | B1C1BD731C352F680024096A /* AVTableDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AVTableDataSource.swift; sourceTree = ""; }; 55 | B1C1BD751C352FD10024096A /* AVBaseTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AVBaseTableViewCell.swift; sourceTree = ""; }; 56 | B1C1BD771C3530660024096A /* MyCustomTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyCustomTableViewCell.swift; sourceTree = ""; }; 57 | B1C1BD781C3530660024096A /* MyCustomTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyCustomTableViewCell.xib; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | B1C1BD3A1C352EC20024096A /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | B1C1BD4E1C352EC30024096A /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | B1C1BD591C352EC30024096A /* Frameworks */ = { 76 | isa = PBXFrameworksBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | /* End PBXFrameworksBuildPhase section */ 83 | 84 | /* Begin PBXGroup section */ 85 | B1C1BD341C352EC20024096A = { 86 | isa = PBXGroup; 87 | children = ( 88 | B1C1BD3F1C352EC20024096A /* AVLighterTableViewController */, 89 | B1C1BD541C352EC30024096A /* AVLighterTableViewControllerTests */, 90 | B1C1BD5F1C352EC30024096A /* AVLighterTableViewControllerUITests */, 91 | B1C1BD3E1C352EC20024096A /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | B1C1BD3E1C352EC20024096A /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | B1C1BD3D1C352EC20024096A /* AVLighterTableViewController.app */, 99 | B1C1BD511C352EC30024096A /* AVLighterTableViewControllerTests.xctest */, 100 | B1C1BD5C1C352EC30024096A /* AVLighterTableViewControllerUITests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | B1C1BD3F1C352EC20024096A /* AVLighterTableViewController */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | B1C1BD6E1C352F060024096A /* DataSources */, 109 | B1C1BD401C352EC20024096A /* AppDelegate.swift */, 110 | B1C1BD421C352EC20024096A /* ViewController.swift */, 111 | B1C1BD441C352EC20024096A /* Main.storyboard */, 112 | B1C1BD471C352EC20024096A /* Assets.xcassets */, 113 | B1C1BD491C352EC20024096A /* LaunchScreen.storyboard */, 114 | B1C1BD4C1C352EC20024096A /* Info.plist */, 115 | B1C1BD771C3530660024096A /* MyCustomTableViewCell.swift */, 116 | B1C1BD781C3530660024096A /* MyCustomTableViewCell.xib */, 117 | ); 118 | path = AVLighterTableViewController; 119 | sourceTree = ""; 120 | }; 121 | B1C1BD541C352EC30024096A /* AVLighterTableViewControllerTests */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | B1C1BD551C352EC30024096A /* AVLighterTableViewControllerTests.swift */, 125 | B1C1BD571C352EC30024096A /* Info.plist */, 126 | ); 127 | path = AVLighterTableViewControllerTests; 128 | sourceTree = ""; 129 | }; 130 | B1C1BD5F1C352EC30024096A /* AVLighterTableViewControllerUITests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | B1C1BD601C352EC30024096A /* AVLighterTableViewControllerUITests.swift */, 134 | B1C1BD621C352EC30024096A /* Info.plist */, 135 | ); 136 | path = AVLighterTableViewControllerUITests; 137 | sourceTree = ""; 138 | }; 139 | B1C1BD6E1C352F060024096A /* DataSources */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | B1C1BD731C352F680024096A /* AVTableDataSource.swift */, 143 | B1C1BD751C352FD10024096A /* AVBaseTableViewCell.swift */, 144 | ); 145 | path = DataSources; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | B1C1BD3C1C352EC20024096A /* AVLighterTableViewController */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = B1C1BD651C352EC30024096A /* Build configuration list for PBXNativeTarget "AVLighterTableViewController" */; 154 | buildPhases = ( 155 | B1C1BD391C352EC20024096A /* Sources */, 156 | B1C1BD3A1C352EC20024096A /* Frameworks */, 157 | B1C1BD3B1C352EC20024096A /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = AVLighterTableViewController; 164 | productName = AVLighterTableViewController; 165 | productReference = B1C1BD3D1C352EC20024096A /* AVLighterTableViewController.app */; 166 | productType = "com.apple.product-type.application"; 167 | }; 168 | B1C1BD501C352EC30024096A /* AVLighterTableViewControllerTests */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = B1C1BD681C352EC30024096A /* Build configuration list for PBXNativeTarget "AVLighterTableViewControllerTests" */; 171 | buildPhases = ( 172 | B1C1BD4D1C352EC30024096A /* Sources */, 173 | B1C1BD4E1C352EC30024096A /* Frameworks */, 174 | B1C1BD4F1C352EC30024096A /* Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | B1C1BD531C352EC30024096A /* PBXTargetDependency */, 180 | ); 181 | name = AVLighterTableViewControllerTests; 182 | productName = AVLighterTableViewControllerTests; 183 | productReference = B1C1BD511C352EC30024096A /* AVLighterTableViewControllerTests.xctest */; 184 | productType = "com.apple.product-type.bundle.unit-test"; 185 | }; 186 | B1C1BD5B1C352EC30024096A /* AVLighterTableViewControllerUITests */ = { 187 | isa = PBXNativeTarget; 188 | buildConfigurationList = B1C1BD6B1C352EC30024096A /* Build configuration list for PBXNativeTarget "AVLighterTableViewControllerUITests" */; 189 | buildPhases = ( 190 | B1C1BD581C352EC30024096A /* Sources */, 191 | B1C1BD591C352EC30024096A /* Frameworks */, 192 | B1C1BD5A1C352EC30024096A /* Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | B1C1BD5E1C352EC30024096A /* PBXTargetDependency */, 198 | ); 199 | name = AVLighterTableViewControllerUITests; 200 | productName = AVLighterTableViewControllerUITests; 201 | productReference = B1C1BD5C1C352EC30024096A /* AVLighterTableViewControllerUITests.xctest */; 202 | productType = "com.apple.product-type.bundle.ui-testing"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | B1C1BD351C352EC20024096A /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastSwiftUpdateCheck = 0720; 211 | LastUpgradeCheck = 0720; 212 | ORGANIZATIONNAME = "Angel Vasa"; 213 | TargetAttributes = { 214 | B1C1BD3C1C352EC20024096A = { 215 | CreatedOnToolsVersion = 7.2; 216 | }; 217 | B1C1BD501C352EC30024096A = { 218 | CreatedOnToolsVersion = 7.2; 219 | TestTargetID = B1C1BD3C1C352EC20024096A; 220 | }; 221 | B1C1BD5B1C352EC30024096A = { 222 | CreatedOnToolsVersion = 7.2; 223 | TestTargetID = B1C1BD3C1C352EC20024096A; 224 | }; 225 | }; 226 | }; 227 | buildConfigurationList = B1C1BD381C352EC20024096A /* Build configuration list for PBXProject "AVLighterTableViewController" */; 228 | compatibilityVersion = "Xcode 3.2"; 229 | developmentRegion = English; 230 | hasScannedForEncodings = 0; 231 | knownRegions = ( 232 | en, 233 | Base, 234 | ); 235 | mainGroup = B1C1BD341C352EC20024096A; 236 | productRefGroup = B1C1BD3E1C352EC20024096A /* Products */; 237 | projectDirPath = ""; 238 | projectRoot = ""; 239 | targets = ( 240 | B1C1BD3C1C352EC20024096A /* AVLighterTableViewController */, 241 | B1C1BD501C352EC30024096A /* AVLighterTableViewControllerTests */, 242 | B1C1BD5B1C352EC30024096A /* AVLighterTableViewControllerUITests */, 243 | ); 244 | }; 245 | /* End PBXProject section */ 246 | 247 | /* Begin PBXResourcesBuildPhase section */ 248 | B1C1BD3B1C352EC20024096A /* Resources */ = { 249 | isa = PBXResourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | B1C1BD4B1C352EC20024096A /* LaunchScreen.storyboard in Resources */, 253 | B1C1BD481C352EC20024096A /* Assets.xcassets in Resources */, 254 | B1C1BD7A1C3530660024096A /* MyCustomTableViewCell.xib in Resources */, 255 | B1C1BD461C352EC20024096A /* Main.storyboard in Resources */, 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | B1C1BD4F1C352EC30024096A /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | B1C1BD5A1C352EC30024096A /* Resources */ = { 267 | isa = PBXResourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | /* End PBXResourcesBuildPhase section */ 274 | 275 | /* Begin PBXSourcesBuildPhase section */ 276 | B1C1BD391C352EC20024096A /* Sources */ = { 277 | isa = PBXSourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | B1C1BD791C3530660024096A /* MyCustomTableViewCell.swift in Sources */, 281 | B1C1BD741C352F680024096A /* AVTableDataSource.swift in Sources */, 282 | B1C1BD761C352FD10024096A /* AVBaseTableViewCell.swift in Sources */, 283 | B1C1BD431C352EC20024096A /* ViewController.swift in Sources */, 284 | B1C1BD411C352EC20024096A /* AppDelegate.swift in Sources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | B1C1BD4D1C352EC30024096A /* Sources */ = { 289 | isa = PBXSourcesBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | B1C1BD561C352EC30024096A /* AVLighterTableViewControllerTests.swift in Sources */, 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | B1C1BD581C352EC30024096A /* Sources */ = { 297 | isa = PBXSourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | B1C1BD611C352EC30024096A /* AVLighterTableViewControllerUITests.swift in Sources */, 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | }; 304 | /* End PBXSourcesBuildPhase section */ 305 | 306 | /* Begin PBXTargetDependency section */ 307 | B1C1BD531C352EC30024096A /* PBXTargetDependency */ = { 308 | isa = PBXTargetDependency; 309 | target = B1C1BD3C1C352EC20024096A /* AVLighterTableViewController */; 310 | targetProxy = B1C1BD521C352EC30024096A /* PBXContainerItemProxy */; 311 | }; 312 | B1C1BD5E1C352EC30024096A /* PBXTargetDependency */ = { 313 | isa = PBXTargetDependency; 314 | target = B1C1BD3C1C352EC20024096A /* AVLighterTableViewController */; 315 | targetProxy = B1C1BD5D1C352EC30024096A /* PBXContainerItemProxy */; 316 | }; 317 | /* End PBXTargetDependency section */ 318 | 319 | /* Begin PBXVariantGroup section */ 320 | B1C1BD441C352EC20024096A /* Main.storyboard */ = { 321 | isa = PBXVariantGroup; 322 | children = ( 323 | B1C1BD451C352EC20024096A /* Base */, 324 | ); 325 | name = Main.storyboard; 326 | sourceTree = ""; 327 | }; 328 | B1C1BD491C352EC20024096A /* LaunchScreen.storyboard */ = { 329 | isa = PBXVariantGroup; 330 | children = ( 331 | B1C1BD4A1C352EC20024096A /* Base */, 332 | ); 333 | name = LaunchScreen.storyboard; 334 | sourceTree = ""; 335 | }; 336 | /* End PBXVariantGroup section */ 337 | 338 | /* Begin XCBuildConfiguration section */ 339 | B1C1BD631C352EC30024096A /* Debug */ = { 340 | isa = XCBuildConfiguration; 341 | buildSettings = { 342 | ALWAYS_SEARCH_USER_PATHS = NO; 343 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 344 | CLANG_CXX_LIBRARY = "libc++"; 345 | CLANG_ENABLE_MODULES = YES; 346 | CLANG_ENABLE_OBJC_ARC = YES; 347 | CLANG_WARN_BOOL_CONVERSION = YES; 348 | CLANG_WARN_CONSTANT_CONVERSION = YES; 349 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 350 | CLANG_WARN_EMPTY_BODY = YES; 351 | CLANG_WARN_ENUM_CONVERSION = YES; 352 | CLANG_WARN_INT_CONVERSION = YES; 353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 354 | CLANG_WARN_UNREACHABLE_CODE = YES; 355 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 356 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 357 | COPY_PHASE_STRIP = NO; 358 | DEBUG_INFORMATION_FORMAT = dwarf; 359 | ENABLE_STRICT_OBJC_MSGSEND = YES; 360 | ENABLE_TESTABILITY = YES; 361 | GCC_C_LANGUAGE_STANDARD = gnu99; 362 | GCC_DYNAMIC_NO_PIC = NO; 363 | GCC_NO_COMMON_BLOCKS = YES; 364 | GCC_OPTIMIZATION_LEVEL = 0; 365 | GCC_PREPROCESSOR_DEFINITIONS = ( 366 | "DEBUG=1", 367 | "$(inherited)", 368 | ); 369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 370 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 371 | GCC_WARN_UNDECLARED_SELECTOR = YES; 372 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 373 | GCC_WARN_UNUSED_FUNCTION = YES; 374 | GCC_WARN_UNUSED_VARIABLE = YES; 375 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 376 | MTL_ENABLE_DEBUG_INFO = YES; 377 | ONLY_ACTIVE_ARCH = YES; 378 | SDKROOT = iphoneos; 379 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 380 | TARGETED_DEVICE_FAMILY = "1,2"; 381 | }; 382 | name = Debug; 383 | }; 384 | B1C1BD641C352EC30024096A /* Release */ = { 385 | isa = XCBuildConfiguration; 386 | buildSettings = { 387 | ALWAYS_SEARCH_USER_PATHS = NO; 388 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 389 | CLANG_CXX_LIBRARY = "libc++"; 390 | CLANG_ENABLE_MODULES = YES; 391 | CLANG_ENABLE_OBJC_ARC = YES; 392 | CLANG_WARN_BOOL_CONVERSION = YES; 393 | CLANG_WARN_CONSTANT_CONVERSION = YES; 394 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 395 | CLANG_WARN_EMPTY_BODY = YES; 396 | CLANG_WARN_ENUM_CONVERSION = YES; 397 | CLANG_WARN_INT_CONVERSION = YES; 398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 402 | COPY_PHASE_STRIP = NO; 403 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 404 | ENABLE_NS_ASSERTIONS = NO; 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu99; 407 | GCC_NO_COMMON_BLOCKS = YES; 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 415 | MTL_ENABLE_DEBUG_INFO = NO; 416 | SDKROOT = iphoneos; 417 | TARGETED_DEVICE_FAMILY = "1,2"; 418 | VALIDATE_PRODUCT = YES; 419 | }; 420 | name = Release; 421 | }; 422 | B1C1BD661C352EC30024096A /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 426 | INFOPLIST_FILE = AVLighterTableViewController/Info.plist; 427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 428 | PRODUCT_BUNDLE_IDENTIFIER = com.AVLighterTableViewController; 429 | PRODUCT_NAME = "$(TARGET_NAME)"; 430 | }; 431 | name = Debug; 432 | }; 433 | B1C1BD671C352EC30024096A /* Release */ = { 434 | isa = XCBuildConfiguration; 435 | buildSettings = { 436 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 437 | INFOPLIST_FILE = AVLighterTableViewController/Info.plist; 438 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 439 | PRODUCT_BUNDLE_IDENTIFIER = com.AVLighterTableViewController; 440 | PRODUCT_NAME = "$(TARGET_NAME)"; 441 | }; 442 | name = Release; 443 | }; 444 | B1C1BD691C352EC30024096A /* Debug */ = { 445 | isa = XCBuildConfiguration; 446 | buildSettings = { 447 | BUNDLE_LOADER = "$(TEST_HOST)"; 448 | INFOPLIST_FILE = AVLighterTableViewControllerTests/Info.plist; 449 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 450 | PRODUCT_BUNDLE_IDENTIFIER = com.AVLighterTableViewControllerTests; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AVLighterTableViewController.app/AVLighterTableViewController"; 453 | }; 454 | name = Debug; 455 | }; 456 | B1C1BD6A1C352EC30024096A /* Release */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | BUNDLE_LOADER = "$(TEST_HOST)"; 460 | INFOPLIST_FILE = AVLighterTableViewControllerTests/Info.plist; 461 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 462 | PRODUCT_BUNDLE_IDENTIFIER = com.AVLighterTableViewControllerTests; 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AVLighterTableViewController.app/AVLighterTableViewController"; 465 | }; 466 | name = Release; 467 | }; 468 | B1C1BD6C1C352EC30024096A /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | buildSettings = { 471 | INFOPLIST_FILE = AVLighterTableViewControllerUITests/Info.plist; 472 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 473 | PRODUCT_BUNDLE_IDENTIFIER = com.AVLighterTableViewControllerUITests; 474 | PRODUCT_NAME = "$(TARGET_NAME)"; 475 | TEST_TARGET_NAME = AVLighterTableViewController; 476 | USES_XCTRUNNER = YES; 477 | }; 478 | name = Debug; 479 | }; 480 | B1C1BD6D1C352EC30024096A /* Release */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | INFOPLIST_FILE = AVLighterTableViewControllerUITests/Info.plist; 484 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 485 | PRODUCT_BUNDLE_IDENTIFIER = com.AVLighterTableViewControllerUITests; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | TEST_TARGET_NAME = AVLighterTableViewController; 488 | USES_XCTRUNNER = YES; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | B1C1BD381C352EC20024096A /* Build configuration list for PBXProject "AVLighterTableViewController" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | B1C1BD631C352EC30024096A /* Debug */, 499 | B1C1BD641C352EC30024096A /* Release */, 500 | ); 501 | defaultConfigurationIsVisible = 0; 502 | defaultConfigurationName = Release; 503 | }; 504 | B1C1BD651C352EC30024096A /* Build configuration list for PBXNativeTarget "AVLighterTableViewController" */ = { 505 | isa = XCConfigurationList; 506 | buildConfigurations = ( 507 | B1C1BD661C352EC30024096A /* Debug */, 508 | B1C1BD671C352EC30024096A /* Release */, 509 | ); 510 | defaultConfigurationIsVisible = 0; 511 | }; 512 | B1C1BD681C352EC30024096A /* Build configuration list for PBXNativeTarget "AVLighterTableViewControllerTests" */ = { 513 | isa = XCConfigurationList; 514 | buildConfigurations = ( 515 | B1C1BD691C352EC30024096A /* Debug */, 516 | B1C1BD6A1C352EC30024096A /* Release */, 517 | ); 518 | defaultConfigurationIsVisible = 0; 519 | }; 520 | B1C1BD6B1C352EC30024096A /* Build configuration list for PBXNativeTarget "AVLighterTableViewControllerUITests" */ = { 521 | isa = XCConfigurationList; 522 | buildConfigurations = ( 523 | B1C1BD6C1C352EC30024096A /* Debug */, 524 | B1C1BD6D1C352EC30024096A /* Release */, 525 | ); 526 | defaultConfigurationIsVisible = 0; 527 | }; 528 | /* End XCConfigurationList section */ 529 | }; 530 | rootObject = B1C1BD351C352EC20024096A /* Project object */; 531 | } 532 | -------------------------------------------------------------------------------- /AVLighterTableViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AVLighterTableViewController.xcodeproj/project.xcworkspace/xcuserdata/angelvasa.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angelvasa/AVLighterTableViewController/cf68af48df9ead3b2e2134d4c68327ee5de6c19e/AVLighterTableViewController.xcodeproj/project.xcworkspace/xcuserdata/angelvasa.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AVLighterTableViewController.xcodeproj/xcuserdata/angelvasa.xcuserdatad/xcschemes/AVLighterTableViewController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /AVLighterTableViewController.xcodeproj/xcuserdata/angelvasa.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AVLighterTableViewController.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | B1C1BD3C1C352EC20024096A 16 | 17 | primary 18 | 19 | 20 | B1C1BD501C352EC30024096A 21 | 22 | primary 23 | 24 | 25 | B1C1BD5B1C352EC30024096A 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AVLighterTableViewController/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angelvasa/AVLighterTableViewController/cf68af48df9ead3b2e2134d4c68327ee5de6c19e/AVLighterTableViewController/.DS_Store -------------------------------------------------------------------------------- /AVLighterTableViewController/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AVLighterTableViewController 4 | // 5 | // Created by Angel Vasa on 31/12/15. 6 | // Copyright © 2015 Angel Vasa. 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 | -------------------------------------------------------------------------------- /AVLighterTableViewController/Assets.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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /AVLighterTableViewController/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /AVLighterTableViewController/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 | -------------------------------------------------------------------------------- /AVLighterTableViewController/DataSources/AVBaseTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AVBaseTableViewCell.swift 3 | // AVLighterTableViewController 4 | // 5 | // Created by Angel Vasa on 31/12/15. 6 | // Copyright © 2015 Angel Vasa. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class AVBaseTableViewCell: UITableViewCell, AVCellProtocol { 12 | 13 | override func awakeFromNib() { 14 | super.awakeFromNib() 15 | // Initialization code 16 | } 17 | 18 | override func setSelected(selected: Bool, animated: Bool) { 19 | super.setSelected(selected, animated: animated) 20 | 21 | // Configure the view for the selected state 22 | } 23 | 24 | 25 | // Override this method in subclass 26 | func data(items: AnyObject) { 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /AVLighterTableViewController/DataSources/AVTableDataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AVTableDataSource.swift 3 | // AVLighterTableViewController 4 | // 5 | // Created by Angel Vasa on 31/12/15. 6 | // Copyright © 2015 Angel Vasa. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation 11 | 12 | protocol AVCellProtocol { 13 | func data(items: AnyObject) 14 | } 15 | 16 | class AVTableDataSource: NSObject, UITableViewDelegate, UITableViewDataSource { 17 | @IBOutlet var tableView: UITableView! 18 | @IBInspectable var cellHeight: NSNumber! = 44 19 | var cellIdentifier: String = "" 20 | var tableViewCellClass : AnyClass! 21 | var tableCellNibName : String = "" 22 | var delegate : AVCellProtocol? 23 | var objects: [AnyObject] = [] 24 | var selectedObject: AnyObject -> Void = {_ in } 25 | 26 | 27 | // MARK: Cell Register 28 | func registerTableCellClass(tableViewCell: AnyClass, cellIdentifier : String) { 29 | self.cellIdentifier = cellIdentifier 30 | self.tableViewCellClass = tableViewCell 31 | self.tableView!.registerClass(tableViewCell, forCellReuseIdentifier: cellIdentifier) 32 | } 33 | 34 | func registerTableCellNib(tableCellNibName : String, cellIdentifier: String) { 35 | self.cellIdentifier = cellIdentifier 36 | self.tableCellNibName = tableCellNibName 37 | self.tableView!.registerNib(UINib(nibName: tableCellNibName, bundle: nil), forCellReuseIdentifier: cellIdentifier) 38 | } 39 | 40 | 41 | // MARK: Set Data 42 | func setupData(objects: [AnyObject]!) { 43 | self.objects = objects 44 | } 45 | 46 | 47 | // MARK: Table Delegate & DataSource 48 | func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 49 | return objects.count 50 | } 51 | 52 | func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { 53 | return self.cellHeight! as CGFloat 54 | } 55 | 56 | func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 57 | let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as (UITableViewCell) 58 | self.delegate = cell as! AVBaseTableViewCell 59 | self.delegate!.data(objects[indexPath.row]) 60 | return cell 61 | } 62 | 63 | 64 | func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 65 | self.selectedObject(self.objects[indexPath.row]) 66 | } 67 | 68 | 69 | // MARK: Blocks 70 | func selectedObject(selectedObject: AnyObject -> Void) { 71 | self.selectedObject = selectedObject 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /AVLighterTableViewController/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /AVLighterTableViewController/MyCustomTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MyCustomTableViewCell.swift 3 | // AVLighterTableViewController 4 | // 5 | // Created by Angel Vasa on 31/12/15. 6 | // Copyright © 2015 Angel Vasa. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MyCustomTableViewCell: AVBaseTableViewCell { 12 | 13 | @IBOutlet weak var label: UILabel! 14 | 15 | override func awakeFromNib() { 16 | super.awakeFromNib() 17 | // Initialization code 18 | } 19 | 20 | override func setSelected(selected: Bool, animated: Bool) { 21 | super.setSelected(selected, animated: animated) 22 | 23 | // Configure the view for the selected state 24 | } 25 | 26 | override func data(items: AnyObject) { 27 | super.data(items) 28 | print(items) 29 | label.text = items as? String 30 | } 31 | 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /AVLighterTableViewController/MyCustomTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /AVLighterTableViewController/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // AVLighterTableViewController 4 | // 5 | // Created by Angel Vasa on 31/12/15. 6 | // Copyright © 2015 Angel Vasa. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet var dataSource : AVTableDataSource! 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | // Do any additional setup after loading the view, typically from a nib. 17 | 18 | self.dataSource.registerTableCellNib("MyCustomTableViewCell", cellIdentifier: "myCell") 19 | self.dataSource.setupData(["One", "Two", "Three"]) // Pass your object after server call 20 | self.dataSource.selectedObject { (selectedObject) -> Void in 21 | print(selectedObject) 22 | } 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /AVLighterTableViewControllerTests/AVLighterTableViewControllerTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AVLighterTableViewControllerTests.swift 3 | // AVLighterTableViewControllerTests 4 | // 5 | // Created by Angel Vasa on 31/12/15. 6 | // Copyright © 2015 Angel Vasa. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import AVLighterTableViewController 11 | 12 | class AVLighterTableViewControllerTests: 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 | // Use XCTAssert and related functions to verify your tests produce the correct results. 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 | -------------------------------------------------------------------------------- /AVLighterTableViewControllerTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | -------------------------------------------------------------------------------- /AVLighterTableViewControllerUITests/AVLighterTableViewControllerUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AVLighterTableViewControllerUITests.swift 3 | // AVLighterTableViewControllerUITests 4 | // 5 | // Created by Angel Vasa on 31/12/15. 6 | // Copyright © 2015 Angel Vasa. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AVLighterTableViewControllerUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /AVLighterTableViewControllerUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # AVLighterTableViewController 2 | 3 | **Why AVLighterTableViewController?** 4 | 5 | As an iOS developer, we need to use UITableView as a basic component for any of our project and we need to implement delegates and datasource in each and every view controller but as a solution we can make one lighter delegate & datasoucre class which will handle all the mess for you. 6 | 7 | 8 | **How to use it** 9 | 10 | You just need to copy 2 classes from above demo project 11 | 12 | 13 | **1) AVTableDataSource** 14 | 15 | **2) AVBaseTableViewCell** 16 | 17 | -- After copying this class you need to add NSObject into your storyboard, and apply custom class to AVTableDataSource for that NSObject 18 | 19 | -- Now connect tableview outlet of NSObject to your tableview 20 | 21 | -- Apply tableview's delegate and datasource to NSObject 22 | 23 | -- Now create custom cell with xib and subclass that class with AVBaseTableViewCell 24 | 25 | -- In your viewcontroller you can add below line and you are done!! 26 | 27 | ``` 28 | self.dataSource.registerTableCellNib("MyCustomTableViewCell", cellIdentifier: "myCell") 29 | self.dataSource.setupData(["One", "Two", "Three"]) // Pass your object after server call 30 | self.dataSource.selectedObject { (selectedObject) -> Void in 31 | print(selectedObject) 32 | } 33 | ``` 34 | 35 | -- Hope you like it. 36 | 37 | **If you have any query or suggestion you can always contact me at vasaangel91@gmail.com** 38 | --------------------------------------------------------------------------------