From 3fba9d49de751268b9cfca282d0dc128835830b2 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 27 Aug 2013 19:44:35 -0300 Subject: [PATCH 1/7] Organizing project. --- .DS_Store | Bin 6148 -> 0 bytes .gitignore | 6 + CHSectionSelectionView/.DS_Store | Bin 6148 -> 12292 bytes .../CHSectionSelectionItemView.h | 0 .../CHSectionSelectionItemView.m | 4 + .../CHSectionSelectionView.h | 0 .../CHSectionSelectionView.m | 0 .../project.pbxproj | 181 ++++++++---------- .../contents.xcworkspacedata | 2 +- .../WorkspaceSettings.xcsettings | 10 + .../CHAppDelegate.h | 0 .../CHAppDelegate.m | 0 .../CHSectionSelectionViewDemo-Prefix.pch} | 0 .../Default-568h@2x.png | Bin .../Default.png | Bin .../Default@2x.png | Bin .../DemoSectionItemSubclass.h | 0 .../DemoSectionItemSubclass.m | 0 .../DemoViewController.h | 0 .../DemoViewController.m | 3 +- .../en.lproj/InfoPlist.strings | 0 .../main.m | 0 .../sectionItemBG.png | Bin .../UserInterfaceState.xcuserstate | Bin 22362 -> 0 bytes .../CHTableGroupSelectionView.xcscheme | 86 --------- .../xcschemes/xcschememanagement.plist | 22 --- .../CHTableGroupSelectionView-Info.plist | 45 ----- 27 files changed, 106 insertions(+), 253 deletions(-) delete mode 100644 .DS_Store create mode 100644 .gitignore rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionView}/CHSectionSelectionItemView.h (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionView}/CHSectionSelectionItemView.m (93%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionView}/CHSectionSelectionView.h (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionView}/CHSectionSelectionView.m (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView.xcodeproj => CHSectionSelectionViewDemo.xcodeproj}/project.pbxproj (57%) rename CHSectionSelectionView/{CHTableGroupSelectionView.xcodeproj => CHSectionSelectionViewDemo.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (63%) create mode 100644 CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.xcworkspace/xcuserdata/ac-asantos.xcuserdatad/WorkspaceSettings.xcsettings rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/CHAppDelegate.h (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/CHAppDelegate.m (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView/CHTableGroupSelectionView-Prefix.pch => CHSectionSelectionViewDemo/CHSectionSelectionViewDemo-Prefix.pch} (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/Default-568h@2x.png (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/Default.png (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/Default@2x.png (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/DemoSectionItemSubclass.h (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/DemoSectionItemSubclass.m (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/DemoViewController.h (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/DemoViewController.m (99%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/en.lproj/InfoPlist.strings (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/main.m (100%) rename CHSectionSelectionView/{CHTableGroupSelectionView => CHSectionSelectionViewDemo}/sectionItemBG.png (100%) delete mode 100644 CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.xcworkspace/xcuserdata/pfizer.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/xcuserdata/pfizer.xcuserdatad/xcschemes/CHTableGroupSelectionView.xcscheme delete mode 100644 CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/xcuserdata/pfizer.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 CHSectionSelectionView/CHTableGroupSelectionView/CHTableGroupSelectionView-Info.plist diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index c90b7803839dbb706a7ae7e5c3850face8b44135..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJx{|x41HHRv|{Om81oB=_y?h+zyJ&sm?2G&5P?)pA|$5#be`|5iYo2Ef>32k z_PhG*`*;`K)d1YI%};>|fDu)2Fs9ie(l6SRfqD*z&X2J`gI84ez`Pf2j{nGjoZS)5 zam5oW@bml%lpCH$o@{~7yk3-9Rh2w&jB$q<&XD4Uc!GE2%O<;S>t@B?3p}7^%8E9| z5-%L!%m0pS9Zri6r!zaPP@JEg<3~OmE(vJX7%&Dl8IanKGLiRxw!8lK zL1v5rV_-iSaKm(-PPsRITYI~dw>F|aQAH%K3%E{U!#~B0m8bZa>V^JD8pK4g3rG*e O{s?#)%oqcI%D^|i8bZbZ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b487c4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +*.xcuserstate +*.xccheckout +*.xcbkptlist +*.xcscheme +*.plist diff --git a/CHSectionSelectionView/.DS_Store b/CHSectionSelectionView/.DS_Store index 623a6afe502f0db9815a1f060dc5fd4d3006daef..46e78bda44c686b17dd72490d3a8bdb0522e93a6 100644 GIT binary patch delta 585 zcmZoMXi1P@U|?W$DortDU;r^WfEYvza8E20o2aKK$_A($Z*p>*;rR%vz@phzx5{$wYXeZn}@s6o}F z6es5-<>%)BO~YlJCRAxza8X`PeqK7neGDqtEq8>fX3%4(06Ht5AqD7|0)`?WD=R16 zFgQ6sw*X`r1H+efKmvy;a4+z&$;q5^x~&V=L0GYvN{UNLX-P5z10hY?c-&c#f#gm` z2ZqUYtls=6Zhuh&6!Q|u&3A!Yce9)Uq!1*Ca06Tr)kp(|%`rTin7JfCvFHkld|(8B kXP(S2;yKx$hl2wc|DbfiusNP*1v4<(*+FrSAnr2*0NB2MCjbBd delta 198 zcmZokXfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50D9Q?w2a6>!IVUMUKL;oUk>e=~F3QWv&r1gxGucnrOCTpdJvcc( zw*aJsfnmW!pkN5gnM;~?HWprIT+GhFA;=7o65s~Xt{|suEd0(qnP0{e= 60000 + _titleLabel.textAlignment = NSTextAlignmentCenter; +#else _titleLabel.textAlignment = UITextAlignmentCenter; +#endif [_contentView addSubview:_titleLabel]; } diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/CHSectionSelectionView.h b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/CHSectionSelectionView.h rename to CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/CHSectionSelectionView.m b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/CHSectionSelectionView.m rename to CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m diff --git a/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.pbxproj b/CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.pbxproj similarity index 57% rename from CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.pbxproj rename to CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.pbxproj index 99ab0c4..436de32 100644 --- a/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.pbxproj +++ b/CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.pbxproj @@ -10,42 +10,42 @@ 617A7902165BCD10008C90BE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 617A7901165BCD10008C90BE /* UIKit.framework */; }; 617A7904165BCD10008C90BE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 617A7903165BCD10008C90BE /* Foundation.framework */; }; 617A7906165BCD10008C90BE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 617A7905165BCD10008C90BE /* CoreGraphics.framework */; }; - 617A790C165BCD10008C90BE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 617A790A165BCD10008C90BE /* InfoPlist.strings */; }; - 617A790E165BCD10008C90BE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 617A790D165BCD10008C90BE /* main.m */; }; - 617A7912165BCD10008C90BE /* CHAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 617A7911165BCD10008C90BE /* CHAppDelegate.m */; }; - 617A7914165BCD10008C90BE /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 617A7913165BCD10008C90BE /* Default.png */; }; - 617A7916165BCD10008C90BE /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 617A7915165BCD10008C90BE /* Default@2x.png */; }; - 617A7918165BCD10008C90BE /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 617A7917165BCD10008C90BE /* Default-568h@2x.png */; }; - 617A7920165BCD2B008C90BE /* DemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 617A791F165BCD2B008C90BE /* DemoViewController.m */; }; - 617A7924165BD23C008C90BE /* CHSectionSelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 617A7923165BD23C008C90BE /* CHSectionSelectionView.m */; }; - 617A7927165BD47D008C90BE /* CHSectionSelectionItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 617A7926165BD47D008C90BE /* CHSectionSelectionItemView.m */; }; - 617A792B165C08B9008C90BE /* DemoSectionItemSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = 617A792A165C08B9008C90BE /* DemoSectionItemSubclass.m */; }; - 617A792D165C095E008C90BE /* sectionItemBG.png in Resources */ = {isa = PBXBuildFile; fileRef = 617A792C165C095E008C90BE /* sectionItemBG.png */; }; + 8ADD29B917CD6077004944F8 /* CHSectionSelectionItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ADD29B617CD6077004944F8 /* CHSectionSelectionItemView.m */; }; + 8ADD29BA17CD6077004944F8 /* CHSectionSelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ADD29B817CD6077004944F8 /* CHSectionSelectionView.m */; }; + 8ADD29CB17CD61D7004944F8 /* CHAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ADD29BD17CD61D7004944F8 /* CHAppDelegate.m */; }; + 8ADD29CD17CD61D7004944F8 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8ADD29C017CD61D7004944F8 /* Default-568h@2x.png */; }; + 8ADD29CE17CD61D7004944F8 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 8ADD29C117CD61D7004944F8 /* Default.png */; }; + 8ADD29CF17CD61D7004944F8 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8ADD29C217CD61D7004944F8 /* Default@2x.png */; }; + 8ADD29D017CD61D7004944F8 /* DemoSectionItemSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ADD29C417CD61D7004944F8 /* DemoSectionItemSubclass.m */; }; + 8ADD29D117CD61D7004944F8 /* DemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ADD29C617CD61D7004944F8 /* DemoViewController.m */; }; + 8ADD29D217CD61D7004944F8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8ADD29C717CD61D7004944F8 /* InfoPlist.strings */; }; + 8ADD29D317CD61D7004944F8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ADD29C917CD61D7004944F8 /* main.m */; }; + 8ADD29D417CD61D7004944F8 /* sectionItemBG.png in Resources */ = {isa = PBXBuildFile; fileRef = 8ADD29CA17CD61D7004944F8 /* sectionItemBG.png */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 617A78FD165BCD10008C90BE /* CHTableGroupSelectionView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CHTableGroupSelectionView.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 617A78FD165BCD10008C90BE /* CHSectionSelectionViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CHSectionSelectionViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 617A7901165BCD10008C90BE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 617A7903165BCD10008C90BE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 617A7905165BCD10008C90BE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 617A7909165BCD10008C90BE /* CHTableGroupSelectionView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CHTableGroupSelectionView-Info.plist"; sourceTree = ""; }; - 617A790B165BCD10008C90BE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 617A790D165BCD10008C90BE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 617A790F165BCD10008C90BE /* CHTableGroupSelectionView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CHTableGroupSelectionView-Prefix.pch"; sourceTree = ""; }; - 617A7910165BCD10008C90BE /* CHAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHAppDelegate.h; sourceTree = ""; }; - 617A7911165BCD10008C90BE /* CHAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CHAppDelegate.m; sourceTree = ""; }; - 617A7913165BCD10008C90BE /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - 617A7915165BCD10008C90BE /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; - 617A7917165BCD10008C90BE /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 617A791E165BCD2B008C90BE /* DemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = ""; }; - 617A791F165BCD2B008C90BE /* DemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoViewController.m; sourceTree = ""; }; - 617A7922165BD23C008C90BE /* CHSectionSelectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSectionSelectionView.h; sourceTree = ""; }; - 617A7923165BD23C008C90BE /* CHSectionSelectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSectionSelectionView.m; sourceTree = ""; }; - 617A7925165BD47D008C90BE /* CHSectionSelectionItemView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSectionSelectionItemView.h; sourceTree = ""; }; - 617A7926165BD47D008C90BE /* CHSectionSelectionItemView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSectionSelectionItemView.m; sourceTree = ""; }; - 617A7929165C08B9008C90BE /* DemoSectionItemSubclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoSectionItemSubclass.h; sourceTree = ""; }; - 617A792A165C08B9008C90BE /* DemoSectionItemSubclass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoSectionItemSubclass.m; sourceTree = ""; }; - 617A792C165C095E008C90BE /* sectionItemBG.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sectionItemBG.png; sourceTree = ""; }; + 8ADD29B517CD6077004944F8 /* CHSectionSelectionItemView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSectionSelectionItemView.h; sourceTree = ""; }; + 8ADD29B617CD6077004944F8 /* CHSectionSelectionItemView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSectionSelectionItemView.m; sourceTree = ""; }; + 8ADD29B717CD6077004944F8 /* CHSectionSelectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSectionSelectionView.h; sourceTree = ""; }; + 8ADD29B817CD6077004944F8 /* CHSectionSelectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSectionSelectionView.m; sourceTree = ""; }; + 8ADD29BC17CD61D7004944F8 /* CHAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHAppDelegate.h; sourceTree = ""; }; + 8ADD29BD17CD61D7004944F8 /* CHAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHAppDelegate.m; sourceTree = ""; }; + 8ADD29BE17CD61D7004944F8 /* CHSectionSelectionViewDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "CHSectionSelectionViewDemo-Info.plist"; sourceTree = ""; }; + 8ADD29BF17CD61D7004944F8 /* CHSectionSelectionViewDemo-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CHSectionSelectionViewDemo-Prefix.pch"; sourceTree = ""; }; + 8ADD29C017CD61D7004944F8 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 8ADD29C117CD61D7004944F8 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 8ADD29C217CD61D7004944F8 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 8ADD29C317CD61D7004944F8 /* DemoSectionItemSubclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoSectionItemSubclass.h; sourceTree = ""; }; + 8ADD29C417CD61D7004944F8 /* DemoSectionItemSubclass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoSectionItemSubclass.m; sourceTree = ""; }; + 8ADD29C517CD61D7004944F8 /* DemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = ""; }; + 8ADD29C617CD61D7004944F8 /* DemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoViewController.m; sourceTree = ""; }; + 8ADD29C817CD61D7004944F8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 8ADD29C917CD61D7004944F8 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 8ADD29CA17CD61D7004944F8 /* sectionItemBG.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sectionItemBG.png; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -65,7 +65,8 @@ 617A78F2165BCD10008C90BE = { isa = PBXGroup; children = ( - 617A7907165BCD10008C90BE /* CHTableGroupSelectionView */, + 8ADD29BB17CD61D7004944F8 /* CHSectionSelectionViewDemo */, + 8ADD29B417CD6077004944F8 /* CHSectionSelectionView */, 617A7900165BCD10008C90BE /* Frameworks */, 617A78FE165BCD10008C90BE /* Products */, ); @@ -74,7 +75,7 @@ 617A78FE165BCD10008C90BE /* Products */ = { isa = PBXGroup; children = ( - 617A78FD165BCD10008C90BE /* CHTableGroupSelectionView.app */, + 617A78FD165BCD10008C90BE /* CHSectionSelectionViewDemo.app */, ); name = Products; sourceTree = ""; @@ -89,61 +90,44 @@ name = Frameworks; sourceTree = ""; }; - 617A7907165BCD10008C90BE /* CHTableGroupSelectionView */ = { + 8ADD29B417CD6077004944F8 /* CHSectionSelectionView */ = { isa = PBXGroup; children = ( - 617A792C165C095E008C90BE /* sectionItemBG.png */, - 617A7928165C08A1008C90BE /* Demo */, - 617A7921165BD1FD008C90BE /* CHSectionSelectionView */, - 617A7910165BCD10008C90BE /* CHAppDelegate.h */, - 617A7911165BCD10008C90BE /* CHAppDelegate.m */, - 617A7908165BCD10008C90BE /* Supporting Files */, + 8ADD29B517CD6077004944F8 /* CHSectionSelectionItemView.h */, + 8ADD29B617CD6077004944F8 /* CHSectionSelectionItemView.m */, + 8ADD29B717CD6077004944F8 /* CHSectionSelectionView.h */, + 8ADD29B817CD6077004944F8 /* CHSectionSelectionView.m */, ); - path = CHTableGroupSelectionView; + path = CHSectionSelectionView; sourceTree = ""; }; - 617A7908165BCD10008C90BE /* Supporting Files */ = { + 8ADD29BB17CD61D7004944F8 /* CHSectionSelectionViewDemo */ = { isa = PBXGroup; children = ( - 617A7909165BCD10008C90BE /* CHTableGroupSelectionView-Info.plist */, - 617A790A165BCD10008C90BE /* InfoPlist.strings */, - 617A790D165BCD10008C90BE /* main.m */, - 617A790F165BCD10008C90BE /* CHTableGroupSelectionView-Prefix.pch */, - 617A7913165BCD10008C90BE /* Default.png */, - 617A7915165BCD10008C90BE /* Default@2x.png */, - 617A7917165BCD10008C90BE /* Default-568h@2x.png */, + 8ADD29BC17CD61D7004944F8 /* CHAppDelegate.h */, + 8ADD29BD17CD61D7004944F8 /* CHAppDelegate.m */, + 8ADD29BE17CD61D7004944F8 /* CHSectionSelectionViewDemo-Info.plist */, + 8ADD29BF17CD61D7004944F8 /* CHSectionSelectionViewDemo-Prefix.pch */, + 8ADD29C017CD61D7004944F8 /* Default-568h@2x.png */, + 8ADD29C117CD61D7004944F8 /* Default.png */, + 8ADD29C217CD61D7004944F8 /* Default@2x.png */, + 8ADD29C317CD61D7004944F8 /* DemoSectionItemSubclass.h */, + 8ADD29C417CD61D7004944F8 /* DemoSectionItemSubclass.m */, + 8ADD29C517CD61D7004944F8 /* DemoViewController.h */, + 8ADD29C617CD61D7004944F8 /* DemoViewController.m */, + 8ADD29C717CD61D7004944F8 /* InfoPlist.strings */, + 8ADD29C917CD61D7004944F8 /* main.m */, + 8ADD29CA17CD61D7004944F8 /* sectionItemBG.png */, ); - name = "Supporting Files"; - sourceTree = ""; - }; - 617A7921165BD1FD008C90BE /* CHSectionSelectionView */ = { - isa = PBXGroup; - children = ( - 617A7922165BD23C008C90BE /* CHSectionSelectionView.h */, - 617A7923165BD23C008C90BE /* CHSectionSelectionView.m */, - 617A7925165BD47D008C90BE /* CHSectionSelectionItemView.h */, - 617A7926165BD47D008C90BE /* CHSectionSelectionItemView.m */, - ); - name = CHSectionSelectionView; - sourceTree = ""; - }; - 617A7928165C08A1008C90BE /* Demo */ = { - isa = PBXGroup; - children = ( - 617A791E165BCD2B008C90BE /* DemoViewController.h */, - 617A791F165BCD2B008C90BE /* DemoViewController.m */, - 617A7929165C08B9008C90BE /* DemoSectionItemSubclass.h */, - 617A792A165C08B9008C90BE /* DemoSectionItemSubclass.m */, - ); - name = Demo; + path = CHSectionSelectionViewDemo; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 617A78FC165BCD10008C90BE /* CHTableGroupSelectionView */ = { + 617A78FC165BCD10008C90BE /* CHSectionSelectionViewDemo */ = { isa = PBXNativeTarget; - buildConfigurationList = 617A791B165BCD10008C90BE /* Build configuration list for PBXNativeTarget "CHTableGroupSelectionView" */; + buildConfigurationList = 617A791B165BCD10008C90BE /* Build configuration list for PBXNativeTarget "CHSectionSelectionViewDemo" */; buildPhases = ( 617A78F9165BCD10008C90BE /* Sources */, 617A78FA165BCD10008C90BE /* Frameworks */, @@ -153,9 +137,9 @@ ); dependencies = ( ); - name = CHTableGroupSelectionView; + name = CHSectionSelectionViewDemo; productName = CHTableGroupSelectionView; - productReference = 617A78FD165BCD10008C90BE /* CHTableGroupSelectionView.app */; + productReference = 617A78FD165BCD10008C90BE /* CHSectionSelectionViewDemo.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -168,7 +152,7 @@ LastUpgradeCheck = 0450; ORGANIZATIONNAME = "Clemens Hammerl"; }; - buildConfigurationList = 617A78F7165BCD10008C90BE /* Build configuration list for PBXProject "CHTableGroupSelectionView" */; + buildConfigurationList = 617A78F7165BCD10008C90BE /* Build configuration list for PBXProject "CHSectionSelectionViewDemo" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -180,7 +164,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 617A78FC165BCD10008C90BE /* CHTableGroupSelectionView */, + 617A78FC165BCD10008C90BE /* CHSectionSelectionViewDemo */, ); }; /* End PBXProject section */ @@ -190,11 +174,11 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 617A790C165BCD10008C90BE /* InfoPlist.strings in Resources */, - 617A7914165BCD10008C90BE /* Default.png in Resources */, - 617A7916165BCD10008C90BE /* Default@2x.png in Resources */, - 617A7918165BCD10008C90BE /* Default-568h@2x.png in Resources */, - 617A792D165C095E008C90BE /* sectionItemBG.png in Resources */, + 8ADD29CD17CD61D7004944F8 /* Default-568h@2x.png in Resources */, + 8ADD29CE17CD61D7004944F8 /* Default.png in Resources */, + 8ADD29CF17CD61D7004944F8 /* Default@2x.png in Resources */, + 8ADD29D217CD61D7004944F8 /* InfoPlist.strings in Resources */, + 8ADD29D417CD61D7004944F8 /* sectionItemBG.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -205,22 +189,22 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 617A790E165BCD10008C90BE /* main.m in Sources */, - 617A7912165BCD10008C90BE /* CHAppDelegate.m in Sources */, - 617A7920165BCD2B008C90BE /* DemoViewController.m in Sources */, - 617A7924165BD23C008C90BE /* CHSectionSelectionView.m in Sources */, - 617A7927165BD47D008C90BE /* CHSectionSelectionItemView.m in Sources */, - 617A792B165C08B9008C90BE /* DemoSectionItemSubclass.m in Sources */, + 8ADD29B917CD6077004944F8 /* CHSectionSelectionItemView.m in Sources */, + 8ADD29BA17CD6077004944F8 /* CHSectionSelectionView.m in Sources */, + 8ADD29CB17CD61D7004944F8 /* CHAppDelegate.m in Sources */, + 8ADD29D017CD61D7004944F8 /* DemoSectionItemSubclass.m in Sources */, + 8ADD29D117CD61D7004944F8 /* DemoViewController.m in Sources */, + 8ADD29D317CD61D7004944F8 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 617A790A165BCD10008C90BE /* InfoPlist.strings */ = { + 8ADD29C717CD61D7004944F8 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 617A790B165BCD10008C90BE /* en */, + 8ADD29C817CD61D7004944F8 /* en */, ); name = InfoPlist.strings; sourceTree = ""; @@ -284,9 +268,9 @@ isa = XCBuildConfiguration; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "CHTableGroupSelectionView/CHTableGroupSelectionView-Prefix.pch"; - INFOPLIST_FILE = "CHTableGroupSelectionView/CHTableGroupSelectionView-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; + GCC_PREFIX_HEADER = "CHSectionSelectionViewDemo/CHSectionSelectionViewDemo-Prefix.pch"; + INFOPLIST_FILE = "CHSectionSelectionViewDemo/CHSectionSelectionViewDemo-Info.plist"; + PRODUCT_NAME = CHSectionSelectionViewDemo; WRAPPER_EXTENSION = app; }; name = Debug; @@ -295,9 +279,9 @@ isa = XCBuildConfiguration; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "CHTableGroupSelectionView/CHTableGroupSelectionView-Prefix.pch"; - INFOPLIST_FILE = "CHTableGroupSelectionView/CHTableGroupSelectionView-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; + GCC_PREFIX_HEADER = "CHSectionSelectionViewDemo/CHSectionSelectionViewDemo-Prefix.pch"; + INFOPLIST_FILE = "CHSectionSelectionViewDemo/CHSectionSelectionViewDemo-Info.plist"; + PRODUCT_NAME = CHSectionSelectionViewDemo; WRAPPER_EXTENSION = app; }; name = Release; @@ -305,7 +289,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 617A78F7165BCD10008C90BE /* Build configuration list for PBXProject "CHTableGroupSelectionView" */ = { + 617A78F7165BCD10008C90BE /* Build configuration list for PBXProject "CHSectionSelectionViewDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 617A7919165BCD10008C90BE /* Debug */, @@ -314,13 +298,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 617A791B165BCD10008C90BE /* Build configuration list for PBXNativeTarget "CHTableGroupSelectionView" */ = { + 617A791B165BCD10008C90BE /* Build configuration list for PBXNativeTarget "CHSectionSelectionViewDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 617A791C165BCD10008C90BE /* Debug */, 617A791D165BCD10008C90BE /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 63% rename from CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 483f1f9..55e0343 100644 --- a/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:CHSectionSelectionViewDemo.xcodeproj"> diff --git a/CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.xcworkspace/xcuserdata/ac-asantos.xcuserdatad/WorkspaceSettings.xcsettings b/CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.xcworkspace/xcuserdata/ac-asantos.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..bfffcfe --- /dev/null +++ b/CHSectionSelectionView/CHSectionSelectionViewDemo.xcodeproj/project.xcworkspace/xcuserdata/ac-asantos.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,10 @@ + + + + + HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges + + SnapshotAutomaticallyBeforeSignificantChanges + + + diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/CHAppDelegate.h b/CHSectionSelectionView/CHSectionSelectionViewDemo/CHAppDelegate.h similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/CHAppDelegate.h rename to CHSectionSelectionView/CHSectionSelectionViewDemo/CHAppDelegate.h diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/CHAppDelegate.m b/CHSectionSelectionView/CHSectionSelectionViewDemo/CHAppDelegate.m similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/CHAppDelegate.m rename to CHSectionSelectionView/CHSectionSelectionViewDemo/CHAppDelegate.m diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/CHTableGroupSelectionView-Prefix.pch b/CHSectionSelectionView/CHSectionSelectionViewDemo/CHSectionSelectionViewDemo-Prefix.pch similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/CHTableGroupSelectionView-Prefix.pch rename to CHSectionSelectionView/CHSectionSelectionViewDemo/CHSectionSelectionViewDemo-Prefix.pch diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/Default-568h@2x.png b/CHSectionSelectionView/CHSectionSelectionViewDemo/Default-568h@2x.png similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/Default-568h@2x.png rename to CHSectionSelectionView/CHSectionSelectionViewDemo/Default-568h@2x.png diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/Default.png b/CHSectionSelectionView/CHSectionSelectionViewDemo/Default.png similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/Default.png rename to CHSectionSelectionView/CHSectionSelectionViewDemo/Default.png diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/Default@2x.png b/CHSectionSelectionView/CHSectionSelectionViewDemo/Default@2x.png similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/Default@2x.png rename to CHSectionSelectionView/CHSectionSelectionViewDemo/Default@2x.png diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/DemoSectionItemSubclass.h b/CHSectionSelectionView/CHSectionSelectionViewDemo/DemoSectionItemSubclass.h similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/DemoSectionItemSubclass.h rename to CHSectionSelectionView/CHSectionSelectionViewDemo/DemoSectionItemSubclass.h diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/DemoSectionItemSubclass.m b/CHSectionSelectionView/CHSectionSelectionViewDemo/DemoSectionItemSubclass.m similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/DemoSectionItemSubclass.m rename to CHSectionSelectionView/CHSectionSelectionViewDemo/DemoSectionItemSubclass.m diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/DemoViewController.h b/CHSectionSelectionView/CHSectionSelectionViewDemo/DemoViewController.h similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/DemoViewController.h rename to CHSectionSelectionView/CHSectionSelectionViewDemo/DemoViewController.h diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/DemoViewController.m b/CHSectionSelectionView/CHSectionSelectionViewDemo/DemoViewController.m similarity index 99% rename from CHSectionSelectionView/CHTableGroupSelectionView/DemoViewController.m rename to CHSectionSelectionView/CHSectionSelectionViewDemo/DemoViewController.m index ede7636..b3de1ab 100644 --- a/CHSectionSelectionView/CHTableGroupSelectionView/DemoViewController.m +++ b/CHSectionSelectionView/CHSectionSelectionViewDemo/DemoViewController.m @@ -54,7 +54,8 @@ -(UIView *)sectionSelectionView:(CHSectionSelectionView *)selectionView callOutV label.textColor = [UIColor redColor]; label.font = [UIFont boldSystemFontOfSize:40]; label.text = [_testTableView.dataSource tableView:_testTableView titleForHeaderInSection:section]; - label.textAlignment = UITextAlignmentCenter; + + label.textAlignment = NSTextAlignmentCenter; // dont use that in your code cause layer shadows are // negatively affecting performance diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/en.lproj/InfoPlist.strings b/CHSectionSelectionView/CHSectionSelectionViewDemo/en.lproj/InfoPlist.strings similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/en.lproj/InfoPlist.strings rename to CHSectionSelectionView/CHSectionSelectionViewDemo/en.lproj/InfoPlist.strings diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/main.m b/CHSectionSelectionView/CHSectionSelectionViewDemo/main.m similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/main.m rename to CHSectionSelectionView/CHSectionSelectionViewDemo/main.m diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/sectionItemBG.png b/CHSectionSelectionView/CHSectionSelectionViewDemo/sectionItemBG.png similarity index 100% rename from CHSectionSelectionView/CHTableGroupSelectionView/sectionItemBG.png rename to CHSectionSelectionView/CHSectionSelectionViewDemo/sectionItemBG.png diff --git a/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.xcworkspace/xcuserdata/pfizer.xcuserdatad/UserInterfaceState.xcuserstate b/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/project.xcworkspace/xcuserdata/pfizer.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 30804f2a4dd918f8ec247139b1321d3cc1c4d3c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22362 zcmdsf33yXQ*YM2U(v3FhmhMfPq;1kAP4^{9+t8Mx>@AeNlr})2ZAz1}SLPzC2#Uxi zi?n4GK?D?)O$7lF1!Pr00Z|cLKm<3`|Ja6C@HDL55pV;$DxjyNB8#yxQ_T#QR_Z#)PO#$|XY9)_#&XgnTIz!UM~ zcq*QT=itS71zwHU;SG2bei?7Uui_ne58jIp;Dh)Bd>ns*&*F3V3;ZR%hOgrv@C}Nk zI7&phP_C34FN}0Y)Kc+u3fEmaPVg@sn zjENb=R5SI=IOZ{CGBb^t&CF+(Gb@-?%sOThvyIuw>|)+w_A?(aN0_6`G3IOL3UihD zhWVEHj`^Os#$0E9U~VwKF}GQYa4dS;9_bXRx!`x$HCS0(J?zj9tmLuxr^D*iG!q>?`bR z>`rzMyO-V19%A2TkFh7%i|ps@m+V*UW%g_KCVPwhiT#;lIF{o$5$D7Ca(CZ8>*|1 zBUj{x+>r_gi)sPmj3YFs!T|)X5@*y2u0{-BthPU;c>q*u_8a! z*fBpP#TcKGoR=7%V$3tfXQmnp1CDL7^xNg(DeZ2}eZ4g}4$o;!ZqBhxI5D$&msnftY9j zQ=v%WNxX=dcmruZ0QN5NEE5L`?N!xQn#Y!y&DBH8>pNTeR9UKqR+|R5l@!*O*OYeC1*A~Kg)I_vhX zts326>RbuEtr}KksxK28?gVewPMI+?F+VBK*fHLiR*(tf38R=%kd_)>m{!m+B|SMg zzoXGuCJqM#c@-Q)3p-tqc6(nUOrKZOhrY6E{<)`My8&i|C@!F)sbZ9WSz?hy_ zCJqp2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$ZgCexsT^g&wVy`bMCI(J-PdH-_1RodnET%?nk+2 zb3e_K*}Q6-+LeQZTLHnSuociwl+(tSD$ISXJ?QW0C^UF2INEeb4(EK(G0EZS4Fujr6H=s{8T PZ&7+{fT;DW= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/xcuserdata/pfizer.xcuserdatad/xcschemes/xcschememanagement.plist b/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/xcuserdata/pfizer.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 55406d7..0000000 --- a/CHSectionSelectionView/CHTableGroupSelectionView.xcodeproj/xcuserdata/pfizer.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - CHTableGroupSelectionView.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 617A78FC165BCD10008C90BE - - primary - - - - - diff --git a/CHSectionSelectionView/CHTableGroupSelectionView/CHTableGroupSelectionView-Info.plist b/CHSectionSelectionView/CHTableGroupSelectionView/CHTableGroupSelectionView-Info.plist deleted file mode 100644 index 82c8944..0000000 --- a/CHSectionSelectionView/CHTableGroupSelectionView/CHTableGroupSelectionView-Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - at.appingo.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - From 404039277cb0e7a889f86e64554331080bef69b0 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 27 Aug 2013 19:50:52 -0300 Subject: [PATCH 2/7] Adding support for Storyboards. --- CHSectionSelectionView/.DS_Store | Bin 12292 -> 12292 bytes .../CHSectionSelectionItemView.m | 66 ++++++++++++------ .../CHSectionSelectionView.h | 8 +-- .../CHSectionSelectionView.m | 63 +++++++++++------ 4 files changed, 90 insertions(+), 47 deletions(-) diff --git a/CHSectionSelectionView/.DS_Store b/CHSectionSelectionView/.DS_Store index 46e78bda44c686b17dd72490d3a8bdb0522e93a6..888baa002b84a67093c7b2f9cf02a79913200a0a 100644 GIT binary patch delta 30 mcmZokXi3;`Pmt+{*X9R;LX3<7lNm+4Ctncc+w3E}Lk0l5atjXt delta 30 mcmZokXi3;`Pmt-$y3G#+g%}wfCNqk7Pre|?x7kN{hYSG1ZVO)k diff --git a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m index 752bad3..16a0c56 100644 --- a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m +++ b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m @@ -10,32 +10,56 @@ @implementation CHSectionSelectionItemView -- (id)initWithFrame:(CGRect)frame +- (void) _initializeAttributes { - self = [super initWithFrame:frame]; - if (self) { - // Initialization code - - _contentView = [[UIView alloc] init]; - _contentView.backgroundColor = [UIColor whiteColor]; - [self addSubview:_contentView]; - - _bgImageView = [[UIImageView alloc] init]; - [_contentView addSubview:_bgImageView]; - - _titleLabel = [[UILabel alloc] init]; - _titleLabel.backgroundColor = [UIColor clearColor]; - _titleLabel.textColor = [UIColor blackColor]; - _titleLabel.highlightedTextColor = [UIColor whiteColor]; - + // Initialization code + + _contentView = [[UIView alloc] init]; + _contentView.backgroundColor = [UIColor whiteColor]; + [self addSubview:_contentView]; + + _bgImageView = [[UIImageView alloc] init]; + [_contentView addSubview:_bgImageView]; + + _titleLabel = [[UILabel alloc] init]; + _titleLabel.backgroundColor = [UIColor clearColor]; + _titleLabel.textColor = [UIColor blackColor]; + _titleLabel.highlightedTextColor = [UIColor whiteColor]; + #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 - _titleLabel.textAlignment = NSTextAlignmentCenter; + _titleLabel.textAlignment = NSTextAlignmentCenter; #else - _titleLabel.textAlignment = UITextAlignmentCenter; + _titleLabel.textAlignment = UITextAlignmentCenter; #endif - [_contentView addSubview:_titleLabel]; - + + [_contentView addSubview:_titleLabel]; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + self = [super initWithCoder:aDecoder]; + + if(self) + { + [self _initializeAttributes]; } + + return self; +} + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) + { + [self _initializeAttributes]; + } + return self; +} + +- (id)init +{ + self = [super initWithFrame:CGRectZero]; return self; } diff --git a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h index e6a97c5..b002382 100644 --- a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h +++ b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h @@ -37,10 +37,6 @@ typedef enum { @interface CHSectionSelectionView : UIView { - - __weak id dataSource; // The Data Source - __weak id delegate; // The Delegate - CGFloat sectionHeight; NSMutableArray *sectionViews; // Contains all the section views NSInteger highlightedSection; // index of current highlighted section, -1 if nothing is highlighted @@ -48,8 +44,8 @@ typedef enum { UIView *callOut; // the current shown callout, nil if no callout is shown } -@property (nonatomic, weak) id dataSource; -@property (nonatomic, weak) id delegate; +@property (nonatomic, weak) IBOutlet id dataSource; +@property (nonatomic, weak) IBOutlet id delegate; @property (nonatomic, assign) SectionCalloutDirection calloutDirection; // Defaults to SectionCalloutDirectionRight @property (nonatomic, assign) BOOL showCallouts; // turning callouts of and on. defaults to YES @property (nonatomic, assign) CGFloat fixedSectionItemHeight; // can be used to make sure an item has a fixed height, will be ignored if it is 0 diff --git a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m index 4a9deed..f196fe0 100644 --- a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m +++ b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m @@ -25,25 +25,48 @@ @implementation CHSectionSelectionView ////////////////////////////////////////////////////////////////////////// #pragma mark - Initialization +- (void) _initializeAttributes +{ + sectionViews = [[NSMutableArray alloc] init]; + + self.clipsToBounds = NO; // Needed bacause the callouts will live outside our view + + // setting some default values + + _calloutPadding = 0; + _fixedSectionItemHeight = 0; + _showCallouts = YES; + _calloutDirection = SectionCalloutDirectionRight; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + self = [super initWithCoder:aDecoder]; + + if(self) + { + [self _initializeAttributes]; + } + + return self; +} + - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; - if (self) { - - sectionViews = [[NSMutableArray alloc] init]; - - self.clipsToBounds = NO; // Needed bacause the callouts will live outside our view - - // setting some default values - - _calloutPadding = 0; - _fixedSectionItemHeight = 0; - _showCallouts = YES; - _calloutDirection = SectionCalloutDirectionRight; + if (self) + { + [self _initializeAttributes]; } return self; } +- (id)init +{ + self = [super initWithFrame:CGRectZero]; + return self; +} + ////////////////////////////////////////////////////////////////////////// #pragma mark - View stuff @@ -73,14 +96,14 @@ -(void)reloadSections NSInteger numberOfSections = 0; - if (_dataSource && [_dataSource respondsToSelector:@selector(numberOfSectionsInSectionSelectionView:)]) { - numberOfSections = [_dataSource numberOfSectionsInSectionSelectionView:self]; + if (self.dataSource && [self.dataSource respondsToSelector:@selector(numberOfSectionsInSectionSelectionView:)]) { + numberOfSections = [self.dataSource numberOfSectionsInSectionSelectionView:self]; } for (int section = 0; section < numberOfSections; section++) { - if (_dataSource && [_dataSource respondsToSelector:@selector(sectionSelectionView:sectionSelectionItemViewForSection:)]) { - CHSectionSelectionItemView *sectionView = [_dataSource sectionSelectionView:self sectionSelectionItemViewForSection:section]; + if (self.dataSource && [self.dataSource respondsToSelector:@selector(sectionSelectionView:sectionSelectionItemViewForSection:)]) { + CHSectionSelectionItemView *sectionView = [self.dataSource sectionSelectionView:self sectionSelectionItemViewForSection:section]; sectionView.section = section; NSLog(@"fetched view"); @@ -125,9 +148,9 @@ -(void)selectedSection:(NSInteger)selectedSection [self highlightItemAtSection:selectedSection]; if (_showCallouts) { - if (_dataSource && [_dataSource respondsToSelector:@selector(sectionSelectionView:callOutViewForSelectedSection:)]) { + if (self.dataSource && [self.dataSource respondsToSelector:@selector(sectionSelectionView:callOutViewForSelectedSection:)]) { - callOut = [_dataSource sectionSelectionView:self callOutViewForSelectedSection:selectedSection]; + callOut = [self.dataSource sectionSelectionView:self callOutViewForSelectedSection:selectedSection]; [self addSubview:callOut]; CHSectionSelectionItemView *selectedSectionView = [sectionViews objectAtIndex:selectedSection]; @@ -165,8 +188,8 @@ -(void)selectedSection:(NSInteger)selectedSection // Inform the delegate about the selection - if (_delegate && [_delegate respondsToSelector:@selector(sectionSelectionView:didSelectSection:)]) { - [_delegate sectionSelectionView:self didSelectSection:selectedSection]; + if (self.delegate && [self.delegate respondsToSelector:@selector(sectionSelectionView:didSelectSection:)]) { + [self.delegate sectionSelectionView:self didSelectSection:selectedSection]; } } From 8cc4a689a29f172d5b639f3c9b9a3dedcfffe520 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 24 Sep 2013 14:46:23 -0300 Subject: [PATCH 3/7] Add support for contentView --- .gitignore | 2 +- .../CHSectionSelectionItemView.h | 0 .../CHSectionSelectionItemView.m | 17 +---- .../CHSectionSelectionView.h | 6 ++ .../CHSectionSelectionView.m | 62 +++++++++++-------- 5 files changed, 45 insertions(+), 42 deletions(-) mode change 100644 => 100755 CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.h mode change 100644 => 100755 CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m mode change 100644 => 100755 CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h mode change 100644 => 100755 CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m diff --git a/.gitignore b/.gitignore index b487c4e..a0c590b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.DS_Store +*.DS_Store *.xcuserstate *.xccheckout *.xcbkptlist diff --git a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.h b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.h old mode 100644 new mode 100755 diff --git a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m old mode 100644 new mode 100755 index 16a0c56..2da3a44 --- a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m +++ b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionItemView.m @@ -10,7 +10,7 @@ @implementation CHSectionSelectionItemView -- (void) _initializeAttributes +- (void) initializeAttributes { // Initialization code @@ -26,12 +26,7 @@ - (void) _initializeAttributes _titleLabel.textColor = [UIColor blackColor]; _titleLabel.highlightedTextColor = [UIColor whiteColor]; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 _titleLabel.textAlignment = NSTextAlignmentCenter; -#else - _titleLabel.textAlignment = UITextAlignmentCenter; -#endif - [_contentView addSubview:_titleLabel]; } @@ -41,7 +36,7 @@ - (id)initWithCoder:(NSCoder *)aDecoder if(self) { - [self _initializeAttributes]; + [self initializeAttributes]; } return self; @@ -52,17 +47,11 @@ - (id)initWithFrame:(CGRect)frame self = [super initWithFrame:frame]; if (self) { - [self _initializeAttributes]; + [self initializeAttributes]; } return self; } -- (id)init -{ - self = [super initWithFrame:CGRectZero]; - return self; -} - // The following methods should be overriden by your subclass -(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated diff --git a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h old mode 100644 new mode 100755 index b002382..221b3d4 --- a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h +++ b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.h @@ -37,6 +37,10 @@ typedef enum { @interface CHSectionSelectionView : UIView { + + __weak id dataSource; // The Data Source + __weak id delegate; // The Delegate + CGFloat sectionHeight; NSMutableArray *sectionViews; // Contains all the section views NSInteger highlightedSection; // index of current highlighted section, -1 if nothing is highlighted @@ -44,6 +48,8 @@ typedef enum { UIView *callOut; // the current shown callout, nil if no callout is shown } +@property (nonatomic, strong) IBOutlet UIView *contentView; + @property (nonatomic, weak) IBOutlet id dataSource; @property (nonatomic, weak) IBOutlet id delegate; @property (nonatomic, assign) SectionCalloutDirection calloutDirection; // Defaults to SectionCalloutDirectionRight diff --git a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m old mode 100644 new mode 100755 index f196fe0..17d602d --- a/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m +++ b/CHSectionSelectionView/CHSectionSelectionView/CHSectionSelectionView.m @@ -61,12 +61,6 @@ - (id)initWithFrame:(CGRect)frame return self; } -- (id)init -{ - self = [super initWithFrame:CGRectZero]; - return self; -} - ////////////////////////////////////////////////////////////////////////// #pragma mark - View stuff @@ -77,6 +71,20 @@ -(void)layoutSubviews [self layoutSections]; } +#pragma mark - Properties + +- (UIView *) contentView +{ + if(_contentView == nil) + { + // Only instantiate if it's not set yet + _contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; + [self addSubview:_contentView]; + } + + return _contentView; +} + ////////////////////////////////////////////////////////////////////////// #pragma mark - Public methods @@ -96,19 +104,19 @@ -(void)reloadSections NSInteger numberOfSections = 0; - if (self.dataSource && [self.dataSource respondsToSelector:@selector(numberOfSectionsInSectionSelectionView:)]) { - numberOfSections = [self.dataSource numberOfSectionsInSectionSelectionView:self]; + if (_dataSource && [_dataSource respondsToSelector:@selector(numberOfSectionsInSectionSelectionView:)]) { + numberOfSections = [_dataSource numberOfSectionsInSectionSelectionView:self]; } for (int section = 0; section < numberOfSections; section++) { - if (self.dataSource && [self.dataSource respondsToSelector:@selector(sectionSelectionView:sectionSelectionItemViewForSection:)]) { - CHSectionSelectionItemView *sectionView = [self.dataSource sectionSelectionView:self sectionSelectionItemViewForSection:section]; + if (_dataSource && [_dataSource respondsToSelector:@selector(sectionSelectionView:sectionSelectionItemViewForSection:)]) { + CHSectionSelectionItemView *sectionView = [_dataSource sectionSelectionView:self sectionSelectionItemViewForSection:section]; sectionView.section = section; - NSLog(@"fetched view"); +// NSLog(@"fetched view"); [sectionViews addObject:sectionView]; - [self addSubview:sectionView]; + [self.contentView addSubview:sectionView]; } @@ -124,10 +132,7 @@ -(void)reloadSections -(void)layoutSections { - - - - sectionHeight = self.bounds.size.height/(CGFloat)[sectionViews count]; + sectionHeight = self.contentView.bounds.size.height/(CGFloat)[sectionViews count]; if (_fixedSectionItemHeight > 0) { @@ -137,7 +142,7 @@ -(void)layoutSections CGFloat yOffset = 0; for (UIView *sectionView in sectionViews) { - sectionView.frame = CGRectMake(0, yOffset, self.bounds.size.width, sectionHeight); + sectionView.frame = CGRectMake(0, yOffset, self.contentView.bounds.size.width, sectionHeight); yOffset+=sectionHeight; } } @@ -148,9 +153,9 @@ -(void)selectedSection:(NSInteger)selectedSection [self highlightItemAtSection:selectedSection]; if (_showCallouts) { - if (self.dataSource && [self.dataSource respondsToSelector:@selector(sectionSelectionView:callOutViewForSelectedSection:)]) { + if (_dataSource && [_dataSource respondsToSelector:@selector(sectionSelectionView:callOutViewForSelectedSection:)]) { - callOut = [self.dataSource sectionSelectionView:self callOutViewForSelectedSection:selectedSection]; + callOut = [_dataSource sectionSelectionView:self callOutViewForSelectedSection:selectedSection]; [self addSubview:callOut]; CHSectionSelectionItemView *selectedSectionView = [sectionViews objectAtIndex:selectedSection]; @@ -188,8 +193,8 @@ -(void)selectedSection:(NSInteger)selectedSection // Inform the delegate about the selection - if (self.delegate && [self.delegate respondsToSelector:@selector(sectionSelectionView:didSelectSection:)]) { - [self.delegate sectionSelectionView:self didSelectSection:selectedSection]; + if (_delegate && [_delegate respondsToSelector:@selector(sectionSelectionView:didSelectSection:)]) { + [_delegate sectionSelectionView:self didSelectSection:selectedSection]; } } @@ -224,15 +229,16 @@ -(void)highlightItemAtSection:(NSInteger)section -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - - UITouch *touch = [touches anyObject]; CGPoint touchPoint = [touch locationInView:self]; for (CHSectionSelectionItemView *sectionView in sectionViews) { - if (CGRectContainsPoint(sectionView.frame, touchPoint)) { + CGRect frame = sectionView.frame; + frame.size.width = self.frame.size.width; + + if (CGRectContainsPoint(frame, touchPoint)) { [self selectedSection:sectionView.section]; highlightedSection = sectionView.section; @@ -242,8 +248,7 @@ -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event } - highlightedSection = -1; // nothing is highlighted - + highlightedSection = -1; // nothing is highlighted } -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event @@ -253,7 +258,10 @@ -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event for (CHSectionSelectionItemView *sectionView in sectionViews) { - if (CGRectContainsPoint(sectionView.frame, touchPoint)) { + CGRect frame = sectionView.frame; + frame.size.width = self.frame.size.width; + + if (CGRectContainsPoint(frame, touchPoint)) { // just highlight again if the section has changed if (sectionView.section != highlightedSection) { From 187b6f276ddc6641b4b55afe5c2b8683676ce23a Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 24 Sep 2013 14:54:28 -0300 Subject: [PATCH 4/7] Add podspec --- CHSectionSelectionView.podspec | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 CHSectionSelectionView.podspec diff --git a/CHSectionSelectionView.podspec b/CHSectionSelectionView.podspec new file mode 100644 index 0000000..784fc67 --- /dev/null +++ b/CHSectionSelectionView.podspec @@ -0,0 +1,29 @@ +Pod::Spec.new do |s| + s.name = "CHSectionSelectionView" + s.version = "0.5.0" + s.summary = "Easy to use and highly customizable View that displays selector controls for (e.g.) UITableView Sections. This project is inspired by the iPads Address Book application." + + s.description = <<-DESC + Easy to use and highly customizable View that displays selector controls for (e.g.) UITableView Sections. + This project is inspired by the iPads Address Book application. + DESC + + s.homepage = "https://github.com/alexandreos/CHSectionSelectionView" + s.license = { :type => 'Apache License, Version 2.0', :text => <<-LICESNSE + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + Attribution is appreciated. + LICESNSE + } + + s.authors = { "Alexandre Santos" => "alexandre_o_s@yahoo.com", "Clemens Beat" => "beat84@me.com" } + s.platform = :ios, '5.0' + s.source = { :git => "https://github.com/alexandreos/CHSectionSelectionView.git", :tag => "0.5.0" } + s.source_files = 'CHSectionSelectionView/CHTableGroupSelectionView/CHSectionSelectionView.{h,m}', 'CHSectionSelectionView/CHTableGroupSelectionView/CHSectionSelectionItemView.{h,m}' + s.requires_arc = true + +end From 496ff6f379f16718279a77019a27722b25f96f03 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 24 Sep 2013 15:04:37 -0300 Subject: [PATCH 5/7] Fix source files --- CHSectionSelectionView.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHSectionSelectionView.podspec b/CHSectionSelectionView.podspec index 784fc67..3f54b1a 100644 --- a/CHSectionSelectionView.podspec +++ b/CHSectionSelectionView.podspec @@ -23,7 +23,7 @@ Pod::Spec.new do |s| s.authors = { "Alexandre Santos" => "alexandre_o_s@yahoo.com", "Clemens Beat" => "beat84@me.com" } s.platform = :ios, '5.0' s.source = { :git => "https://github.com/alexandreos/CHSectionSelectionView.git", :tag => "0.5.0" } - s.source_files = 'CHSectionSelectionView/CHTableGroupSelectionView/CHSectionSelectionView.{h,m}', 'CHSectionSelectionView/CHTableGroupSelectionView/CHSectionSelectionItemView.{h,m}' + s.source_files = 'CHSectionSelectionView/CHSectionSelectionView' s.requires_arc = true end From 635ba41b230f887e58811e47a7c24e717a6211c8 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 24 Sep 2013 15:07:19 -0300 Subject: [PATCH 6/7] Fix podspec --- CHSectionSelectionView.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHSectionSelectionView.podspec b/CHSectionSelectionView.podspec index 3f54b1a..b103bb5 100644 --- a/CHSectionSelectionView.podspec +++ b/CHSectionSelectionView.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "CHSectionSelectionView" s.version = "0.5.0" - s.summary = "Easy to use and highly customizable View that displays selector controls for (e.g.) UITableView Sections. This project is inspired by the iPads Address Book application." + s.summary = "Easy to use and highly customizable View that displays selector controls for (e.g.) UITableView Sections." s.description = <<-DESC Easy to use and highly customizable View that displays selector controls for (e.g.) UITableView Sections. From 7ab1c9a7235d86f44aabf0e9532dc84a0ac59e24 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 24 Sep 2013 15:10:53 -0300 Subject: [PATCH 7/7] Fix podspec --- CHSectionSelectionView.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHSectionSelectionView.podspec b/CHSectionSelectionView.podspec index b103bb5..9d14176 100644 --- a/CHSectionSelectionView.podspec +++ b/CHSectionSelectionView.podspec @@ -23,7 +23,7 @@ Pod::Spec.new do |s| s.authors = { "Alexandre Santos" => "alexandre_o_s@yahoo.com", "Clemens Beat" => "beat84@me.com" } s.platform = :ios, '5.0' s.source = { :git => "https://github.com/alexandreos/CHSectionSelectionView.git", :tag => "0.5.0" } - s.source_files = 'CHSectionSelectionView/CHSectionSelectionView' + s.source_files = 'CHSectionSelectionView/CHSectionSelectionView/*.{h,m}' s.requires_arc = true end