├── BWTitlePagerView ├── BWTitlePagerView.h └── BWTitlePagerView.m ├── BWTitlePagerViewExample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── BWTitlePagerViewExample.xccheckout │ └── xcuserdata │ │ └── cesar4.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── cesar4.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── BWTitlePagerViewExample.xcscheme │ └── xcschememanagement.plist ├── BWTitlePagerViewExample ├── AppDelegate.h ├── AppDelegate.m ├── BWTitlePagerViewExample-Info.plist ├── BWTitlePagerViewExample-Prefix.pch ├── BWTitlePagerViewExample.xcdatamodeld │ ├── .xccurrentversion │ └── BWTitlePagerViewExample.xcdatamodel │ │ └── contents ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── ViewController.h ├── ViewController.m ├── en.lproj │ └── InfoPlist.strings ├── main.m ├── tux.png └── tux@2x.png ├── BWTitlePagerViewExampleTests ├── BWTitlePagerViewExampleTests-Info.plist ├── BWTitlePagerViewExampleTests.m └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── README.md └── shot.png /BWTitlePagerView/BWTitlePagerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Bruno Wernimont on 2014 3 | // Copyright 2014 BWTitlePagerView 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | 18 | @interface BWTitlePagerView : UIView { 19 | BOOL _isObservingScrollView; 20 | } 21 | 22 | @property (nonatomic, strong) UIColor *tintColor; 23 | @property (nonatomic, strong) UIColor *currentTintColor; 24 | @property (nonatomic, strong) UIFont *font; 25 | 26 | - (void)addObjects:(NSArray *)images; 27 | 28 | - (void)observeScrollView:(UIScrollView *)scrollView; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /BWTitlePagerView/BWTitlePagerView.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Bruno Wernimont on 2014 3 | // Copyright 2014 BWTitlePagerView 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | 18 | #import "BWTitlePagerView.h" 19 | 20 | 21 | //////////////////////////////////////////////////////////////////////////////////////////////////// 22 | //////////////////////////////////////////////////////////////////////////////////////////////////// 23 | //////////////////////////////////////////////////////////////////////////////////////////////////// 24 | @interface BWTitlePagerView () 25 | 26 | @property (nonatomic, strong) UIScrollView *scrollView; 27 | @property (nonatomic, strong) UIPageControl *pageControl; 28 | @property (nonatomic, weak) UIScrollView *observedScrollView; 29 | @property (nonatomic, strong) NSMutableArray *views; 30 | 31 | @end 32 | 33 | //////////////////////////////////////////////////////////////////////////////////////////////////// 34 | //////////////////////////////////////////////////////////////////////////////////////////////////// 35 | //////////////////////////////////////////////////////////////////////////////////////////////////// 36 | @implementation BWTitlePagerView 37 | 38 | //////////////////////////////////////////////////////////////////////////////////////////////////// 39 | - (id)init { 40 | self = [super init]; 41 | if (self) { 42 | self.scrollView = [[UIScrollView alloc] init]; 43 | self.scrollView.scrollEnabled = NO; 44 | 45 | self.views = [NSMutableArray array]; 46 | 47 | self.pageControl = [[UIPageControl alloc] init]; 48 | 49 | self.tintColor = [UIColor lightGrayColor]; 50 | self.currentTintColor = [UIColor redColor]; 51 | self.font = [UIFont systemFontOfSize:17]; 52 | 53 | _isObservingScrollView = NO; 54 | 55 | [self addSubview:self.scrollView]; 56 | [self addSubview:self.pageControl]; 57 | } 58 | return self; 59 | } 60 | 61 | //////////////////////////////////////////////////////////////////////////////////////////////////// 62 | - (void)addObjects:(NSArray *)objects { 63 | [self.views makeObjectsPerformSelector:@selector(removeFromSuperview)]; 64 | [self.views removeAllObjects]; 65 | 66 | [objects enumerateObjectsUsingBlock:^(id object, NSUInteger idx, BOOL *stop) { 67 | if ([object isKindOfClass:[NSString class]]) { 68 | UILabel *textLabel = [[UILabel alloc] init]; 69 | textLabel.text = object; 70 | textLabel.textColor = self.currentTintColor; 71 | textLabel.textAlignment = NSTextAlignmentCenter; 72 | textLabel.font = self.font; 73 | [self.scrollView addSubview:textLabel]; 74 | [self.views addObject:textLabel]; 75 | 76 | } else if ([object isKindOfClass:[UIImage class]]) { 77 | UIImageView *imageView = [[UIImageView alloc] initWithImage:object]; 78 | imageView.contentMode = UIViewContentModeCenter; 79 | [self.scrollView addSubview:imageView]; 80 | [self.views addObject:imageView]; 81 | } 82 | }]; 83 | 84 | self.pageControl.numberOfPages = objects.count; 85 | } 86 | 87 | //////////////////////////////////////////////////////////////////////////////////////////////////// 88 | - (void)layoutSubviews { 89 | [super layoutSubviews]; 90 | 91 | self.scrollView.frame = self.bounds; 92 | 93 | self.pageControl.frame = CGRectMake(0, 94 | self.frame.size.height - 12, 95 | self.frame.size.width, 96 | 10); 97 | 98 | [self.views enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) { 99 | [view sizeToFit]; 100 | CGSize size = view.frame.size; 101 | size.width = self.scrollView.frame.size.width; 102 | view.frame = CGRectMake(self.scrollView.frame.size.width * idx, 103 | (self.scrollView.frame.size.height - size.height) / 2 - 7, 104 | size.width, size.height); 105 | }]; 106 | 107 | self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * [self.views count], self.scrollView.frame.size.height); 108 | } 109 | 110 | //////////////////////////////////////////////////////////////////////////////////////////////////// 111 | - (void)observeScrollView:(UIScrollView *)scrollView; { 112 | self.observedScrollView = scrollView; 113 | 114 | if (_isObservingScrollView) { 115 | [self.observedScrollView removeObserver:self forKeyPath:@"contentOffset"]; 116 | } 117 | 118 | _isObservingScrollView = YES; 119 | 120 | [self.observedScrollView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:nil]; 121 | } 122 | 123 | //////////////////////////////////////////////////////////////////////////////////////////////////// 124 | - (void)observeValueForKeyPath:(NSString *)keyPath 125 | ofObject:(id)object 126 | change:(NSDictionary *)change 127 | context:(void *)context { 128 | 129 | CGFloat coef = self.observedScrollView.frame.size.width / self.scrollView.frame.size.width; 130 | 131 | if (coef > 0) { 132 | self.scrollView.contentOffset = CGPointMake(self.observedScrollView.contentOffset.x / coef, 0); 133 | } 134 | 135 | CGFloat pageWidth = self.observedScrollView.frame.size.width; 136 | NSUInteger page = floor((self.observedScrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1; 137 | self.pageControl.currentPage = page; 138 | 139 | CGFloat scrollViewWidth = self.scrollView.frame.size.width; 140 | 141 | [self.views enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) { 142 | CGFloat diff = (self.scrollView.contentOffset.x - scrollViewWidth*idx) + scrollViewWidth/2; 143 | 144 | if (diff > scrollViewWidth/2) { 145 | diff = scrollViewWidth - diff; 146 | } 147 | 148 | if (diff < 0) { 149 | diff = 0; 150 | } 151 | 152 | CGFloat alpha = scrollViewWidth / 100 * diff / 100 + 0.15f; 153 | 154 | view.alpha = alpha; 155 | }]; 156 | } 157 | 158 | //////////////////////////////////////////////////////////////////////////////////////////////////// 159 | - (void)dealloc { 160 | if (_isObservingScrollView) { 161 | [self.observedScrollView removeObserver:self forKeyPath:@"contentOffset"]; 162 | } 163 | } 164 | 165 | 166 | //////////////////////////////////////////////////////////////////////////////////////////////////// 167 | //////////////////////////////////////////////////////////////////////////////////////////////////// 168 | #pragma mark - 169 | #pragma mark Getters and setters 170 | 171 | //////////////////////////////////////////////////////////////////////////////////////////////////// 172 | - (void)setCurrentTintColor:(UIColor *)currentTintColor { 173 | _currentTintColor = currentTintColor; 174 | self.pageControl.currentPageIndicatorTintColor = currentTintColor; 175 | } 176 | 177 | //////////////////////////////////////////////////////////////////////////////////////////////////// 178 | - (void)setTintColor:(UIColor *)tintColor { 179 | _tintColor = tintColor; 180 | self.pageControl.pageIndicatorTintColor = tintColor; 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E722085219476E8500E280BA /* tux.png in Resources */ = {isa = PBXBuildFile; fileRef = E722085019476E8500E280BA /* tux.png */; }; 11 | E722085319476E8500E280BA /* tux@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = E722085119476E8500E280BA /* tux@2x.png */; }; 12 | E734FCB6193F25A200A0A386 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E734FCB5193F25A200A0A386 /* Foundation.framework */; }; 13 | E734FCB8193F25A200A0A386 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E734FCB7193F25A200A0A386 /* CoreGraphics.framework */; }; 14 | E734FCBA193F25A200A0A386 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E734FCB9193F25A200A0A386 /* UIKit.framework */; }; 15 | E734FCBC193F25A200A0A386 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E734FCBB193F25A200A0A386 /* CoreData.framework */; }; 16 | E734FCC2193F25A200A0A386 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E734FCC0193F25A200A0A386 /* InfoPlist.strings */; }; 17 | E734FCC4193F25A200A0A386 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E734FCC3193F25A200A0A386 /* main.m */; }; 18 | E734FCC8193F25A200A0A386 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E734FCC7193F25A200A0A386 /* AppDelegate.m */; }; 19 | E734FCCB193F25A200A0A386 /* BWTitlePagerViewExample.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E734FCC9193F25A200A0A386 /* BWTitlePagerViewExample.xcdatamodeld */; }; 20 | E734FCCD193F25A200A0A386 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E734FCCC193F25A200A0A386 /* Images.xcassets */; }; 21 | E734FCD4193F25A200A0A386 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E734FCD3193F25A200A0A386 /* XCTest.framework */; }; 22 | E734FCD5193F25A200A0A386 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E734FCB5193F25A200A0A386 /* Foundation.framework */; }; 23 | E734FCD6193F25A200A0A386 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E734FCB9193F25A200A0A386 /* UIKit.framework */; }; 24 | E734FCD7193F25A200A0A386 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E734FCBB193F25A200A0A386 /* CoreData.framework */; }; 25 | E734FCDF193F25A200A0A386 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E734FCDD193F25A200A0A386 /* InfoPlist.strings */; }; 26 | E734FCE1193F25A200A0A386 /* BWTitlePagerViewExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E734FCE0193F25A200A0A386 /* BWTitlePagerViewExampleTests.m */; }; 27 | E734FCED193F25DD00A0A386 /* BWTitlePagerView.m in Sources */ = {isa = PBXBuildFile; fileRef = E734FCEC193F25DD00A0A386 /* BWTitlePagerView.m */; }; 28 | E734FCF0193F25EC00A0A386 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E734FCEF193F25EC00A0A386 /* ViewController.m */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | E734FCD8193F25A200A0A386 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = E734FCAA193F25A200A0A386 /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = E734FCB1193F25A200A0A386; 37 | remoteInfo = BWTitlePagerViewExample; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | E722085019476E8500E280BA /* tux.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tux.png; sourceTree = ""; }; 43 | E722085119476E8500E280BA /* tux@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tux@2x.png"; sourceTree = ""; }; 44 | E734FCB2193F25A200A0A386 /* BWTitlePagerViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BWTitlePagerViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | E734FCB5193F25A200A0A386 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 46 | E734FCB7193F25A200A0A386 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 47 | E734FCB9193F25A200A0A386 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 48 | E734FCBB193F25A200A0A386 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 49 | E734FCBF193F25A200A0A386 /* BWTitlePagerViewExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BWTitlePagerViewExample-Info.plist"; sourceTree = ""; }; 50 | E734FCC1193F25A200A0A386 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 51 | E734FCC3193F25A200A0A386 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | E734FCC5193F25A200A0A386 /* BWTitlePagerViewExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BWTitlePagerViewExample-Prefix.pch"; sourceTree = ""; }; 53 | E734FCC6193F25A200A0A386 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 54 | E734FCC7193F25A200A0A386 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 55 | E734FCCA193F25A200A0A386 /* BWTitlePagerViewExample.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = BWTitlePagerViewExample.xcdatamodel; sourceTree = ""; }; 56 | E734FCCC193F25A200A0A386 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 57 | E734FCD2193F25A200A0A386 /* BWTitlePagerViewExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BWTitlePagerViewExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | E734FCD3193F25A200A0A386 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 59 | E734FCDC193F25A200A0A386 /* BWTitlePagerViewExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BWTitlePagerViewExampleTests-Info.plist"; sourceTree = ""; }; 60 | E734FCDE193F25A200A0A386 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 61 | E734FCE0193F25A200A0A386 /* BWTitlePagerViewExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BWTitlePagerViewExampleTests.m; sourceTree = ""; }; 62 | E734FCEB193F25DD00A0A386 /* BWTitlePagerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BWTitlePagerView.h; sourceTree = ""; }; 63 | E734FCEC193F25DD00A0A386 /* BWTitlePagerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BWTitlePagerView.m; sourceTree = ""; }; 64 | E734FCEE193F25EC00A0A386 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 65 | E734FCEF193F25EC00A0A386 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | E734FCAF193F25A200A0A386 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | E734FCB8193F25A200A0A386 /* CoreGraphics.framework in Frameworks */, 74 | E734FCBC193F25A200A0A386 /* CoreData.framework in Frameworks */, 75 | E734FCBA193F25A200A0A386 /* UIKit.framework in Frameworks */, 76 | E734FCB6193F25A200A0A386 /* Foundation.framework in Frameworks */, 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | E734FCCF193F25A200A0A386 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | E734FCD4193F25A200A0A386 /* XCTest.framework in Frameworks */, 85 | E734FCD7193F25A200A0A386 /* CoreData.framework in Frameworks */, 86 | E734FCD6193F25A200A0A386 /* UIKit.framework in Frameworks */, 87 | E734FCD5193F25A200A0A386 /* Foundation.framework in Frameworks */, 88 | ); 89 | runOnlyForDeploymentPostprocessing = 0; 90 | }; 91 | /* End PBXFrameworksBuildPhase section */ 92 | 93 | /* Begin PBXGroup section */ 94 | E734FCA9193F25A200A0A386 = { 95 | isa = PBXGroup; 96 | children = ( 97 | E734FCEA193F25DD00A0A386 /* BWTitlePagerView */, 98 | E734FCBD193F25A200A0A386 /* BWTitlePagerViewExample */, 99 | E734FCDA193F25A200A0A386 /* BWTitlePagerViewExampleTests */, 100 | E734FCB4193F25A200A0A386 /* Frameworks */, 101 | E734FCB3193F25A200A0A386 /* Products */, 102 | ); 103 | sourceTree = ""; 104 | }; 105 | E734FCB3193F25A200A0A386 /* Products */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | E734FCB2193F25A200A0A386 /* BWTitlePagerViewExample.app */, 109 | E734FCD2193F25A200A0A386 /* BWTitlePagerViewExampleTests.xctest */, 110 | ); 111 | name = Products; 112 | sourceTree = ""; 113 | }; 114 | E734FCB4193F25A200A0A386 /* Frameworks */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | E734FCB5193F25A200A0A386 /* Foundation.framework */, 118 | E734FCB7193F25A200A0A386 /* CoreGraphics.framework */, 119 | E734FCB9193F25A200A0A386 /* UIKit.framework */, 120 | E734FCBB193F25A200A0A386 /* CoreData.framework */, 121 | E734FCD3193F25A200A0A386 /* XCTest.framework */, 122 | ); 123 | name = Frameworks; 124 | sourceTree = ""; 125 | }; 126 | E734FCBD193F25A200A0A386 /* BWTitlePagerViewExample */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | E722085019476E8500E280BA /* tux.png */, 130 | E722085119476E8500E280BA /* tux@2x.png */, 131 | E734FCC6193F25A200A0A386 /* AppDelegate.h */, 132 | E734FCC7193F25A200A0A386 /* AppDelegate.m */, 133 | E734FCCC193F25A200A0A386 /* Images.xcassets */, 134 | E734FCC9193F25A200A0A386 /* BWTitlePagerViewExample.xcdatamodeld */, 135 | E734FCBE193F25A200A0A386 /* Supporting Files */, 136 | E734FCEE193F25EC00A0A386 /* ViewController.h */, 137 | E734FCEF193F25EC00A0A386 /* ViewController.m */, 138 | ); 139 | path = BWTitlePagerViewExample; 140 | sourceTree = ""; 141 | }; 142 | E734FCBE193F25A200A0A386 /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | E734FCBF193F25A200A0A386 /* BWTitlePagerViewExample-Info.plist */, 146 | E734FCC0193F25A200A0A386 /* InfoPlist.strings */, 147 | E734FCC3193F25A200A0A386 /* main.m */, 148 | E734FCC5193F25A200A0A386 /* BWTitlePagerViewExample-Prefix.pch */, 149 | ); 150 | name = "Supporting Files"; 151 | sourceTree = ""; 152 | }; 153 | E734FCDA193F25A200A0A386 /* BWTitlePagerViewExampleTests */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | E734FCE0193F25A200A0A386 /* BWTitlePagerViewExampleTests.m */, 157 | E734FCDB193F25A200A0A386 /* Supporting Files */, 158 | ); 159 | path = BWTitlePagerViewExampleTests; 160 | sourceTree = ""; 161 | }; 162 | E734FCDB193F25A200A0A386 /* Supporting Files */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | E734FCDC193F25A200A0A386 /* BWTitlePagerViewExampleTests-Info.plist */, 166 | E734FCDD193F25A200A0A386 /* InfoPlist.strings */, 167 | ); 168 | name = "Supporting Files"; 169 | sourceTree = ""; 170 | }; 171 | E734FCEA193F25DD00A0A386 /* BWTitlePagerView */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | E734FCEB193F25DD00A0A386 /* BWTitlePagerView.h */, 175 | E734FCEC193F25DD00A0A386 /* BWTitlePagerView.m */, 176 | ); 177 | path = BWTitlePagerView; 178 | sourceTree = ""; 179 | }; 180 | /* End PBXGroup section */ 181 | 182 | /* Begin PBXNativeTarget section */ 183 | E734FCB1193F25A200A0A386 /* BWTitlePagerViewExample */ = { 184 | isa = PBXNativeTarget; 185 | buildConfigurationList = E734FCE4193F25A200A0A386 /* Build configuration list for PBXNativeTarget "BWTitlePagerViewExample" */; 186 | buildPhases = ( 187 | E734FCAE193F25A200A0A386 /* Sources */, 188 | E734FCAF193F25A200A0A386 /* Frameworks */, 189 | E734FCB0193F25A200A0A386 /* Resources */, 190 | ); 191 | buildRules = ( 192 | ); 193 | dependencies = ( 194 | ); 195 | name = BWTitlePagerViewExample; 196 | productName = BWTitlePagerViewExample; 197 | productReference = E734FCB2193F25A200A0A386 /* BWTitlePagerViewExample.app */; 198 | productType = "com.apple.product-type.application"; 199 | }; 200 | E734FCD1193F25A200A0A386 /* BWTitlePagerViewExampleTests */ = { 201 | isa = PBXNativeTarget; 202 | buildConfigurationList = E734FCE7193F25A200A0A386 /* Build configuration list for PBXNativeTarget "BWTitlePagerViewExampleTests" */; 203 | buildPhases = ( 204 | E734FCCE193F25A200A0A386 /* Sources */, 205 | E734FCCF193F25A200A0A386 /* Frameworks */, 206 | E734FCD0193F25A200A0A386 /* Resources */, 207 | ); 208 | buildRules = ( 209 | ); 210 | dependencies = ( 211 | E734FCD9193F25A200A0A386 /* PBXTargetDependency */, 212 | ); 213 | name = BWTitlePagerViewExampleTests; 214 | productName = BWTitlePagerViewExampleTests; 215 | productReference = E734FCD2193F25A200A0A386 /* BWTitlePagerViewExampleTests.xctest */; 216 | productType = "com.apple.product-type.bundle.unit-test"; 217 | }; 218 | /* End PBXNativeTarget section */ 219 | 220 | /* Begin PBXProject section */ 221 | E734FCAA193F25A200A0A386 /* Project object */ = { 222 | isa = PBXProject; 223 | attributes = { 224 | LastUpgradeCheck = 0510; 225 | ORGANIZATIONNAME = brunow; 226 | TargetAttributes = { 227 | E734FCD1193F25A200A0A386 = { 228 | TestTargetID = E734FCB1193F25A200A0A386; 229 | }; 230 | }; 231 | }; 232 | buildConfigurationList = E734FCAD193F25A200A0A386 /* Build configuration list for PBXProject "BWTitlePagerViewExample" */; 233 | compatibilityVersion = "Xcode 3.2"; 234 | developmentRegion = English; 235 | hasScannedForEncodings = 0; 236 | knownRegions = ( 237 | en, 238 | ); 239 | mainGroup = E734FCA9193F25A200A0A386; 240 | productRefGroup = E734FCB3193F25A200A0A386 /* Products */; 241 | projectDirPath = ""; 242 | projectRoot = ""; 243 | targets = ( 244 | E734FCB1193F25A200A0A386 /* BWTitlePagerViewExample */, 245 | E734FCD1193F25A200A0A386 /* BWTitlePagerViewExampleTests */, 246 | ); 247 | }; 248 | /* End PBXProject section */ 249 | 250 | /* Begin PBXResourcesBuildPhase section */ 251 | E734FCB0193F25A200A0A386 /* Resources */ = { 252 | isa = PBXResourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | E722085319476E8500E280BA /* tux@2x.png in Resources */, 256 | E722085219476E8500E280BA /* tux.png in Resources */, 257 | E734FCC2193F25A200A0A386 /* InfoPlist.strings in Resources */, 258 | E734FCCD193F25A200A0A386 /* Images.xcassets in Resources */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | E734FCD0193F25A200A0A386 /* Resources */ = { 263 | isa = PBXResourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | E734FCDF193F25A200A0A386 /* InfoPlist.strings in Resources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXResourcesBuildPhase section */ 271 | 272 | /* Begin PBXSourcesBuildPhase section */ 273 | E734FCAE193F25A200A0A386 /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | E734FCED193F25DD00A0A386 /* BWTitlePagerView.m in Sources */, 278 | E734FCC8193F25A200A0A386 /* AppDelegate.m in Sources */, 279 | E734FCC4193F25A200A0A386 /* main.m in Sources */, 280 | E734FCCB193F25A200A0A386 /* BWTitlePagerViewExample.xcdatamodeld in Sources */, 281 | E734FCF0193F25EC00A0A386 /* ViewController.m in Sources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | E734FCCE193F25A200A0A386 /* Sources */ = { 286 | isa = PBXSourcesBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | E734FCE1193F25A200A0A386 /* BWTitlePagerViewExampleTests.m in Sources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | /* End PBXSourcesBuildPhase section */ 294 | 295 | /* Begin PBXTargetDependency section */ 296 | E734FCD9193F25A200A0A386 /* PBXTargetDependency */ = { 297 | isa = PBXTargetDependency; 298 | target = E734FCB1193F25A200A0A386 /* BWTitlePagerViewExample */; 299 | targetProxy = E734FCD8193F25A200A0A386 /* PBXContainerItemProxy */; 300 | }; 301 | /* End PBXTargetDependency section */ 302 | 303 | /* Begin PBXVariantGroup section */ 304 | E734FCC0193F25A200A0A386 /* InfoPlist.strings */ = { 305 | isa = PBXVariantGroup; 306 | children = ( 307 | E734FCC1193F25A200A0A386 /* en */, 308 | ); 309 | name = InfoPlist.strings; 310 | sourceTree = ""; 311 | }; 312 | E734FCDD193F25A200A0A386 /* InfoPlist.strings */ = { 313 | isa = PBXVariantGroup; 314 | children = ( 315 | E734FCDE193F25A200A0A386 /* en */, 316 | ); 317 | name = InfoPlist.strings; 318 | sourceTree = ""; 319 | }; 320 | /* End PBXVariantGroup section */ 321 | 322 | /* Begin XCBuildConfiguration section */ 323 | E734FCE2193F25A200A0A386 /* Debug */ = { 324 | isa = XCBuildConfiguration; 325 | buildSettings = { 326 | ALWAYS_SEARCH_USER_PATHS = NO; 327 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 328 | CLANG_CXX_LIBRARY = "libc++"; 329 | CLANG_ENABLE_MODULES = YES; 330 | CLANG_ENABLE_OBJC_ARC = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_CONSTANT_CONVERSION = YES; 333 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 334 | CLANG_WARN_EMPTY_BODY = YES; 335 | CLANG_WARN_ENUM_CONVERSION = YES; 336 | CLANG_WARN_INT_CONVERSION = YES; 337 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 339 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 340 | COPY_PHASE_STRIP = NO; 341 | GCC_C_LANGUAGE_STANDARD = gnu99; 342 | GCC_DYNAMIC_NO_PIC = NO; 343 | GCC_OPTIMIZATION_LEVEL = 0; 344 | GCC_PREPROCESSOR_DEFINITIONS = ( 345 | "DEBUG=1", 346 | "$(inherited)", 347 | ); 348 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 349 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 350 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 351 | GCC_WARN_UNDECLARED_SELECTOR = YES; 352 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 353 | GCC_WARN_UNUSED_FUNCTION = YES; 354 | GCC_WARN_UNUSED_VARIABLE = YES; 355 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 356 | ONLY_ACTIVE_ARCH = YES; 357 | SDKROOT = iphoneos; 358 | TARGETED_DEVICE_FAMILY = "1,2"; 359 | }; 360 | name = Debug; 361 | }; 362 | E734FCE3193F25A200A0A386 /* Release */ = { 363 | isa = XCBuildConfiguration; 364 | buildSettings = { 365 | ALWAYS_SEARCH_USER_PATHS = NO; 366 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 367 | CLANG_CXX_LIBRARY = "libc++"; 368 | CLANG_ENABLE_MODULES = YES; 369 | CLANG_ENABLE_OBJC_ARC = YES; 370 | CLANG_WARN_BOOL_CONVERSION = YES; 371 | CLANG_WARN_CONSTANT_CONVERSION = YES; 372 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 373 | CLANG_WARN_EMPTY_BODY = YES; 374 | CLANG_WARN_ENUM_CONVERSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 377 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 378 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 379 | COPY_PHASE_STRIP = YES; 380 | ENABLE_NS_ASSERTIONS = NO; 381 | GCC_C_LANGUAGE_STANDARD = gnu99; 382 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 383 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 384 | GCC_WARN_UNDECLARED_SELECTOR = YES; 385 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 386 | GCC_WARN_UNUSED_FUNCTION = YES; 387 | GCC_WARN_UNUSED_VARIABLE = YES; 388 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 389 | SDKROOT = iphoneos; 390 | TARGETED_DEVICE_FAMILY = "1,2"; 391 | VALIDATE_PRODUCT = YES; 392 | }; 393 | name = Release; 394 | }; 395 | E734FCE5193F25A200A0A386 /* Debug */ = { 396 | isa = XCBuildConfiguration; 397 | buildSettings = { 398 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 399 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 400 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 401 | GCC_PREFIX_HEADER = "BWTitlePagerViewExample/BWTitlePagerViewExample-Prefix.pch"; 402 | INFOPLIST_FILE = "BWTitlePagerViewExample/BWTitlePagerViewExample-Info.plist"; 403 | PRODUCT_NAME = "$(TARGET_NAME)"; 404 | WRAPPER_EXTENSION = app; 405 | }; 406 | name = Debug; 407 | }; 408 | E734FCE6193F25A200A0A386 /* Release */ = { 409 | isa = XCBuildConfiguration; 410 | buildSettings = { 411 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 412 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 413 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 414 | GCC_PREFIX_HEADER = "BWTitlePagerViewExample/BWTitlePagerViewExample-Prefix.pch"; 415 | INFOPLIST_FILE = "BWTitlePagerViewExample/BWTitlePagerViewExample-Info.plist"; 416 | PRODUCT_NAME = "$(TARGET_NAME)"; 417 | WRAPPER_EXTENSION = app; 418 | }; 419 | name = Release; 420 | }; 421 | E734FCE8193F25A200A0A386 /* Debug */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/BWTitlePagerViewExample.app/BWTitlePagerViewExample"; 425 | FRAMEWORK_SEARCH_PATHS = ( 426 | "$(SDKROOT)/Developer/Library/Frameworks", 427 | "$(inherited)", 428 | "$(DEVELOPER_FRAMEWORKS_DIR)", 429 | ); 430 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 431 | GCC_PREFIX_HEADER = "BWTitlePagerViewExample/BWTitlePagerViewExample-Prefix.pch"; 432 | GCC_PREPROCESSOR_DEFINITIONS = ( 433 | "DEBUG=1", 434 | "$(inherited)", 435 | ); 436 | INFOPLIST_FILE = "BWTitlePagerViewExampleTests/BWTitlePagerViewExampleTests-Info.plist"; 437 | PRODUCT_NAME = "$(TARGET_NAME)"; 438 | TEST_HOST = "$(BUNDLE_LOADER)"; 439 | WRAPPER_EXTENSION = xctest; 440 | }; 441 | name = Debug; 442 | }; 443 | E734FCE9193F25A200A0A386 /* Release */ = { 444 | isa = XCBuildConfiguration; 445 | buildSettings = { 446 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/BWTitlePagerViewExample.app/BWTitlePagerViewExample"; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(SDKROOT)/Developer/Library/Frameworks", 449 | "$(inherited)", 450 | "$(DEVELOPER_FRAMEWORKS_DIR)", 451 | ); 452 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 453 | GCC_PREFIX_HEADER = "BWTitlePagerViewExample/BWTitlePagerViewExample-Prefix.pch"; 454 | INFOPLIST_FILE = "BWTitlePagerViewExampleTests/BWTitlePagerViewExampleTests-Info.plist"; 455 | PRODUCT_NAME = "$(TARGET_NAME)"; 456 | TEST_HOST = "$(BUNDLE_LOADER)"; 457 | WRAPPER_EXTENSION = xctest; 458 | }; 459 | name = Release; 460 | }; 461 | /* End XCBuildConfiguration section */ 462 | 463 | /* Begin XCConfigurationList section */ 464 | E734FCAD193F25A200A0A386 /* Build configuration list for PBXProject "BWTitlePagerViewExample" */ = { 465 | isa = XCConfigurationList; 466 | buildConfigurations = ( 467 | E734FCE2193F25A200A0A386 /* Debug */, 468 | E734FCE3193F25A200A0A386 /* Release */, 469 | ); 470 | defaultConfigurationIsVisible = 0; 471 | defaultConfigurationName = Release; 472 | }; 473 | E734FCE4193F25A200A0A386 /* Build configuration list for PBXNativeTarget "BWTitlePagerViewExample" */ = { 474 | isa = XCConfigurationList; 475 | buildConfigurations = ( 476 | E734FCE5193F25A200A0A386 /* Debug */, 477 | E734FCE6193F25A200A0A386 /* Release */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | E734FCE7193F25A200A0A386 /* Build configuration list for PBXNativeTarget "BWTitlePagerViewExampleTests" */ = { 483 | isa = XCConfigurationList; 484 | buildConfigurations = ( 485 | E734FCE8193F25A200A0A386 /* Debug */, 486 | E734FCE9193F25A200A0A386 /* Release */, 487 | ); 488 | defaultConfigurationIsVisible = 0; 489 | defaultConfigurationName = Release; 490 | }; 491 | /* End XCConfigurationList section */ 492 | 493 | /* Begin XCVersionGroup section */ 494 | E734FCC9193F25A200A0A386 /* BWTitlePagerViewExample.xcdatamodeld */ = { 495 | isa = XCVersionGroup; 496 | children = ( 497 | E734FCCA193F25A200A0A386 /* BWTitlePagerViewExample.xcdatamodel */, 498 | ); 499 | currentVersion = E734FCCA193F25A200A0A386 /* BWTitlePagerViewExample.xcdatamodel */; 500 | path = BWTitlePagerViewExample.xcdatamodeld; 501 | sourceTree = ""; 502 | versionGroupType = wrapper.xcdatamodel; 503 | }; 504 | /* End XCVersionGroup section */ 505 | }; 506 | rootObject = E734FCAA193F25A200A0A386 /* Project object */; 507 | } 508 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample.xcodeproj/project.xcworkspace/xcshareddata/BWTitlePagerViewExample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 140F160E-E4C5-46AE-A8B2-073012FC4296 9 | IDESourceControlProjectName 10 | BWTitlePagerViewExample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | E2EFFA6A-5145-4D53-8463-9FF1FCEA24A8 14 | ssh://github.com/brunow/BWTitlePagerView.git 15 | 16 | IDESourceControlProjectPath 17 | BWTitlePagerViewExample.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | E2EFFA6A-5145-4D53-8463-9FF1FCEA24A8 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/brunow/BWTitlePagerView.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | E2EFFA6A-5145-4D53-8463-9FF1FCEA24A8 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | E2EFFA6A-5145-4D53-8463-9FF1FCEA24A8 36 | IDESourceControlWCCName 37 | BWTitlePagerView 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample.xcodeproj/project.xcworkspace/xcuserdata/cesar4.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunow/BWTitlePagerView/a2b98ff3552dc783518560b65e007841bef94b5a/BWTitlePagerViewExample.xcodeproj/project.xcworkspace/xcuserdata/cesar4.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /BWTitlePagerViewExample.xcodeproj/project.xcworkspace/xcuserdata/cesar4.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample.xcodeproj/xcuserdata/cesar4.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample.xcodeproj/xcuserdata/cesar4.xcuserdatad/xcschemes/BWTitlePagerViewExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample.xcodeproj/xcuserdata/cesar4.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BWTitlePagerViewExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | E734FCB1193F25A200A0A386 16 | 17 | primary 18 | 19 | 20 | E734FCD1193F25A200A0A386 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BWTitlePagerViewExample 4 | // 5 | // Created by cesar4 on 4/06/14. 6 | // Copyright (c) 2014 brunow. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; 16 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; 17 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; 18 | 19 | - (void)saveContext; 20 | - (NSURL *)applicationDocumentsDirectory; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BWTitlePagerViewExample 4 | // 5 | // Created by cesar4 on 4/06/14. 6 | // Copyright (c) 2014 brunow. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "ViewController.h" 12 | 13 | @implementation AppDelegate 14 | 15 | @synthesize managedObjectContext = _managedObjectContext; 16 | @synthesize managedObjectModel = _managedObjectModel; 17 | @synthesize persistentStoreCoordinator = _persistentStoreCoordinator; 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 20 | { 21 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 22 | // Override point for customization after application launch. 23 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]]; 24 | self.window.backgroundColor = [UIColor whiteColor]; 25 | [self.window makeKeyAndVisible]; 26 | return YES; 27 | } 28 | 29 | - (void)applicationWillResignActive:(UIApplication *)application 30 | { 31 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 32 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 33 | } 34 | 35 | - (void)applicationDidEnterBackground:(UIApplication *)application 36 | { 37 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 39 | } 40 | 41 | - (void)applicationWillEnterForeground:(UIApplication *)application 42 | { 43 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 44 | } 45 | 46 | - (void)applicationDidBecomeActive:(UIApplication *)application 47 | { 48 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 49 | } 50 | 51 | - (void)applicationWillTerminate:(UIApplication *)application 52 | { 53 | // Saves changes in the application's managed object context before the application terminates. 54 | [self saveContext]; 55 | } 56 | 57 | - (void)saveContext 58 | { 59 | NSError *error = nil; 60 | NSManagedObjectContext *managedObjectContext = self.managedObjectContext; 61 | if (managedObjectContext != nil) { 62 | if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { 63 | // Replace this implementation with code to handle the error appropriately. 64 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 65 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 66 | abort(); 67 | } 68 | } 69 | } 70 | 71 | #pragma mark - Core Data stack 72 | 73 | // Returns the managed object context for the application. 74 | // If the context doesn't already exist, it is created and bound to the persistent store coordinator for the application. 75 | - (NSManagedObjectContext *)managedObjectContext 76 | { 77 | if (_managedObjectContext != nil) { 78 | return _managedObjectContext; 79 | } 80 | 81 | NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; 82 | if (coordinator != nil) { 83 | _managedObjectContext = [[NSManagedObjectContext alloc] init]; 84 | [_managedObjectContext setPersistentStoreCoordinator:coordinator]; 85 | } 86 | return _managedObjectContext; 87 | } 88 | 89 | // Returns the managed object model for the application. 90 | // If the model doesn't already exist, it is created from the application's model. 91 | - (NSManagedObjectModel *)managedObjectModel 92 | { 93 | if (_managedObjectModel != nil) { 94 | return _managedObjectModel; 95 | } 96 | NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"BWTitlePagerViewExample" withExtension:@"momd"]; 97 | _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; 98 | return _managedObjectModel; 99 | } 100 | 101 | // Returns the persistent store coordinator for the application. 102 | // If the coordinator doesn't already exist, it is created and the application's store added to it. 103 | - (NSPersistentStoreCoordinator *)persistentStoreCoordinator 104 | { 105 | if (_persistentStoreCoordinator != nil) { 106 | return _persistentStoreCoordinator; 107 | } 108 | 109 | NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"BWTitlePagerViewExample.sqlite"]; 110 | 111 | NSError *error = nil; 112 | _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; 113 | if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { 114 | /* 115 | Replace this implementation with code to handle the error appropriately. 116 | 117 | abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 118 | 119 | Typical reasons for an error here include: 120 | * The persistent store is not accessible; 121 | * The schema for the persistent store is incompatible with current managed object model. 122 | Check the error message to determine what the actual problem was. 123 | 124 | 125 | If the persistent store is not accessible, there is typically something wrong with the file path. Often, a file URL is pointing into the application's resources directory instead of a writeable directory. 126 | 127 | If you encounter schema incompatibility errors during development, you can reduce their frequency by: 128 | * Simply deleting the existing store: 129 | [[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil] 130 | 131 | * Performing automatic lightweight migration by passing the following dictionary as the options parameter: 132 | @{NSMigratePersistentStoresAutomaticallyOption:@YES, NSInferMappingModelAutomaticallyOption:@YES} 133 | 134 | Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details. 135 | 136 | */ 137 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 138 | abort(); 139 | } 140 | 141 | return _persistentStoreCoordinator; 142 | } 143 | 144 | #pragma mark - Application's Documents directory 145 | 146 | // Returns the URL to the application's Documents directory. 147 | - (NSURL *)applicationDocumentsDirectory 148 | { 149 | return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; 150 | } 151 | 152 | @end 153 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/BWTitlePagerViewExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | brunow.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/BWTitlePagerViewExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #import 17 | #endif 18 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/BWTitlePagerViewExample.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | BWTitlePagerViewExample.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/BWTitlePagerViewExample.xcdatamodeld/BWTitlePagerViewExample.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /BWTitlePagerViewExample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /BWTitlePagerViewExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // BWTitlePagerViewExample 4 | // 5 | // Created by cesar4 on 4/06/14. 6 | // Copyright 2014 brunow. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // BWTitlePagerViewExample 4 | // 5 | // Created by cesar4 on 4/06/14. 6 | // Copyright 2014 brunow. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | #import "BWTitlePagerView.h" 12 | 13 | //////////////////////////////////////////////////////////////////////////////////////////////////// 14 | //////////////////////////////////////////////////////////////////////////////////////////////////// 15 | //////////////////////////////////////////////////////////////////////////////////////////////////// 16 | @interface ViewController () 17 | 18 | @property (nonatomic, strong) UIScrollView *scrollView; 19 | 20 | @end 21 | 22 | 23 | //////////////////////////////////////////////////////////////////////////////////////////////////// 24 | //////////////////////////////////////////////////////////////////////////////////////////////////// 25 | //////////////////////////////////////////////////////////////////////////////////////////////////// 26 | @implementation ViewController 27 | 28 | //////////////////////////////////////////////////////////////////////////////////////////////////// 29 | - (id)init { 30 | self = [super init]; 31 | if (self) { 32 | self.title = nil; 33 | } 34 | return self; 35 | } 36 | 37 | //////////////////////////////////////////////////////////////////////////////////////////////////// 38 | - (void)loadView { 39 | self.scrollView = [[UIScrollView alloc] init]; 40 | self.scrollView.pagingEnabled = YES; 41 | self.view = self.scrollView; 42 | } 43 | 44 | //////////////////////////////////////////////////////////////////////////////////////////////////// 45 | - (void)viewDidLoad { 46 | [super viewDidLoad]; 47 | 48 | BWTitlePagerView *pagingTitleView = [[BWTitlePagerView alloc] init]; 49 | pagingTitleView.frame = CGRectMake(0, 0, 150, 40); 50 | pagingTitleView.font = [UIFont systemFontOfSize:18]; 51 | pagingTitleView.currentTintColor = [UIColor redColor]; 52 | [pagingTitleView observeScrollView:self.scrollView]; 53 | // [pagingTitleView addObjects:@[ [UIImage imageNamed:@"tux"], [UIImage imageNamed:@"tux"] ]]; 54 | [pagingTitleView addObjects:@[ @"messages", @"friends" ]]; 55 | 56 | self.navigationItem.titleView = pagingTitleView; 57 | } 58 | 59 | //////////////////////////////////////////////////////////////////////////////////////////////////// 60 | - (void)viewDidAppear:(BOOL)animated { 61 | [super viewDidAppear:animated]; 62 | 63 | [self.scrollView showsHorizontalScrollIndicator]; 64 | } 65 | 66 | //////////////////////////////////////////////////////////////////////////////////////////////////// 67 | - (void)viewDidLayoutSubviews { 68 | [super viewDidLayoutSubviews]; 69 | 70 | self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width*2, self.view.frame.size.height-64); 71 | } 72 | 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BWTitlePagerViewExample 4 | // 5 | // Created by cesar4 on 4/06/14. 6 | // Copyright (c) 2014 brunow. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BWTitlePagerViewExample/tux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunow/BWTitlePagerView/a2b98ff3552dc783518560b65e007841bef94b5a/BWTitlePagerViewExample/tux.png -------------------------------------------------------------------------------- /BWTitlePagerViewExample/tux@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunow/BWTitlePagerView/a2b98ff3552dc783518560b65e007841bef94b5a/BWTitlePagerViewExample/tux@2x.png -------------------------------------------------------------------------------- /BWTitlePagerViewExampleTests/BWTitlePagerViewExampleTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | brunow.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /BWTitlePagerViewExampleTests/BWTitlePagerViewExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BWTitlePagerViewExampleTests.m 3 | // BWTitlePagerViewExampleTests 4 | // 5 | // Created by cesar4 on 4/06/14. 6 | // Copyright (c) 2014 brunow. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BWTitlePagerViewExampleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation BWTitlePagerViewExampleTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /BWTitlePagerViewExampleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## BWTitlePagerView 2 | 3 | Recreate the Twitter navigation controller pager. 4 | 5 | ![BWTitlePagerView](https://github.com/brunow/BWTitlePagerView/raw/master/shot.png) 6 | 7 | ## Using it 8 | 9 | ```objective-c 10 | BWTitlePagerView *pagingTitleView = [[BWTitlePagerView alloc] init]; 11 | pagingTitleView.frame = CGRectMake(0, 0, 150, 40); 12 | pagingTitleView.font = [UIFont systemFontOfSize:18]; 13 | pagingTitleView.currentTintColor = [UIColor redColor]; 14 | [pagingTitleView observeScrollView:self.scrollView]; 15 | 16 | [pagingTitleView addObjects:@[ [UIImage imageNamed:@"tux"], [UIImage imageNamed:@"tux"] ]]; 17 | 18 | Or 19 | 20 | [pagingTitleView addObjects:@[ @"messages", @"friends" ]]; 21 | 22 | self.navigationItem.titleView = pagingTitleView; 23 | ``` 24 | 25 | 26 | ## Contact 27 | 28 | Bruno Wernimont 29 | 30 | - Twitter - [@brunowernimont](http://twitter.com/brunowernimont) 31 | 32 | -------------------------------------------------------------------------------- /shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunow/BWTitlePagerView/a2b98ff3552dc783518560b65e007841bef94b5a/shot.png --------------------------------------------------------------------------------