diff --git a/ExpandTableViewTests/ExpandTableViewTests-Info.plist b/ExpandTableViewTests/ExpandTableViewTests-Info.plist deleted file mode 100644 index 6485d3c..0000000 --- a/ExpandTableViewTests/ExpandTableViewTests-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - JackKwok.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/ExpandTableViewTests/ExpandTableViewTests.h b/ExpandTableViewTests/ExpandTableViewTests.h deleted file mode 100644 index e7dd43f..0000000 --- a/ExpandTableViewTests/ExpandTableViewTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ExpandTableViewTests.h -// ExpandTableViewTests -// -// Created by Jack Kwok on 7/5/13. -// Copyright (c) 2013 Jack Kwok. All rights reserved. -// - -#import - -@interface ExpandTableViewTests : SenTestCase - -@end diff --git a/ExpandTableViewTests/ExpandTableViewTests.m b/ExpandTableViewTests/ExpandTableViewTests.m deleted file mode 100644 index 93ed635..0000000 --- a/ExpandTableViewTests/ExpandTableViewTests.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// ExpandTableViewTests.m -// ExpandTableViewTests -// -// Created by Jack Kwok on 7/5/13. -// Copyright (c) 2013 Jack Kwok. All rights reserved. -// - -#import "ExpandTableViewTests.h" - -@implementation ExpandTableViewTests - -- (void)setUp -{ - [super setUp]; - - // Set-up code here. -} - -- (void)tearDown -{ - // Tear-down code here. - - [super tearDown]; -} - -- (void)testExample -{ - STFail(@"Unit tests are not implemented yet in ExpandTableViewTests"); -} - -@end diff --git a/ExpandTableViewTests/en.lproj/InfoPlist.strings b/ExpandTableViewTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/ExpandTableViewTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/JKExpandTableView/JKExpandTableView.xcodeproj/project.pbxproj b/JKExpandTableView/JKExpandTableView.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3c48147 --- /dev/null +++ b/JKExpandTableView/JKExpandTableView.xcodeproj/project.pbxproj @@ -0,0 +1,440 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + BCB63C7717CCC79C00CB4300 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCBDDA6D17CCB0F7005E4024 /* CoreFoundation.framework */; }; + BCB63C8217CCC7AF00CB4300 /* arrow-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = BCBDDA1F17CCAD7A005E4024 /* arrow-icon.png */; }; + BCB63C8317CCC7AF00CB4300 /* arrow-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BCBDDA2017CCAD7A005E4024 /* arrow-icon@2x.png */; }; + BCB63C8417CCC7AF00CB4300 /* checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = BCBDDA2117CCAD7A005E4024 /* checkmark.png */; }; + BCB63C8517CCC7AF00CB4300 /* checkmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BCBDDA2217CCAD7A005E4024 /* checkmark@2x.png */; }; + BCBDD9F717CCAD19005E4024 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCBDD9F617CCAD19005E4024 /* Foundation.framework */; }; + BCBDDA2F17CCAD7A005E4024 /* JKExpandTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDDA2417CCAD7A005E4024 /* JKExpandTableView.m */; }; + BCBDDA3017CCAD7A005E4024 /* JKMultiSelectSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDDA2617CCAD7A005E4024 /* JKMultiSelectSubTableViewCell.m */; }; + BCBDDA3117CCAD7A005E4024 /* JKParentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDDA2817CCAD7A005E4024 /* JKParentTableViewCell.m */; }; + BCBDDA3217CCAD7A005E4024 /* JKSingleSelectSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDDA2A17CCAD7A005E4024 /* JKSingleSelectSubTableViewCell.m */; }; + BCBDDA3317CCAD7A005E4024 /* JKSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDDA2C17CCAD7A005E4024 /* JKSubTableViewCell.m */; }; + BCBDDA3417CCAD7A005E4024 /* JKSubTableViewCellCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDDA2E17CCAD7A005E4024 /* JKSubTableViewCellCell.m */; }; + BCBDDA3517CCADBB005E4024 /* JKExpandTableView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = BCBDDA2317CCAD7A005E4024 /* JKExpandTableView.h */; }; + BCBDDA3617CCADBB005E4024 /* JKMultiSelectSubTableViewCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = BCBDDA2517CCAD7A005E4024 /* JKMultiSelectSubTableViewCell.h */; }; + BCBDDA3717CCADBB005E4024 /* JKParentTableViewCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = BCBDDA2717CCAD7A005E4024 /* JKParentTableViewCell.h */; }; + BCBDDA3817CCADBB005E4024 /* JKSingleSelectSubTableViewCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = BCBDDA2917CCAD7A005E4024 /* JKSingleSelectSubTableViewCell.h */; }; + BCBDDA3917CCADBB005E4024 /* JKSubTableViewCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = BCBDDA2B17CCAD7A005E4024 /* JKSubTableViewCell.h */; }; + BCBDDA3A17CCADBB005E4024 /* JKSubTableViewCellCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = BCBDDA2D17CCAD7A005E4024 /* JKSubTableViewCellCell.h */; }; + BCBDDA3C17CCADC7005E4024 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCBDDA3B17CCADC7005E4024 /* UIKit.framework */; }; + BCBDDA3E17CCADDF005E4024 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCBDDA3D17CCADDF005E4024 /* CoreGraphics.framework */; }; + BCBDDA8A17CCB445005E4024 /* NSBundle+JKExpandTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDDA8917CCB445005E4024 /* NSBundle+JKExpandTableView.m */; }; + BCBDDA8D17CCB455005E4024 /* UIImage+JKExpandTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDDA8C17CCB455005E4024 /* UIImage+JKExpandTableView.m */; }; + BCBDDA8E17CCB4DB005E4024 /* NSBundle+JKExpandTableView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = BCBDDA8817CCB445005E4024 /* NSBundle+JKExpandTableView.h */; }; + BCBDDA8F17CCB4DB005E4024 /* UIImage+JKExpandTableView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = BCBDDA8B17CCB455005E4024 /* UIImage+JKExpandTableView.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + BCBDD9F117CCAD19005E4024 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/${PRODUCT_NAME}"; + dstSubfolderSpec = 16; + files = ( + BCBDDA8E17CCB4DB005E4024 /* NSBundle+JKExpandTableView.h in CopyFiles */, + BCBDDA8F17CCB4DB005E4024 /* UIImage+JKExpandTableView.h in CopyFiles */, + BCBDDA3517CCADBB005E4024 /* JKExpandTableView.h in CopyFiles */, + BCBDDA3617CCADBB005E4024 /* JKMultiSelectSubTableViewCell.h in CopyFiles */, + BCBDDA3717CCADBB005E4024 /* JKParentTableViewCell.h in CopyFiles */, + BCBDDA3817CCADBB005E4024 /* JKSingleSelectSubTableViewCell.h in CopyFiles */, + BCBDDA3917CCADBB005E4024 /* JKSubTableViewCell.h in CopyFiles */, + BCBDDA3A17CCADBB005E4024 /* JKSubTableViewCellCell.h in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + BCB63C7617CCC79C00CB4300 /* JKExpandTableViewResources.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JKExpandTableViewResources.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + BCBDD9F317CCAD19005E4024 /* libJKExpandTableView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJKExpandTableView.a; sourceTree = BUILT_PRODUCTS_DIR; }; + BCBDD9F617CCAD19005E4024 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + BCBDD9FA17CCAD19005E4024 /* JKExpandTableView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JKExpandTableView-Prefix.pch"; sourceTree = ""; }; + BCBDDA1F17CCAD7A005E4024 /* arrow-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "arrow-icon.png"; sourceTree = ""; }; + BCBDDA2017CCAD7A005E4024 /* arrow-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "arrow-icon@2x.png"; sourceTree = ""; }; + BCBDDA2117CCAD7A005E4024 /* checkmark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = checkmark.png; sourceTree = ""; }; + BCBDDA2217CCAD7A005E4024 /* checkmark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkmark@2x.png"; sourceTree = ""; }; + BCBDDA2317CCAD7A005E4024 /* JKExpandTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JKExpandTableView.h; sourceTree = ""; }; + BCBDDA2417CCAD7A005E4024 /* JKExpandTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JKExpandTableView.m; sourceTree = ""; }; + BCBDDA2517CCAD7A005E4024 /* JKMultiSelectSubTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JKMultiSelectSubTableViewCell.h; sourceTree = ""; }; + BCBDDA2617CCAD7A005E4024 /* JKMultiSelectSubTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JKMultiSelectSubTableViewCell.m; sourceTree = ""; }; + BCBDDA2717CCAD7A005E4024 /* JKParentTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JKParentTableViewCell.h; sourceTree = ""; }; + BCBDDA2817CCAD7A005E4024 /* JKParentTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JKParentTableViewCell.m; sourceTree = ""; }; + BCBDDA2917CCAD7A005E4024 /* JKSingleSelectSubTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JKSingleSelectSubTableViewCell.h; sourceTree = ""; }; + BCBDDA2A17CCAD7A005E4024 /* JKSingleSelectSubTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JKSingleSelectSubTableViewCell.m; sourceTree = ""; }; + BCBDDA2B17CCAD7A005E4024 /* JKSubTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JKSubTableViewCell.h; sourceTree = ""; }; + BCBDDA2C17CCAD7A005E4024 /* JKSubTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JKSubTableViewCell.m; sourceTree = ""; }; + BCBDDA2D17CCAD7A005E4024 /* JKSubTableViewCellCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JKSubTableViewCellCell.h; sourceTree = ""; }; + BCBDDA2E17CCAD7A005E4024 /* JKSubTableViewCellCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JKSubTableViewCellCell.m; sourceTree = ""; }; + BCBDDA3B17CCADC7005E4024 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + BCBDDA3D17CCADDF005E4024 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + BCBDDA6D17CCB0F7005E4024 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + BCBDDA8817CCB445005E4024 /* NSBundle+JKExpandTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+JKExpandTableView.h"; sourceTree = ""; }; + BCBDDA8917CCB445005E4024 /* NSBundle+JKExpandTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+JKExpandTableView.m"; sourceTree = ""; }; + BCBDDA8B17CCB455005E4024 /* UIImage+JKExpandTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+JKExpandTableView.h"; sourceTree = ""; }; + BCBDDA8C17CCB455005E4024 /* UIImage+JKExpandTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+JKExpandTableView.m"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + BCB63C7317CCC79C00CB4300 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BCB63C7717CCC79C00CB4300 /* CoreFoundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BCBDD9F017CCAD19005E4024 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BCBDDA3E17CCADDF005E4024 /* CoreGraphics.framework in Frameworks */, + BCBDDA3C17CCADC7005E4024 /* UIKit.framework in Frameworks */, + BCBDD9F717CCAD19005E4024 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + BCBDD9EA17CCAD19005E4024 = { + isa = PBXGroup; + children = ( + BCBDD9F817CCAD19005E4024 /* JKExpandTableView */, + BCBDD9F517CCAD19005E4024 /* Frameworks */, + BCBDD9F417CCAD19005E4024 /* Products */, + ); + sourceTree = ""; + }; + BCBDD9F417CCAD19005E4024 /* Products */ = { + isa = PBXGroup; + children = ( + BCBDD9F317CCAD19005E4024 /* libJKExpandTableView.a */, + BCB63C7617CCC79C00CB4300 /* JKExpandTableViewResources.bundle */, + ); + name = Products; + sourceTree = ""; + }; + BCBDD9F517CCAD19005E4024 /* Frameworks */ = { + isa = PBXGroup; + children = ( + BCBDDA3D17CCADDF005E4024 /* CoreGraphics.framework */, + BCBDDA3B17CCADC7005E4024 /* UIKit.framework */, + BCBDD9F617CCAD19005E4024 /* Foundation.framework */, + BCBDDA6D17CCB0F7005E4024 /* CoreFoundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + BCBDD9F817CCAD19005E4024 /* JKExpandTableView */ = { + isa = PBXGroup; + children = ( + BCBDDA1E17CCAD7A005E4024 /* img */, + BCBDDA8717CCB425005E4024 /* Extensions */, + BCBDDA2317CCAD7A005E4024 /* JKExpandTableView.h */, + BCBDDA2417CCAD7A005E4024 /* JKExpandTableView.m */, + BCBDDA2517CCAD7A005E4024 /* JKMultiSelectSubTableViewCell.h */, + BCBDDA2617CCAD7A005E4024 /* JKMultiSelectSubTableViewCell.m */, + BCBDDA2717CCAD7A005E4024 /* JKParentTableViewCell.h */, + BCBDDA2817CCAD7A005E4024 /* JKParentTableViewCell.m */, + BCBDDA2917CCAD7A005E4024 /* JKSingleSelectSubTableViewCell.h */, + BCBDDA2A17CCAD7A005E4024 /* JKSingleSelectSubTableViewCell.m */, + BCBDDA2B17CCAD7A005E4024 /* JKSubTableViewCell.h */, + BCBDDA2C17CCAD7A005E4024 /* JKSubTableViewCell.m */, + BCBDDA2D17CCAD7A005E4024 /* JKSubTableViewCellCell.h */, + BCBDDA2E17CCAD7A005E4024 /* JKSubTableViewCellCell.m */, + BCBDD9F917CCAD19005E4024 /* Supporting Files */, + ); + path = JKExpandTableView; + sourceTree = ""; + }; + BCBDD9F917CCAD19005E4024 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + BCBDD9FA17CCAD19005E4024 /* JKExpandTableView-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + BCBDDA1E17CCAD7A005E4024 /* img */ = { + isa = PBXGroup; + children = ( + BCBDDA1F17CCAD7A005E4024 /* arrow-icon.png */, + BCBDDA2017CCAD7A005E4024 /* arrow-icon@2x.png */, + BCBDDA2117CCAD7A005E4024 /* checkmark.png */, + BCBDDA2217CCAD7A005E4024 /* checkmark@2x.png */, + ); + path = img; + sourceTree = ""; + }; + BCBDDA8717CCB425005E4024 /* Extensions */ = { + isa = PBXGroup; + children = ( + BCBDDA8817CCB445005E4024 /* NSBundle+JKExpandTableView.h */, + BCBDDA8917CCB445005E4024 /* NSBundle+JKExpandTableView.m */, + BCBDDA8B17CCB455005E4024 /* UIImage+JKExpandTableView.h */, + BCBDDA8C17CCB455005E4024 /* UIImage+JKExpandTableView.m */, + ); + path = Extensions; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + BCB63C7517CCC79C00CB4300 /* JKExpandTableViewResources */ = { + isa = PBXNativeTarget; + buildConfigurationList = BCB63C8117CCC79C00CB4300 /* Build configuration list for PBXNativeTarget "JKExpandTableViewResources" */; + buildPhases = ( + BCB63C7217CCC79C00CB4300 /* Sources */, + BCB63C7317CCC79C00CB4300 /* Frameworks */, + BCB63C7417CCC79C00CB4300 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = JKExpandTableViewResources; + productName = JKExpandTableViewResources; + productReference = BCB63C7617CCC79C00CB4300 /* JKExpandTableViewResources.bundle */; + productType = "com.apple.product-type.bundle"; + }; + BCBDD9F217CCAD19005E4024 /* JKExpandTableView */ = { + isa = PBXNativeTarget; + buildConfigurationList = BCBDDA1817CCAD19005E4024 /* Build configuration list for PBXNativeTarget "JKExpandTableView" */; + buildPhases = ( + BCBDD9EF17CCAD19005E4024 /* Sources */, + BCBDD9F017CCAD19005E4024 /* Frameworks */, + BCBDD9F117CCAD19005E4024 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = JKExpandTableView; + productName = JKExpandTableView; + productReference = BCBDD9F317CCAD19005E4024 /* libJKExpandTableView.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BCBDD9EB17CCAD19005E4024 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + ORGANIZATIONNAME = "Jack-Kwok"; + }; + buildConfigurationList = BCBDD9EE17CCAD19005E4024 /* Build configuration list for PBXProject "JKExpandTableView" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = BCBDD9EA17CCAD19005E4024; + productRefGroup = BCBDD9F417CCAD19005E4024 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + BCBDD9F217CCAD19005E4024 /* JKExpandTableView */, + BCB63C7517CCC79C00CB4300 /* JKExpandTableViewResources */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + BCB63C7417CCC79C00CB4300 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BCB63C8217CCC7AF00CB4300 /* arrow-icon.png in Resources */, + BCB63C8317CCC7AF00CB4300 /* arrow-icon@2x.png in Resources */, + BCB63C8417CCC7AF00CB4300 /* checkmark.png in Resources */, + BCB63C8517CCC7AF00CB4300 /* checkmark@2x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + BCB63C7217CCC79C00CB4300 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BCBDD9EF17CCAD19005E4024 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BCBDDA2F17CCAD7A005E4024 /* JKExpandTableView.m in Sources */, + BCBDDA3017CCAD7A005E4024 /* JKMultiSelectSubTableViewCell.m in Sources */, + BCBDDA3117CCAD7A005E4024 /* JKParentTableViewCell.m in Sources */, + BCBDDA3217CCAD7A005E4024 /* JKSingleSelectSubTableViewCell.m in Sources */, + BCBDDA3317CCAD7A005E4024 /* JKSubTableViewCell.m in Sources */, + BCBDDA3417CCAD7A005E4024 /* JKSubTableViewCellCell.m in Sources */, + BCBDDA8A17CCB445005E4024 /* NSBundle+JKExpandTableView.m in Sources */, + BCBDDA8D17CCB455005E4024 /* UIImage+JKExpandTableView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + BCB63C7F17CCC79C00CB4300 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "JKExpandTableViewResources/JKExpandTableViewResources-Prefix.pch"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INFOPLIST_FILE = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + BCB63C8017CCC79C00CB4300 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "JKExpandTableViewResources/JKExpandTableViewResources-Prefix.pch"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INFOPLIST_FILE = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + BCBDDA1617CCAD19005E4024 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + BCBDDA1717CCAD19005E4024 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + BCBDDA1917CCAD19005E4024 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/JKExpandTableView.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "JKExpandTableView/JKExpandTableView-Prefix.pch"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + BCBDDA1A17CCAD19005E4024 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/JKExpandTableView.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "JKExpandTableView/JKExpandTableView-Prefix.pch"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + BCB63C8117CCC79C00CB4300 /* Build configuration list for PBXNativeTarget "JKExpandTableViewResources" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BCB63C7F17CCC79C00CB4300 /* Debug */, + BCB63C8017CCC79C00CB4300 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BCBDD9EE17CCAD19005E4024 /* Build configuration list for PBXProject "JKExpandTableView" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BCBDDA1617CCAD19005E4024 /* Debug */, + BCBDDA1717CCAD19005E4024 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BCBDDA1817CCAD19005E4024 /* Build configuration list for PBXNativeTarget "JKExpandTableView" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BCBDDA1917CCAD19005E4024 /* Debug */, + BCBDDA1A17CCAD19005E4024 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BCBDD9EB17CCAD19005E4024 /* Project object */; +} diff --git a/JKExpandTableView/JKExpandTableView/Extensions/NSBundle+JKExpandTableView.h b/JKExpandTableView/JKExpandTableView/Extensions/NSBundle+JKExpandTableView.h new file mode 100644 index 0000000..94af55f --- /dev/null +++ b/JKExpandTableView/JKExpandTableView/Extensions/NSBundle+JKExpandTableView.h @@ -0,0 +1,15 @@ +// +// NSBundle+JKExpandTableView.h +// JKExpandTableView +// +// Created by Andrey Yastrebov on 27.08.13. +// Copyright (c) 2013 Jack-Kwok. All rights reserved. +// + +#import + +@interface NSBundle (JKExpandTableView) + ++ (NSBundle*)expandTableViewResourcesBundle; + +@end diff --git a/JKExpandTableView/JKExpandTableView/Extensions/NSBundle+JKExpandTableView.m b/JKExpandTableView/JKExpandTableView/Extensions/NSBundle+JKExpandTableView.m new file mode 100644 index 0000000..5e3bb4d --- /dev/null +++ b/JKExpandTableView/JKExpandTableView/Extensions/NSBundle+JKExpandTableView.m @@ -0,0 +1,22 @@ +// +// NSBundle+JKExpandTableView.m +// JKExpandTableView +// +// Created by Andrey Yastrebov on 27.08.13. +// Copyright (c) 2013 Jack-Kwok. All rights reserved. +// + +#import "NSBundle+JKExpandTableView.h" + +@implementation NSBundle (JKExpandTableView) + ++ (NSBundle*)expandTableViewResourcesBundle { + static dispatch_once_t onceToken; + static NSBundle *myLibraryResourcesBundle = nil; + dispatch_once(&onceToken, ^{ + myLibraryResourcesBundle = [NSBundle bundleWithURL:[[NSBundle mainBundle] URLForResource:@"JKExpandTableViewResources" withExtension:@"bundle"]]; + }); + return myLibraryResourcesBundle; +} + +@end diff --git a/JKExpandTableView/JKExpandTableView/Extensions/UIImage+JKExpandTableView.h b/JKExpandTableView/JKExpandTableView/Extensions/UIImage+JKExpandTableView.h new file mode 100644 index 0000000..f9ed049 --- /dev/null +++ b/JKExpandTableView/JKExpandTableView/Extensions/UIImage+JKExpandTableView.h @@ -0,0 +1,13 @@ +// +// UIImage+JKExpandTableView.h +// JKExpandTableView +// +// Created by Andrey Yastrebov on 27.08.13. +// Copyright (c) 2013 Jack-Kwok. All rights reserved. +// + +#import + +@interface UIImage (JKExpandTableView) ++ (UIImage*)expandTableViewImageNamed:(NSString*)name; +@end diff --git a/JKExpandTableView/JKExpandTableView/Extensions/UIImage+JKExpandTableView.m b/JKExpandTableView/JKExpandTableView/Extensions/UIImage+JKExpandTableView.m new file mode 100644 index 0000000..d48d3c7 --- /dev/null +++ b/JKExpandTableView/JKExpandTableView/Extensions/UIImage+JKExpandTableView.m @@ -0,0 +1,31 @@ +// +// UIImage+JKExpandTableView.m +// JKExpandTableView +// +// Created by Andrey Yastrebov on 27.08.13. +// Copyright (c) 2013 Jack-Kwok. All rights reserved. +// + +#import "UIImage+JKExpandTableView.h" +#import "NSBundle+JKExpandTableView.h" + +@implementation UIImage (JKExpandTableView) + ++ (UIImage*)expandTableViewImageNamed:(NSString*)name { + UIImage *imageFromMainBundle = [UIImage imageNamed:name]; + if (imageFromMainBundle) { + return imageFromMainBundle; + } + + NSString *path = [[[NSBundle expandTableViewResourcesBundle] resourcePath] stringByAppendingPathComponent:name]; + + if ([path pathExtension].length == 0) + { + path = [path stringByAppendingPathExtension:@"png"]; + } + + UIImage *imageFromMyLibraryBundle = [UIImage imageWithContentsOfFile:path]; + return imageFromMyLibraryBundle; +} + +@end diff --git a/JKExpandTableView/JKExpandTableView/JKExpandTableView-Prefix.pch b/JKExpandTableView/JKExpandTableView/JKExpandTableView-Prefix.pch new file mode 100644 index 0000000..56467fc --- /dev/null +++ b/JKExpandTableView/JKExpandTableView/JKExpandTableView-Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'JKExpandTableView' target in the 'JKExpandTableView' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/ExpandTableView/JKExpandTableView.h b/JKExpandTableView/JKExpandTableView/JKExpandTableView.h similarity index 94% rename from ExpandTableView/JKExpandTableView.h rename to JKExpandTableView/JKExpandTableView/JKExpandTableView.h index 69ac40b..417dbe5 100644 --- a/ExpandTableView/JKExpandTableView.h +++ b/JKExpandTableView/JKExpandTableView/JKExpandTableView.h @@ -122,6 +122,14 @@ */ - (UIImage *) iconForCellAtChildIndex:(NSInteger) childIndex withinParentCellIndex:(NSInteger) parentIndex; +/*! Optional method + + @param childIndex The child index in question + @param parentIndex The parent index in question + @return CGFloat padding for selected indicator image. + */ +- (CGFloat) selectionIconPaddingForParentIndex:(NSInteger) parentIndex; + /*! Optional method @return YES if the parent icon should be rotated 90 degrees when parent is toggled. Otherwise, return NO. diff --git a/ExpandTableView/JKExpandTableView.m b/JKExpandTableView/JKExpandTableView/JKExpandTableView.m similarity index 96% rename from ExpandTableView/JKExpandTableView.m rename to JKExpandTableView/JKExpandTableView/JKExpandTableView.m index 607386f..3d6b993 100644 --- a/ExpandTableView/JKExpandTableView.m +++ b/JKExpandTableView/JKExpandTableView/JKExpandTableView.m @@ -275,6 +275,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N [cell.label setFont:font]; } + CGFloat selectionIndicatorPadding = [self.dataSourceDelegate selectionIconPaddingForParentIndex:parentIndex]; + [cell setSelectionIndicatorPadding:selectionIndicatorPadding]; + NSString * labelStr = [self.dataSourceDelegate labelForParentCellAtIndex:parentIndex]; [[cell label] setText:labelStr]; @@ -376,6 +379,15 @@ - (UIImage *) iconForChildIndex:(NSInteger)childIndex underParentIndex:(NSIntege } } +- (CGFloat) selectionIconPaddingForParentIndex:(NSInteger)parentIndex +{ + if ([self.dataSourceDelegate respondsToSelector:@selector(selectionIconPaddingForParentIndex:)]) { + return [self.dataSourceDelegate selectionIconPaddingForParentIndex:parentIndex]; + } else { + return 16.f; + } +} + - (BOOL) hasSelectedChild:(NSUInteger) parentIndex { NSInteger numberOfChildren = [self.dataSourceDelegate numberOfChildCellsUnderParentIndex:parentIndex]; BOOL result = NO; diff --git a/ExpandTableView/JKMultiSelectSubTableViewCell.h b/JKExpandTableView/JKExpandTableView/JKMultiSelectSubTableViewCell.h similarity index 100% rename from ExpandTableView/JKMultiSelectSubTableViewCell.h rename to JKExpandTableView/JKExpandTableView/JKMultiSelectSubTableViewCell.h diff --git a/ExpandTableView/JKMultiSelectSubTableViewCell.m b/JKExpandTableView/JKExpandTableView/JKMultiSelectSubTableViewCell.m similarity index 100% rename from ExpandTableView/JKMultiSelectSubTableViewCell.m rename to JKExpandTableView/JKExpandTableView/JKMultiSelectSubTableViewCell.m diff --git a/ExpandTableView/JKParentTableViewCell.h b/JKExpandTableView/JKExpandTableView/JKParentTableViewCell.h similarity index 90% rename from ExpandTableView/JKParentTableViewCell.h rename to JKExpandTableView/JKExpandTableView/JKParentTableViewCell.h index 3c0ae2e..cd762e0 100644 --- a/ExpandTableView/JKParentTableViewCell.h +++ b/JKExpandTableView/JKExpandTableView/JKParentTableViewCell.h @@ -13,6 +13,7 @@ UILabel *label; UIImageView *selectionIndicatorImgView; NSInteger parentIndex; + CGFloat selectionIndicatorPadding; } @property (nonatomic,strong) UIImageView *iconImage; @@ -20,6 +21,7 @@ @property (nonatomic,strong) UIImage *selectionIndicatorImg; @property (nonatomic,strong) UIImageView *selectionIndicatorImgView; @property (nonatomic) NSInteger parentIndex; +@property (nonatomic) CGFloat selectionIndicatorPadding; - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier; - (void)setupDisplay; diff --git a/ExpandTableView/JKParentTableViewCell.m b/JKExpandTableView/JKExpandTableView/JKParentTableViewCell.m similarity index 92% rename from ExpandTableView/JKParentTableViewCell.m rename to JKExpandTableView/JKExpandTableView/JKParentTableViewCell.m index 27303dc..689fb6b 100644 --- a/ExpandTableView/JKParentTableViewCell.m +++ b/JKExpandTableView/JKExpandTableView/JKParentTableViewCell.m @@ -7,10 +7,11 @@ // #import "JKParentTableViewCell.h" +#import "UIImage+JKExpandTableView.h" @implementation JKParentTableViewCell -@synthesize label,iconImage,selectionIndicatorImgView,parentIndex,selectionIndicatorImg; +@synthesize label,iconImage,selectionIndicatorImgView,parentIndex,selectionIndicatorImg,selectionIndicatorPadding; - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier; { self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; @@ -65,16 +66,19 @@ - (void)setupDisplay { CGFloat sidePadding = 6.0; CGFloat icon2LabelPadding = 6.0; - CGFloat checkMarkPadding = 16.0; + if (selectionIndicatorPadding == 0) + { + selectionIndicatorPadding = 16.0; + } [self.contentView setAutoresizesSubviews:YES]; self.iconImage.frame = CGRectMake(sidePadding, (contentAreaHeight - iconHeight)/2, iconWidth, iconHeight); CGFloat XOffset = iconWidth + sidePadding + icon2LabelPadding; - CGFloat labelWidth = contentAreaWidth - XOffset - checkMarkWidth - checkMarkPadding; + CGFloat labelWidth = contentAreaWidth - XOffset - checkMarkWidth - selectionIndicatorPadding; self.label.frame = CGRectMake(XOffset, 0, labelWidth, contentAreaHeight); //self.label.backgroundColor = [UIColor redColor]; - self.selectionIndicatorImgView.frame = CGRectMake(contentAreaWidth - checkMarkWidth - checkMarkPadding, + self.selectionIndicatorImgView.frame = CGRectMake(contentAreaWidth - checkMarkWidth - selectionIndicatorPadding, (contentRect.size.height/2)-(checkMarkHeight/2), checkMarkWidth, checkMarkHeight); @@ -97,7 +101,7 @@ - (void)rotateIconToCollapsed { - (void)selectionIndicatorState:(BOOL) visible { // if (!self.selectionIndicatorImg) { - self.selectionIndicatorImg = [UIImage imageNamed:@"checkmark"]; + self.selectionIndicatorImg = [UIImage expandTableViewImageNamed:@"checkmark"]; } self.selectionIndicatorImgView.image = self.selectionIndicatorImg; // probably better to init this elsewhere if (visible) { diff --git a/ExpandTableView/JKSingleSelectSubTableViewCell.h b/JKExpandTableView/JKExpandTableView/JKSingleSelectSubTableViewCell.h similarity index 100% rename from ExpandTableView/JKSingleSelectSubTableViewCell.h rename to JKExpandTableView/JKExpandTableView/JKSingleSelectSubTableViewCell.h diff --git a/ExpandTableView/JKSingleSelectSubTableViewCell.m b/JKExpandTableView/JKExpandTableView/JKSingleSelectSubTableViewCell.m similarity index 100% rename from ExpandTableView/JKSingleSelectSubTableViewCell.m rename to JKExpandTableView/JKExpandTableView/JKSingleSelectSubTableViewCell.m diff --git a/ExpandTableView/JKSubTableViewCell.h b/JKExpandTableView/JKExpandTableView/JKSubTableViewCell.h similarity index 91% rename from ExpandTableView/JKSubTableViewCell.h rename to JKExpandTableView/JKExpandTableView/JKSubTableViewCell.h index a8491b9..6215b8e 100644 --- a/ExpandTableView/JKSubTableViewCell.h +++ b/JKExpandTableView/JKExpandTableView/JKSubTableViewCell.h @@ -24,6 +24,8 @@ - (NSString *) labelForChildIndex:(NSInteger)childIndex underParentIndex:(NSInteger)parentIndex; // get the icon image - (UIImage *) iconForChildIndex:(NSInteger)childIndex underParentIndex:(NSInteger)parentIndex; +// get padding +- (CGFloat) selectionIconPaddingForParentIndex:(NSInteger)parentIndex; @end @interface JKSubTableViewCell : UITableViewCell { @@ -33,11 +35,13 @@ UIColor *fgColor; UIFont *font; UIImage *selectionIndicatorImg; + CGFloat selectionIndicatorPadding; } @property(nonatomic,strong) UITableView *insideTableView; @property(nonatomic,weak,getter = getDelegate, setter = setDelegate:) id delegate; @property(nonatomic) NSInteger parentIndex; +@property(nonatomic) CGFloat selectionIndicatorPadding; @property(nonatomic,strong) UIImage *selectionIndicatorImg; @property(nonatomic,strong,getter = getSubTableForegroundColor, setter = setSubTableForegroundColor:) UIColor *fgColor; diff --git a/ExpandTableView/JKSubTableViewCell.m b/JKExpandTableView/JKExpandTableView/JKSubTableViewCell.m similarity index 93% rename from ExpandTableView/JKSubTableViewCell.m rename to JKExpandTableView/JKExpandTableView/JKSubTableViewCell.m index 86fcfbc..73bf9da 100644 --- a/ExpandTableView/JKSubTableViewCell.m +++ b/JKExpandTableView/JKExpandTableView/JKSubTableViewCell.m @@ -8,10 +8,11 @@ #import "JKSubTableViewCell.h" #import "JKSubTableViewCellCell.h" +#import "UIImage+JKExpandTableView.h" @implementation JKSubTableViewCell -@synthesize insideTableView, selectionIndicatorImg; +@synthesize insideTableView, selectionIndicatorImg, selectionIndicatorPadding; #define HEIGHT_FOR_CELL 44.0 @@ -78,7 +79,7 @@ -(void) setSubTableFont:(UIFont *) p_font { - (UIImage *) selectionIndicatorImgOrDefault { if (!self.selectionIndicatorImg) { - self.selectionIndicatorImg = [UIImage imageNamed:@"checkmark"]; + self.selectionIndicatorImg = [UIImage expandTableViewImageNamed:@"checkmark"]; } return self.selectionIndicatorImg; } @@ -110,6 +111,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N NSInteger row = [indexPath row]; cell.titleLabel.text = [self.delegate labelForChildIndex:row underParentIndex:self.parentIndex]; cell.iconImage.image = [self.delegate iconForChildIndex:row underParentIndex:self.parentIndex]; + cell.selectionIndicatorPadding = [self.delegate selectionIconPaddingForParentIndex:self.parentIndex]; cell.selectionIndicatorImg.image = [self selectionIndicatorImgOrDefault]; BOOL isRowSelected = [self.delegate isSelectedForChildIndex:row underParentIndex:self.parentIndex]; diff --git a/ExpandTableView/JKSubTableViewCellCell.h b/JKExpandTableView/JKExpandTableView/JKSubTableViewCellCell.h similarity index 87% rename from ExpandTableView/JKSubTableViewCellCell.h rename to JKExpandTableView/JKExpandTableView/JKSubTableViewCellCell.h index 1d680d4..ca60768 100644 --- a/ExpandTableView/JKSubTableViewCellCell.h +++ b/JKExpandTableView/JKExpandTableView/JKSubTableViewCellCell.h @@ -12,11 +12,13 @@ UIImageView *iconImage; UILabel *titleLabel; UIImageView *selectionIndicatorImg; + CGFloat selectionIndicatorPadding; } @property (nonatomic,strong) UIImageView *iconImage; @property (nonatomic,strong) UILabel *titleLabel; @property (nonatomic,strong) UIImageView *selectionIndicatorImg; +@property (nonatomic) CGFloat selectionIndicatorPadding; - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier; diff --git a/ExpandTableView/JKSubTableViewCellCell.m b/JKExpandTableView/JKExpandTableView/JKSubTableViewCellCell.m similarity index 92% rename from ExpandTableView/JKSubTableViewCellCell.m rename to JKExpandTableView/JKExpandTableView/JKSubTableViewCellCell.m index ba51aa5..33e4a81 100644 --- a/ExpandTableView/JKSubTableViewCellCell.m +++ b/JKExpandTableView/JKExpandTableView/JKSubTableViewCellCell.m @@ -9,7 +9,7 @@ #import "JKSubTableViewCellCell.h" @implementation JKSubTableViewCellCell -@synthesize titleLabel, iconImage, selectionIndicatorImg; +@synthesize titleLabel, iconImage, selectionIndicatorImg, selectionIndicatorPadding; - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; @@ -63,7 +63,10 @@ - (void) setupDisplay { CGFloat sidePadding = 22.0; CGFloat icon2LabelPadding = 6.0; - CGFloat checkMarkPadding = 16.0; + if (selectionIndicatorPadding == 0) + { + selectionIndicatorPadding = 16.0; + } [self.contentView setAutoresizesSubviews:YES]; self.iconImage.frame = CGRectMake(sidePadding, (contentAreaHeight - iconHeight)/2, iconWidth, iconHeight); @@ -71,13 +74,13 @@ - (void) setupDisplay { CGFloat XOffset = iconWidth + sidePadding + icon2LabelPadding; - CGFloat labelWidth = contentAreaWidth - XOffset - checkMarkWidth - checkMarkPadding; + CGFloat labelWidth = contentAreaWidth - XOffset - checkMarkWidth - selectionIndicatorPadding; self.titleLabel.frame = CGRectMake(XOffset, 0, labelWidth, contentAreaHeight); //self.titleLabel.backgroundColor = [UIColor purpleColor]; //self.selectionIndicatorImg.backgroundColor = [UIColor yellowColor]; - self.selectionIndicatorImg.frame = CGRectMake(contentAreaWidth - checkMarkWidth - checkMarkPadding, + self.selectionIndicatorImg.frame = CGRectMake(contentAreaWidth - checkMarkWidth - selectionIndicatorPadding, (contentRect.size.height/2)-(checkMarkHeight/2), checkMarkWidth, checkMarkHeight); diff --git a/ExpandTableView/img/arrow-icon.png b/JKExpandTableView/JKExpandTableView/img/arrow-icon.png similarity index 100% rename from ExpandTableView/img/arrow-icon.png rename to JKExpandTableView/JKExpandTableView/img/arrow-icon.png diff --git a/ExpandTableView/img/arrow-icon@2x.png b/JKExpandTableView/JKExpandTableView/img/arrow-icon@2x.png similarity index 100% rename from ExpandTableView/img/arrow-icon@2x.png rename to JKExpandTableView/JKExpandTableView/img/arrow-icon@2x.png diff --git a/ExpandTableView/img/checkmark.png b/JKExpandTableView/JKExpandTableView/img/checkmark.png similarity index 100% rename from ExpandTableView/img/checkmark.png rename to JKExpandTableView/JKExpandTableView/img/checkmark.png diff --git a/ExpandTableView/img/checkmark@2x.png b/JKExpandTableView/JKExpandTableView/img/checkmark@2x.png similarity index 100% rename from ExpandTableView/img/checkmark@2x.png rename to JKExpandTableView/JKExpandTableView/img/checkmark@2x.png diff --git a/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples.xcodeproj/project.pbxproj b/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples.xcodeproj/project.pbxproj index 0c634ec..71c52c7 100644 --- a/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples.xcodeproj/project.pbxproj +++ b/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples.xcodeproj/project.pbxproj @@ -26,40 +26,14 @@ B7E3104B17A0D9350049FD09 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E3102C17A0D9340049FD09 /* Foundation.framework */; }; B7E3105317A0D9350049FD09 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B7E3105117A0D9350049FD09 /* InfoPlist.strings */; }; B7E3105617A0D9350049FD09 /* JKExpandTableViewSamplesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3105517A0D9350049FD09 /* JKExpandTableViewSamplesTests.m */; }; - B7E3107217A0D9910049FD09 /* arrow-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3106217A0D9910049FD09 /* arrow-icon.png */; }; - B7E3107317A0D9910049FD09 /* arrow-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3106317A0D9910049FD09 /* arrow-icon@2x.png */; }; - B7E3107417A0D9910049FD09 /* checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3106417A0D9910049FD09 /* checkmark.png */; }; - B7E3107517A0D9910049FD09 /* checkmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3106517A0D9910049FD09 /* checkmark@2x.png */; }; - B7E3107617A0D9910049FD09 /* JKExpandTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106717A0D9910049FD09 /* JKExpandTableView.m */; }; - B7E3107717A0D9910049FD09 /* JKMultiSelectSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106917A0D9910049FD09 /* JKMultiSelectSubTableViewCell.m */; }; - B7E3107817A0D9910049FD09 /* JKParentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106B17A0D9910049FD09 /* JKParentTableViewCell.m */; }; - B7E3107917A0D9910049FD09 /* JKSingleSelectSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106D17A0D9910049FD09 /* JKSingleSelectSubTableViewCell.m */; }; - B7E3107A17A0D9910049FD09 /* JKSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106F17A0D9910049FD09 /* JKSubTableViewCell.m */; }; - B7E3107B17A0D9910049FD09 /* JKSubTableViewCellCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3107117A0D9910049FD09 /* JKSubTableViewCellCell.m */; }; B7E3107F17A0D9DE0049FD09 /* SimpleExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3107D17A0D9DE0049FD09 /* SimpleExampleViewController.m */; }; B7E3108017A0D9DE0049FD09 /* SimpleExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B7E3107E17A0D9DE0049FD09 /* SimpleExampleViewController.xib */; }; B7E3108317A0D9E80049FD09 /* green_checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3108217A0D9E80049FD09 /* green_checkmark.png */; }; - B7E3108417A0DA4B0049FD09 /* JKAppDelegate.h in Sources */ = {isa = PBXBuildFile; fileRef = B7E3103917A0D9340049FD09 /* JKAppDelegate.h */; }; - B7E3108517A0DA4B0049FD09 /* SimpleExampleViewController.h in Sources */ = {isa = PBXBuildFile; fileRef = B7E3107C17A0D9DE0049FD09 /* SimpleExampleViewController.h */; }; B7E3108617A0DA4B0049FD09 /* SimpleExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3107D17A0D9DE0049FD09 /* SimpleExampleViewController.m */; }; B7E3108717A0DB400049FD09 /* SimpleExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B7E3107E17A0D9DE0049FD09 /* SimpleExampleViewController.xib */; }; - B7E3108817A0DB7F0049FD09 /* JKExpandTableView.h in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106617A0D9910049FD09 /* JKExpandTableView.h */; }; - B7E3108917A0DB7F0049FD09 /* JKExpandTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106717A0D9910049FD09 /* JKExpandTableView.m */; }; - B7E3108A17A0DB7F0049FD09 /* JKMultiSelectSubTableViewCell.h in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106817A0D9910049FD09 /* JKMultiSelectSubTableViewCell.h */; }; - B7E3108B17A0DB7F0049FD09 /* JKMultiSelectSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106917A0D9910049FD09 /* JKMultiSelectSubTableViewCell.m */; }; - B7E3108C17A0DB7F0049FD09 /* JKParentTableViewCell.h in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106A17A0D9910049FD09 /* JKParentTableViewCell.h */; }; - B7E3108D17A0DB7F0049FD09 /* JKParentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106B17A0D9910049FD09 /* JKParentTableViewCell.m */; }; - B7E3108E17A0DB7F0049FD09 /* JKSingleSelectSubTableViewCell.h in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106C17A0D9910049FD09 /* JKSingleSelectSubTableViewCell.h */; }; - B7E3108F17A0DB7F0049FD09 /* JKSingleSelectSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106D17A0D9910049FD09 /* JKSingleSelectSubTableViewCell.m */; }; - B7E3109017A0DB7F0049FD09 /* JKSubTableViewCell.h in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106E17A0D9910049FD09 /* JKSubTableViewCell.h */; }; - B7E3109117A0DB7F0049FD09 /* JKSubTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3106F17A0D9910049FD09 /* JKSubTableViewCell.m */; }; - B7E3109217A0DB7F0049FD09 /* JKSubTableViewCellCell.h in Sources */ = {isa = PBXBuildFile; fileRef = B7E3107017A0D9910049FD09 /* JKSubTableViewCellCell.h */; }; - B7E3109317A0DB7F0049FD09 /* JKSubTableViewCellCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E3107117A0D9910049FD09 /* JKSubTableViewCellCell.m */; }; - B7E3109417A0DB8B0049FD09 /* arrow-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3106217A0D9910049FD09 /* arrow-icon.png */; }; - B7E3109517A0DB8B0049FD09 /* arrow-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3106317A0D9910049FD09 /* arrow-icon@2x.png */; }; - B7E3109617A0DB8B0049FD09 /* checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3106417A0D9910049FD09 /* checkmark.png */; }; - B7E3109717A0DB8B0049FD09 /* checkmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E3106517A0D9910049FD09 /* checkmark@2x.png */; }; B7FB1C9017A779C500078022 /* dog.png in Resources */ = {isa = PBXBuildFile; fileRef = B7FB1C8F17A779C500078022 /* dog.png */; }; + BCB63C8D17CCC85B00CB4300 /* JKExpandTableViewResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BCB63C8A17CCC82A00CB4300 /* JKExpandTableViewResources.bundle */; }; + BCBDDA4A17CCAE47005E4024 /* libJKExpandTableView.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BCBDDA4517CCAE35005E4024 /* libJKExpandTableView.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -70,6 +44,34 @@ remoteGlobalIDString = B7E3102617A0D9340049FD09; remoteInfo = JKExpandTableViewSamples; }; + BCB63C8917CCC82A00CB4300 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BCBDDA3F17CCAE35005E4024 /* JKExpandTableView.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BCB63C7617CCC79C00CB4300; + remoteInfo = JKExpandTableViewResources; + }; + BCB63C8B17CCC83000CB4300 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BCBDDA3F17CCAE35005E4024 /* JKExpandTableView.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BCB63C7517CCC79C00CB4300; + remoteInfo = JKExpandTableViewResources; + }; + BCBDDA4417CCAE35005E4024 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BCBDDA3F17CCAE35005E4024 /* JKExpandTableView.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BCBDD9F317CCAD19005E4024; + remoteInfo = JKExpandTableView; + }; + BCBDDA4817CCAE41005E4024 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BCBDDA3F17CCAE35005E4024 /* JKExpandTableView.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BCBDD9F217CCAD19005E4024; + remoteInfo = JKExpandTableView; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -97,27 +99,12 @@ B7E3105217A0D9350049FD09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; B7E3105417A0D9350049FD09 /* JKExpandTableViewSamplesTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKExpandTableViewSamplesTests.h; sourceTree = ""; }; B7E3105517A0D9350049FD09 /* JKExpandTableViewSamplesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKExpandTableViewSamplesTests.m; sourceTree = ""; }; - B7E3106217A0D9910049FD09 /* arrow-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "arrow-icon.png"; sourceTree = ""; }; - B7E3106317A0D9910049FD09 /* arrow-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "arrow-icon@2x.png"; sourceTree = ""; }; - B7E3106417A0D9910049FD09 /* checkmark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = checkmark.png; sourceTree = ""; }; - B7E3106517A0D9910049FD09 /* checkmark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkmark@2x.png"; sourceTree = ""; }; - B7E3106617A0D9910049FD09 /* JKExpandTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JKExpandTableView.h; path = ../../ExpandTableView/JKExpandTableView.h; sourceTree = ""; }; - B7E3106717A0D9910049FD09 /* JKExpandTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JKExpandTableView.m; path = ../../ExpandTableView/JKExpandTableView.m; sourceTree = ""; }; - B7E3106817A0D9910049FD09 /* JKMultiSelectSubTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JKMultiSelectSubTableViewCell.h; path = ../../ExpandTableView/JKMultiSelectSubTableViewCell.h; sourceTree = ""; }; - B7E3106917A0D9910049FD09 /* JKMultiSelectSubTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JKMultiSelectSubTableViewCell.m; path = ../../ExpandTableView/JKMultiSelectSubTableViewCell.m; sourceTree = ""; }; - B7E3106A17A0D9910049FD09 /* JKParentTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JKParentTableViewCell.h; path = ../../ExpandTableView/JKParentTableViewCell.h; sourceTree = ""; }; - B7E3106B17A0D9910049FD09 /* JKParentTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JKParentTableViewCell.m; path = ../../ExpandTableView/JKParentTableViewCell.m; sourceTree = ""; }; - B7E3106C17A0D9910049FD09 /* JKSingleSelectSubTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JKSingleSelectSubTableViewCell.h; path = ../../ExpandTableView/JKSingleSelectSubTableViewCell.h; sourceTree = ""; }; - B7E3106D17A0D9910049FD09 /* JKSingleSelectSubTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JKSingleSelectSubTableViewCell.m; path = ../../ExpandTableView/JKSingleSelectSubTableViewCell.m; sourceTree = ""; }; - B7E3106E17A0D9910049FD09 /* JKSubTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JKSubTableViewCell.h; path = ../../ExpandTableView/JKSubTableViewCell.h; sourceTree = ""; }; - B7E3106F17A0D9910049FD09 /* JKSubTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JKSubTableViewCell.m; path = ../../ExpandTableView/JKSubTableViewCell.m; sourceTree = ""; }; - B7E3107017A0D9910049FD09 /* JKSubTableViewCellCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JKSubTableViewCellCell.h; path = ../../ExpandTableView/JKSubTableViewCellCell.h; sourceTree = ""; }; - B7E3107117A0D9910049FD09 /* JKSubTableViewCellCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JKSubTableViewCellCell.m; path = ../../ExpandTableView/JKSubTableViewCellCell.m; sourceTree = ""; }; B7E3107C17A0D9DE0049FD09 /* SimpleExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleExampleViewController.h; sourceTree = ""; }; B7E3107D17A0D9DE0049FD09 /* SimpleExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleExampleViewController.m; sourceTree = ""; }; B7E3107E17A0D9DE0049FD09 /* SimpleExampleViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SimpleExampleViewController.xib; sourceTree = ""; }; B7E3108217A0D9E80049FD09 /* green_checkmark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = green_checkmark.png; sourceTree = ""; }; B7FB1C8F17A779C500078022 /* dog.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dog.png; sourceTree = ""; }; + BCBDDA3F17CCAE35005E4024 /* JKExpandTableView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = JKExpandTableView.xcodeproj; path = ../../JKExpandTableView/JKExpandTableView.xcodeproj; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -125,6 +112,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + BCBDDA4A17CCAE47005E4024 /* libJKExpandTableView.a in Frameworks */, B7E3102B17A0D9340049FD09 /* UIKit.framework in Frameworks */, B7E3102D17A0D9340049FD09 /* Foundation.framework in Frameworks */, B7E3102F17A0D9340049FD09 /* CoreGraphics.framework in Frameworks */, @@ -226,43 +214,11 @@ B7E3105F17A0D95D0049FD09 /* Vendor */ = { isa = PBXGroup; children = ( - B7E3106017A0D96A0049FD09 /* JKExpandTableViewLib */, + BCBDDA3F17CCAE35005E4024 /* JKExpandTableView.xcodeproj */, ); name = Vendor; sourceTree = ""; }; - B7E3106017A0D96A0049FD09 /* JKExpandTableViewLib */ = { - isa = PBXGroup; - children = ( - B7E3106117A0D9910049FD09 /* img */, - B7E3106617A0D9910049FD09 /* JKExpandTableView.h */, - B7E3106717A0D9910049FD09 /* JKExpandTableView.m */, - B7E3106817A0D9910049FD09 /* JKMultiSelectSubTableViewCell.h */, - B7E3106917A0D9910049FD09 /* JKMultiSelectSubTableViewCell.m */, - B7E3106A17A0D9910049FD09 /* JKParentTableViewCell.h */, - B7E3106B17A0D9910049FD09 /* JKParentTableViewCell.m */, - B7E3106C17A0D9910049FD09 /* JKSingleSelectSubTableViewCell.h */, - B7E3106D17A0D9910049FD09 /* JKSingleSelectSubTableViewCell.m */, - B7E3106E17A0D9910049FD09 /* JKSubTableViewCell.h */, - B7E3106F17A0D9910049FD09 /* JKSubTableViewCell.m */, - B7E3107017A0D9910049FD09 /* JKSubTableViewCellCell.h */, - B7E3107117A0D9910049FD09 /* JKSubTableViewCellCell.m */, - ); - name = JKExpandTableViewLib; - sourceTree = ""; - }; - B7E3106117A0D9910049FD09 /* img */ = { - isa = PBXGroup; - children = ( - B7E3106217A0D9910049FD09 /* arrow-icon.png */, - B7E3106317A0D9910049FD09 /* arrow-icon@2x.png */, - B7E3106417A0D9910049FD09 /* checkmark.png */, - B7E3106517A0D9910049FD09 /* checkmark@2x.png */, - ); - name = img; - path = ../../ExpandTableView/img; - sourceTree = ""; - }; B7E3108117A0D9E80049FD09 /* examples_img */ = { isa = PBXGroup; children = ( @@ -276,6 +232,15 @@ path = examples_img; sourceTree = ""; }; + BCBDDA4017CCAE35005E4024 /* Products */ = { + isa = PBXGroup; + children = ( + BCBDDA4517CCAE35005E4024 /* libJKExpandTableView.a */, + BCB63C8A17CCC82A00CB4300 /* JKExpandTableViewResources.bundle */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -290,6 +255,8 @@ buildRules = ( ); dependencies = ( + BCB63C8C17CCC83000CB4300 /* PBXTargetDependency */, + BCBDDA4917CCAE41005E4024 /* PBXTargetDependency */, ); name = JKExpandTableViewSamples; productName = JKExpandTableViewSamples; @@ -335,6 +302,12 @@ mainGroup = B7E3101E17A0D9340049FD09; productRefGroup = B7E3102817A0D9340049FD09 /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = BCBDDA4017CCAE35005E4024 /* Products */; + ProjectRef = BCBDDA3F17CCAE35005E4024 /* JKExpandTableView.xcodeproj */; + }, + ); projectRoot = ""; targets = ( B7E3102617A0D9340049FD09 /* JKExpandTableViewSamples */, @@ -343,15 +316,29 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + BCB63C8A17CCC82A00CB4300 /* JKExpandTableViewResources.bundle */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = JKExpandTableViewResources.bundle; + remoteRef = BCB63C8917CCC82A00CB4300 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + BCBDDA4517CCAE35005E4024 /* libJKExpandTableView.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libJKExpandTableView.a; + remoteRef = BCBDDA4417CCAE35005E4024 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ B7E3102517A0D9340049FD09 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - B7E3109417A0DB8B0049FD09 /* arrow-icon.png in Resources */, - B7E3109517A0DB8B0049FD09 /* arrow-icon@2x.png in Resources */, - B7E3109617A0DB8B0049FD09 /* checkmark.png in Resources */, - B7E3109717A0DB8B0049FD09 /* checkmark@2x.png in Resources */, + BCB63C8D17CCC85B00CB4300 /* JKExpandTableViewResources.bundle in Resources */, B7E3108717A0DB400049FD09 /* SimpleExampleViewController.xib in Resources */, B7E3103517A0D9340049FD09 /* InfoPlist.strings in Resources */, B7E3103D17A0D9340049FD09 /* Default.png in Resources */, @@ -372,10 +359,6 @@ buildActionMask = 2147483647; files = ( B7E3105317A0D9350049FD09 /* InfoPlist.strings in Resources */, - B7E3107217A0D9910049FD09 /* arrow-icon.png in Resources */, - B7E3107317A0D9910049FD09 /* arrow-icon@2x.png in Resources */, - B7E3107417A0D9910049FD09 /* checkmark.png in Resources */, - B7E3107517A0D9910049FD09 /* checkmark@2x.png in Resources */, B7E3108017A0D9DE0049FD09 /* SimpleExampleViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -403,20 +386,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B7E3108817A0DB7F0049FD09 /* JKExpandTableView.h in Sources */, - B7E3108917A0DB7F0049FD09 /* JKExpandTableView.m in Sources */, - B7E3108A17A0DB7F0049FD09 /* JKMultiSelectSubTableViewCell.h in Sources */, - B7E3108B17A0DB7F0049FD09 /* JKMultiSelectSubTableViewCell.m in Sources */, - B7E3108C17A0DB7F0049FD09 /* JKParentTableViewCell.h in Sources */, - B7E3108D17A0DB7F0049FD09 /* JKParentTableViewCell.m in Sources */, - B7E3108E17A0DB7F0049FD09 /* JKSingleSelectSubTableViewCell.h in Sources */, - B7E3108F17A0DB7F0049FD09 /* JKSingleSelectSubTableViewCell.m in Sources */, - B7E3109017A0DB7F0049FD09 /* JKSubTableViewCell.h in Sources */, - B7E3109117A0DB7F0049FD09 /* JKSubTableViewCell.m in Sources */, - B7E3109217A0DB7F0049FD09 /* JKSubTableViewCellCell.h in Sources */, - B7E3109317A0DB7F0049FD09 /* JKSubTableViewCellCell.m in Sources */, - B7E3108417A0DA4B0049FD09 /* JKAppDelegate.h in Sources */, - B7E3108517A0DA4B0049FD09 /* SimpleExampleViewController.h in Sources */, B7E3108617A0DA4B0049FD09 /* SimpleExampleViewController.m in Sources */, B7E3103717A0D9340049FD09 /* main.m in Sources */, B7E3103B17A0D9340049FD09 /* JKAppDelegate.m in Sources */, @@ -428,12 +397,6 @@ buildActionMask = 2147483647; files = ( B7E3105617A0D9350049FD09 /* JKExpandTableViewSamplesTests.m in Sources */, - B7E3107617A0D9910049FD09 /* JKExpandTableView.m in Sources */, - B7E3107717A0D9910049FD09 /* JKMultiSelectSubTableViewCell.m in Sources */, - B7E3107817A0D9910049FD09 /* JKParentTableViewCell.m in Sources */, - B7E3107917A0D9910049FD09 /* JKSingleSelectSubTableViewCell.m in Sources */, - B7E3107A17A0D9910049FD09 /* JKSubTableViewCell.m in Sources */, - B7E3107B17A0D9910049FD09 /* JKSubTableViewCellCell.m in Sources */, B7E3107F17A0D9DE0049FD09 /* SimpleExampleViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -446,6 +409,16 @@ target = B7E3102617A0D9340049FD09 /* JKExpandTableViewSamples */; targetProxy = B7E3104C17A0D9350049FD09 /* PBXContainerItemProxy */; }; + BCB63C8C17CCC83000CB4300 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = JKExpandTableViewResources; + targetProxy = BCB63C8B17CCC83000CB4300 /* PBXContainerItemProxy */; + }; + BCBDDA4917CCAE41005E4024 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = JKExpandTableView; + targetProxy = BCBDDA4817CCAE41005E4024 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -531,7 +504,12 @@ buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JKExpandTableViewSamples/JKExpandTableViewSamples-Prefix.pch"; + HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)"; INFOPLIST_FILE = "JKExpandTableViewSamples/JKExpandTableViewSamples-Info.plist"; + OTHER_LDFLAGS = ( + "-ObjC", + "-all_load", + ); PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -542,7 +520,12 @@ buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JKExpandTableViewSamples/JKExpandTableViewSamples-Prefix.pch"; + HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)"; INFOPLIST_FILE = "JKExpandTableViewSamples/JKExpandTableViewSamples-Info.plist"; + OTHER_LDFLAGS = ( + "-ObjC", + "-all_load", + ); PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; diff --git a/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples/SimpleExampleViewController.h b/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples/SimpleExampleViewController.h index 48ec3cc..288603f 100644 --- a/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples/SimpleExampleViewController.h +++ b/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples/SimpleExampleViewController.h @@ -7,7 +7,7 @@ // #import -#import "JKExpandTableView.h" +#import @interface SimpleExampleViewController : UIViewController diff --git a/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples/SimpleExampleViewController.m b/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples/SimpleExampleViewController.m index 6590991..d982abe 100644 --- a/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples/SimpleExampleViewController.m +++ b/Samples/JKExpandTableViewSamples/JKExpandTableViewSamples/SimpleExampleViewController.m @@ -7,6 +7,7 @@ // #import "SimpleExampleViewController.h" +#import @interface SimpleExampleViewController () @@ -133,7 +134,7 @@ - (BOOL) shouldDisplaySelectedStateForCellAtChildIndex:(NSInteger) childIndex wi } - (UIImage *) iconForParentCellAtIndex:(NSInteger) parentIndex { - return [UIImage imageNamed:@"arrow-icon"]; + return [UIImage expandTableViewImageNamed:@"arrow-icon"]; } - (UIImage *) iconForCellAtChildIndex:(NSInteger) childIndex withinParentCellIndex:(NSInteger) parentIndex {