From 2197fab67203f60af571cb0a6fa41e01bab8e401 Mon Sep 17 00:00:00 2001 From: Martin Barreto Date: Fri, 8 Jan 2016 12:49:09 -0300 Subject: [PATCH] added missing pod resource. --- XLPagerTabStrip.podspec | 1 + XLPagerTabStrip.xcodeproj/project.pbxproj | 10 ++++++---- .../XLButtonBarPagerTabStripViewController.m | 5 ++++- XLPagerTabStrip/{Demo => XL/Views}/ButtonCell.xib | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) rename XLPagerTabStrip/{Demo => XL/Views}/ButtonCell.xib (87%) diff --git a/XLPagerTabStrip.podspec b/XLPagerTabStrip.podspec index f9fd87b..0c13a3c 100644 --- a/XLPagerTabStrip.podspec +++ b/XLPagerTabStrip.podspec @@ -13,4 +13,5 @@ Pod::Spec.new do |s| s.requires_arc = true s.ios.deployment_target = '8.0' s.ios.frameworks = 'UIKit', 'Foundation' + s.resource_bundles = { 'XLPagerTabStrip' => ['XLPagerTabStrip/XL/Views/ButtonCell.xib'] } end diff --git a/XLPagerTabStrip.xcodeproj/project.pbxproj b/XLPagerTabStrip.xcodeproj/project.pbxproj index 2cc12b9..98cbbc8 100644 --- a/XLPagerTabStrip.xcodeproj/project.pbxproj +++ b/XLPagerTabStrip.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 2886E3AA1C401F4000E631EC /* ButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2886E3A91C401F4000E631EC /* ButtonCell.xib */; }; 28B63A8C1A459F5900225C66 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 28B63A8B1A459F5900225C66 /* main.m */; }; 28B63A8F1A459F5900225C66 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 28B63A8E1A459F5900225C66 /* AppDelegate.m */; }; 28B63A971A459F5900225C66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 28B63A961A459F5900225C66 /* Images.xcassets */; }; @@ -28,7 +29,6 @@ 28B63AF21A45B26600225C66 /* XLSegmentedPagerTabStripViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28B63AEE1A45B26600225C66 /* XLSegmentedPagerTabStripViewController.m */; }; 28B63AF51A465E5E00225C66 /* ReloadExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28B63AF41A465E5E00225C66 /* ReloadExampleViewController.m */; }; 28E89E3C1AD74D99004BD9CD /* FXPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 28E89E3B1AD74D99004BD9CD /* FXPageControl.m */; }; - 6624E4591AEEDB600076274D /* ButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6624E4581AEEDB600076274D /* ButtonCell.xib */; }; 6624E45C1AEEF9A50076274D /* NavButtonBarExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6624E45B1AEEF9A50076274D /* NavButtonBarExampleViewController.m */; }; 66CA35B41A8D174900564221 /* XLTwitterPagerTabStripViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CA35B31A8D174900564221 /* XLTwitterPagerTabStripViewController.m */; }; C262204E1AD44A4D002E5226 /* TwitterExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C262204D1AD44A4D002E5226 /* TwitterExampleViewController.m */; }; @@ -45,6 +45,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 2886E3A71C400DD000E631EC /* XLPagerTabStrip.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = XLPagerTabStrip.bundle; path = ../XLPagerTabStrip.bundle; sourceTree = ""; }; + 2886E3A91C401F4000E631EC /* ButtonCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ButtonCell.xib; sourceTree = ""; }; 28B63A861A459F5900225C66 /* XLPagerTabStrip.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XLPagerTabStrip.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28B63A8A1A459F5900225C66 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 28B63A8B1A459F5900225C66 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -87,7 +89,6 @@ 28B63AF41A465E5E00225C66 /* ReloadExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReloadExampleViewController.m; sourceTree = ""; }; 28E89E3A1AD74D99004BD9CD /* FXPageControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FXPageControl.h; path = XLPagerTabStrip/XL/Views/FXPageControl/FXPageControl.h; sourceTree = SOURCE_ROOT; }; 28E89E3B1AD74D99004BD9CD /* FXPageControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FXPageControl.m; path = XLPagerTabStrip/XL/Views/FXPageControl/FXPageControl.m; sourceTree = SOURCE_ROOT; }; - 6624E4581AEEDB600076274D /* ButtonCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ButtonCell.xib; sourceTree = ""; }; 6624E45A1AEEF9A50076274D /* NavButtonBarExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavButtonBarExampleViewController.h; sourceTree = ""; }; 6624E45B1AEEF9A50076274D /* NavButtonBarExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavButtonBarExampleViewController.m; sourceTree = ""; }; 66CA35B21A8D174900564221 /* XLTwitterPagerTabStripViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XLTwitterPagerTabStripViewController.h; path = Controllers/XLTwitterPagerTabStripViewController.h; sourceTree = ""; }; @@ -187,7 +188,7 @@ C262204C1AD44A4D002E5226 /* TwitterExampleViewController.h */, C262204D1AD44A4D002E5226 /* TwitterExampleViewController.m */, 28B63AC21A45A4C500225C66 /* Storyboard.storyboard */, - 6624E4581AEEDB600076274D /* ButtonCell.xib */, + 2886E3A71C400DD000E631EC /* XLPagerTabStrip.bundle */, ); path = Demo; sourceTree = ""; @@ -236,6 +237,7 @@ 28B63ACD1A45A4CD00225C66 /* Views */ = { isa = PBXGroup; children = ( + 2886E3A91C401F4000E631EC /* ButtonCell.xib */, 66C6E4AF1AB9D538005361FB /* FXPageControl */, 28B63ACE1A45A4CD00225C66 /* XLBarView.h */, 28B63ACF1A45A4CD00225C66 /* XLBarView.m */, @@ -354,9 +356,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6624E4591AEEDB600076274D /* ButtonCell.xib in Resources */, 28B63A971A459F5900225C66 /* Images.xcassets in Resources */, 28B63ACB1A45A4C500225C66 /* Storyboard.storyboard in Resources */, + 2886E3AA1C401F4000E631EC /* ButtonCell.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.m b/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.m index 4b0aa3a..ac7d265 100644 --- a/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.m +++ b/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.m @@ -182,7 +182,10 @@ _buttonBarView.autoresizingMask = UIViewAutoresizingFlexibleWidth; // If a XIB or storyboard hasn't been used we also need to register the cell reuseIdentifier // as well otherwise we'll get a crash when the code attempts to dequeue any cell's - [_buttonBarView registerNib:[UINib nibWithNibName:@"ButtonCell" bundle:[NSBundle bundleForClass:[self class]]] forCellWithReuseIdentifier:@"Cell"]; + NSBundle * bundle = [NSBundle bundleForClass:[XLButtonBarView class]]; + NSURL * url = [bundle URLForResource:@"XLPagerTabStrip" withExtension:@"bundle"]; + bundle = [NSBundle bundleWithURL:url]; + [_buttonBarView registerNib:[UINib nibWithNibName:@"ButtonCell" bundle:bundle] forCellWithReuseIdentifier:@"Cell"]; // If a XIB or storyboard hasn't been used then the containView frame that was setup in the // XLPagerTabStripViewController won't have accounted for the buttonBarView. So we need to adjust // its y position (and also its height) so that childVC's don't appear under the buttonBarView. diff --git a/XLPagerTabStrip/Demo/ButtonCell.xib b/XLPagerTabStrip/XL/Views/ButtonCell.xib similarity index 87% rename from XLPagerTabStrip/Demo/ButtonCell.xib rename to XLPagerTabStrip/XL/Views/ButtonCell.xib index 8df03c8..755802f 100644 --- a/XLPagerTabStrip/Demo/ButtonCell.xib +++ b/XLPagerTabStrip/XL/Views/ButtonCell.xib @@ -11,8 +11,8 @@ -