├── Screenshots
├── ZMScrollableNavigationBarScreenshot_0.png
└── ZMScrollableNavigationBarScreenshot_1.png
├── Test Project
├── Images.xcassets
│ ├── WheresWallyAtWembley_6.imageset
│ │ ├── WheresWallyAtWembley_6.jpg
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController.h
├── PushedViewController.h
├── PresentedViewController.h
├── AppDelegate.h
├── main.m
├── PresentedViewController.m
├── ViewController.m
├── PushedViewController.m
├── Info.plist
├── AppDelegate.m
└── Base.lproj
│ ├── LaunchScreen.xib
│ └── Main.storyboard
├── ZMScrollableNavigationBar.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── ZMScrollableNavigationBar
├── UINavigationController+ZMScrollable.h
└── UINavigationController+ZMScrollable.m
├── .gitignore
├── ZMScrollableNavigationBar.podspec
├── LICENSE
└── README.md
/Screenshots/ZMScrollableNavigationBarScreenshot_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dailymotion/ZMScrollableNavigationBar/HEAD/Screenshots/ZMScrollableNavigationBarScreenshot_0.png
--------------------------------------------------------------------------------
/Screenshots/ZMScrollableNavigationBarScreenshot_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dailymotion/ZMScrollableNavigationBar/HEAD/Screenshots/ZMScrollableNavigationBarScreenshot_1.png
--------------------------------------------------------------------------------
/Test Project/Images.xcassets/WheresWallyAtWembley_6.imageset/WheresWallyAtWembley_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dailymotion/ZMScrollableNavigationBar/HEAD/Test Project/Images.xcassets/WheresWallyAtWembley_6.imageset/WheresWallyAtWembley_6.jpg
--------------------------------------------------------------------------------
/ZMScrollableNavigationBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Test Project/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Test Project/PushedViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // PushedViewController.h
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PushedViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Test Project/PresentedViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // PresentedViewController.h
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PresentedViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Test Project/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Test Project/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Test Project/Images.xcassets/WheresWallyAtWembley_6.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "WheresWallyAtWembley_6.jpg"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Test Project/PresentedViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // PresentedViewController.m
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import "PresentedViewController.h"
10 | #import "UINavigationController+ZMScrollable.h"
11 |
12 | @interface PresentedViewController ()
13 |
14 | @end
15 |
16 | @implementation PresentedViewController
17 |
18 | - (IBAction)close:(id)sender {
19 | [self dismissViewControllerAnimated:YES completion:nil];
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/ZMScrollableNavigationBar/UINavigationController+ZMScrollable.h:
--------------------------------------------------------------------------------
1 | //
2 | // UINavigationController+ZMScrollable.h
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/23/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UINavigationController (ZMScrollable)
12 |
13 | @property(nonatomic, assign) CGFloat topOffset;
14 |
15 | // Resets the top offset to its original value (needed when moving from a controller using this category
16 | // to another that is not)
17 | - (void)resetTopOffset;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | # Pods/
27 |
--------------------------------------------------------------------------------
/ZMScrollableNavigationBar.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 |
3 | s.name = "ZMScrollableNavigationBar"
4 | s.version = "1.0.3"
5 | s.summary = "A UINavigationController category that allows the UINavigationBar to scroll with the content (iOS 8 only)."
6 |
7 | s.homepage = "https://github.com/Zedenem/ZMScrollableNavigationBar"
8 |
9 | s.license = { :type => 'MIT', :file => 'LICENSE' }
10 |
11 | s.author = { "Zouhair Mahieddine" => "zouhair.mahieddine@gmail.com" }
12 |
13 | s.platform = :ios, '7.0'
14 |
15 | s.source = { :git => "https://github.com/Zedenem/ZMScrollableNavigationBar.git", :tag => "1.0.3" }
16 |
17 | s.source_files = 'ZMScrollableNavigationBar/*.{h,m}'
18 |
19 | s.requires_arc = true
20 |
21 | end
22 |
--------------------------------------------------------------------------------
/Test Project/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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Zouhair Mahieddine
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/Test Project/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "UINavigationController+ZMScrollable.h"
11 |
12 | @interface ViewController ()
13 |
14 | @property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
15 |
16 | @end
17 |
18 | @implementation ViewController
19 |
20 | - (void)viewWillAppear:(BOOL)animated {
21 | [super viewWillAppear:animated];
22 | // Comment the two methods below and uncomment this line to test the resetting of the offset
23 | // [self.navigationController resetTopOffset];
24 | }
25 |
26 | - (void)viewDidLayoutSubviews {
27 | [super viewDidLayoutSubviews];
28 | NSLog(@"ViewController viewDidLayoutSubviews %f", -self.scrollView.contentOffset.y);
29 | self.navigationController.topOffset = -self.scrollView.contentOffset.y;
30 | }
31 |
32 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
33 | NSLog(@"ViewController scrollViewDidScroll %f", -self.scrollView.contentOffset.y);
34 | self.navigationController.topOffset = -scrollView.contentOffset.y;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/Test Project/PushedViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // PushedViewController.m
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import "PushedViewController.h"
10 | #import "UINavigationController+ZMScrollable.h"
11 |
12 | @interface PushedViewController ()
13 |
14 | @property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
15 |
16 | @end
17 |
18 | @implementation PushedViewController
19 |
20 | - (void)viewWillAppear:(BOOL)animated {
21 | [super viewWillAppear:animated];
22 | self.scrollView.delegate = self;
23 | }
24 |
25 | - (void)viewWillDisappear:(BOOL)animated {
26 | [super viewWillDisappear:animated];
27 | self.scrollView.delegate = nil;
28 | }
29 |
30 | - (void)viewDidLayoutSubviews {
31 | [super viewDidLayoutSubviews];
32 | NSLog(@"ViewController viewDidLayoutSubviews %f", -self.scrollView.contentOffset.y);
33 | self.navigationController.topOffset = -self.scrollView.contentOffset.y;
34 | }
35 |
36 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
37 | NSLog(@"ViewController scrollViewDidScroll %f", -self.scrollView.contentOffset.y);
38 | self.navigationController.topOffset = -scrollView.contentOffset.y;
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Test Project/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.zedenem.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0.3
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 10010
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](http://cocoapods.org/pods/ZMScrollableNavigationBar)
2 | [](http://cocoapods.org/pods/ZMScrollableNavigationBar)
3 | [](http://cocoapods.org/pods/ZMScrollableNavigationBar)
4 |
5 | # ZMScrollableNavigationBar
6 | A UINavigationController subclass that allows the UINavigationBar to scroll with the content (iOS 8 only)
7 |
8 | Click on the image to see a video preview:
9 |
10 | 
11 |
12 | ## Installation
13 |
14 | ###With CocoaPods
15 |
16 | Just add `pod 'ZMScrollableNavigationBar', '~> 1.0.1'` to your Podfile and run
17 |
18 | ```
19 | $> pod install
20 | ```
21 |
22 | ###Without CocoaPods
23 |
24 | Just drag'n'drop `UINavigationController+ZMScrollable.h` and `UINavigationController+ZMScrollable.m` into your XCode project.
25 |
26 | ## Usage
27 |
28 | Using a `UIScrollView` in your `UIViewController`, you can simply hook up the scroll to the `UINavigationBar` animation. Here are the two methods you need to implement:
29 |
30 | ```
31 | - (void)viewDidLayoutSubviews {
32 | [super viewDidLayoutSubviews];
33 | self.navigationController.topOffset = -self.scrollView.contentOffset.y;
34 | }
35 |
36 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
37 | self.navigationController.topOffset = -scrollView.contentOffset.y;
38 | }
39 | ```
40 |
41 | ZMScrollableNavigationBar also provides a method to reset the navigation bar's offset (for example when another view is pushed). Just call:
42 |
43 | ```
44 | [self.navigationController resetTopOffset];
45 | ```
46 |
47 | ## TODO
48 |
49 | - Handle Rotation
50 | - Show `UINavigationBar` again when user quickly swipes up
--------------------------------------------------------------------------------
/Test Project/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/24/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // 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.
25 | // 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.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // 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.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // 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.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // 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.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/ZMScrollableNavigationBar/UINavigationController+ZMScrollable.m:
--------------------------------------------------------------------------------
1 | //
2 | // UINavigationController+ZMScrollable.m
3 | // ZMScrollableNavigationBar
4 | //
5 | // Created by Zouhair Mahieddine on 3/23/15.
6 | // Copyright (c) 2015 Zedenem. All rights reserved.
7 | //
8 |
9 | #import "UINavigationController+ZMScrollable.h"
10 |
11 | static const CGFloat maxTopOffset = 0.0;
12 |
13 | @implementation UINavigationController (ZMScrollable)
14 |
15 | - (CGFloat)minTopOffset {
16 | return - CGRectGetHeight(self.navigationBar.frame);
17 | }
18 |
19 | - (void)setTopOffset:(CGFloat)newTopOffset {
20 | if (self.navigationBarHidden) {
21 | // Nothing to do if the UINavigationBar is hidden
22 | return;
23 | }
24 | if (([[[UIDevice currentDevice] systemVersion] compare:@"8.0.0" options:NSNumericSearch] == NSOrderedAscending)) {
25 | // iOS < 8.0.0 not supported at the time
26 | return;
27 | }
28 |
29 | CGFloat topOffset = newTopOffset;
30 |
31 | // Adjust to the presence of a UIStatusBar
32 | if (![UIApplication sharedApplication].statusBarHidden) {
33 | topOffset -= CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);
34 | }
35 |
36 | // Adjust so that the view doesn't scroll below the UINavigationBar before it starts hiding
37 | topOffset -= CGRectGetHeight(self.navigationBar.frame);
38 |
39 | topOffset = MIN(MAX(topOffset, [self minTopOffset]), maxTopOffset);
40 |
41 |
42 | // Create a Blur View and apply it on top of the UINavigationBar
43 | UIView *blurView = [self.view viewWithTag:101010];
44 |
45 | if (topOffset != self.topOffset) {
46 | CGRect frame = self.view.frame;
47 | frame.origin.y = topOffset;
48 | frame.size.height = CGRectGetHeight(self.view.superview.frame) - topOffset;
49 | self.view.frame = frame;
50 |
51 | if (!blurView) {
52 | if (self.navigationBar.barTintColor) {
53 | blurView = [[UIView alloc] initWithFrame:CGRectZero];
54 | blurView.backgroundColor = self.navigationBar.barTintColor;
55 | blurView.tag = 101010;
56 | [self.view addSubview:blurView];
57 | } else {
58 | UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
59 | UIVisualEffectView *visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
60 | visualEffectView.tag = 101010;
61 | [self.view addSubview:visualEffectView];
62 | blurView = visualEffectView;
63 | }
64 | }
65 |
66 | CGRect viewFrame = self.navigationBar.frame;
67 | if (![UIApplication sharedApplication].statusBarHidden) {
68 | viewFrame.origin.y -= CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);
69 | viewFrame.size.height += CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);
70 | }
71 | blurView.frame = viewFrame;
72 | }
73 |
74 | // Always reset the blurView's alpha to avoid edge cases when the scroll is updated while the blurView is not shown
75 | blurView.alpha = fabs(topOffset/self.minTopOffset);
76 | }
77 |
78 | - (CGFloat)topOffset {
79 | return CGRectGetMinY(self.view.frame);
80 | }
81 |
82 | - (void)resetTopOffset {
83 | CGFloat defaultTopOffset = CGRectGetHeight(self.navigationBar.frame);
84 |
85 | // Adjust to the presence of a UIStatusBar
86 | if (![UIApplication sharedApplication].statusBarHidden) {
87 | defaultTopOffset += CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);
88 | }
89 |
90 | self.topOffset = defaultTopOffset;
91 | }
92 |
93 | @end
94 |
--------------------------------------------------------------------------------
/Test Project/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ZMScrollableNavigationBar.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 87432AD61AC1F5D500E918A4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 87432AC61AC1F5D500E918A4 /* AppDelegate.m */; };
11 | 87432AD81AC1F5D500E918A4 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 87432AC81AC1F5D500E918A4 /* LaunchScreen.xib */; };
12 | 87432AD91AC1F5D500E918A4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 87432ACA1AC1F5D500E918A4 /* Main.storyboard */; };
13 | 87432ADA1AC1F5D500E918A4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 87432ACC1AC1F5D500E918A4 /* Images.xcassets */; };
14 | 87432ADC1AC1F5D500E918A4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 87432ACF1AC1F5D500E918A4 /* ViewController.m */; };
15 | 87432ADE1AC1F5D500E918A4 /* UINavigationController+ZMScrollable.m in Sources */ = {isa = PBXBuildFile; fileRef = 87432AD31AC1F5D500E918A4 /* UINavigationController+ZMScrollable.m */; };
16 | 87432AE11AC1F63800E918A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 87432AE01AC1F63800E918A4 /* main.m */; };
17 | 87BA5F031AC21BFF0007AE75 /* PresentedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 87BA5F021AC21BFF0007AE75 /* PresentedViewController.m */; };
18 | 87BA5F061AC21F030007AE75 /* PushedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 87BA5F051AC21F030007AE75 /* PushedViewController.m */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXFileReference section */
22 | 87432A9B1AC1F58900E918A4 /* ZMScrollableNavigationBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZMScrollableNavigationBar.app; sourceTree = BUILT_PRODUCTS_DIR; };
23 | 87432AC51AC1F5D500E918A4 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
24 | 87432AC61AC1F5D500E918A4 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
25 | 87432AC91AC1F5D500E918A4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
26 | 87432ACB1AC1F5D500E918A4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
27 | 87432ACC1AC1F5D500E918A4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
28 | 87432ACD1AC1F5D500E918A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
29 | 87432ACE1AC1F5D500E918A4 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
30 | 87432ACF1AC1F5D500E918A4 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
31 | 87432AD21AC1F5D500E918A4 /* UINavigationController+ZMScrollable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+ZMScrollable.h"; sourceTree = ""; };
32 | 87432AD31AC1F5D500E918A4 /* UINavigationController+ZMScrollable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+ZMScrollable.m"; sourceTree = ""; };
33 | 87432AE01AC1F63800E918A4 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
34 | 87BA5F011AC21BFF0007AE75 /* PresentedViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentedViewController.h; sourceTree = ""; };
35 | 87BA5F021AC21BFF0007AE75 /* PresentedViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentedViewController.m; sourceTree = ""; };
36 | 87BA5F041AC21F030007AE75 /* PushedViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PushedViewController.h; sourceTree = ""; };
37 | 87BA5F051AC21F030007AE75 /* PushedViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PushedViewController.m; sourceTree = ""; };
38 | /* End PBXFileReference section */
39 |
40 | /* Begin PBXFrameworksBuildPhase section */
41 | 87432A981AC1F58900E918A4 /* Frameworks */ = {
42 | isa = PBXFrameworksBuildPhase;
43 | buildActionMask = 2147483647;
44 | files = (
45 | );
46 | runOnlyForDeploymentPostprocessing = 0;
47 | };
48 | /* End PBXFrameworksBuildPhase section */
49 |
50 | /* Begin PBXGroup section */
51 | 87432A921AC1F58900E918A4 = {
52 | isa = PBXGroup;
53 | children = (
54 | 87432AC41AC1F5D500E918A4 /* Test Project */,
55 | 87432AD11AC1F5D500E918A4 /* ZMScrollableNavigationBar */,
56 | 87432A9C1AC1F58900E918A4 /* Products */,
57 | );
58 | sourceTree = "";
59 | };
60 | 87432A9C1AC1F58900E918A4 /* Products */ = {
61 | isa = PBXGroup;
62 | children = (
63 | 87432A9B1AC1F58900E918A4 /* ZMScrollableNavigationBar.app */,
64 | );
65 | name = Products;
66 | sourceTree = "";
67 | };
68 | 87432AC41AC1F5D500E918A4 /* Test Project */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 87432AC51AC1F5D500E918A4 /* AppDelegate.h */,
72 | 87432AC61AC1F5D500E918A4 /* AppDelegate.m */,
73 | 87432ACE1AC1F5D500E918A4 /* ViewController.h */,
74 | 87432ACF1AC1F5D500E918A4 /* ViewController.m */,
75 | 87BA5F041AC21F030007AE75 /* PushedViewController.h */,
76 | 87BA5F051AC21F030007AE75 /* PushedViewController.m */,
77 | 87BA5F011AC21BFF0007AE75 /* PresentedViewController.h */,
78 | 87BA5F021AC21BFF0007AE75 /* PresentedViewController.m */,
79 | 87432ACA1AC1F5D500E918A4 /* Main.storyboard */,
80 | 87432AC81AC1F5D500E918A4 /* LaunchScreen.xib */,
81 | 87432ACC1AC1F5D500E918A4 /* Images.xcassets */,
82 | 87432AE01AC1F63800E918A4 /* main.m */,
83 | 87432ACD1AC1F5D500E918A4 /* Info.plist */,
84 | );
85 | path = "Test Project";
86 | sourceTree = "";
87 | };
88 | 87432AD11AC1F5D500E918A4 /* ZMScrollableNavigationBar */ = {
89 | isa = PBXGroup;
90 | children = (
91 | 87432AD21AC1F5D500E918A4 /* UINavigationController+ZMScrollable.h */,
92 | 87432AD31AC1F5D500E918A4 /* UINavigationController+ZMScrollable.m */,
93 | );
94 | path = ZMScrollableNavigationBar;
95 | sourceTree = "";
96 | };
97 | /* End PBXGroup section */
98 |
99 | /* Begin PBXNativeTarget section */
100 | 87432A9A1AC1F58900E918A4 /* ZMScrollableNavigationBar */ = {
101 | isa = PBXNativeTarget;
102 | buildConfigurationList = 87432ABE1AC1F58A00E918A4 /* Build configuration list for PBXNativeTarget "ZMScrollableNavigationBar" */;
103 | buildPhases = (
104 | 87432A971AC1F58900E918A4 /* Sources */,
105 | 87432A981AC1F58900E918A4 /* Frameworks */,
106 | 87432A991AC1F58900E918A4 /* Resources */,
107 | );
108 | buildRules = (
109 | );
110 | dependencies = (
111 | );
112 | name = ZMScrollableNavigationBar;
113 | productName = ZMScrollableNavigationBar;
114 | productReference = 87432A9B1AC1F58900E918A4 /* ZMScrollableNavigationBar.app */;
115 | productType = "com.apple.product-type.application";
116 | };
117 | /* End PBXNativeTarget section */
118 |
119 | /* Begin PBXProject section */
120 | 87432A931AC1F58900E918A4 /* Project object */ = {
121 | isa = PBXProject;
122 | attributes = {
123 | LastUpgradeCheck = 0620;
124 | ORGANIZATIONNAME = Zedenem;
125 | TargetAttributes = {
126 | 87432A9A1AC1F58900E918A4 = {
127 | CreatedOnToolsVersion = 6.2;
128 | };
129 | };
130 | };
131 | buildConfigurationList = 87432A961AC1F58900E918A4 /* Build configuration list for PBXProject "ZMScrollableNavigationBar" */;
132 | compatibilityVersion = "Xcode 3.2";
133 | developmentRegion = English;
134 | hasScannedForEncodings = 0;
135 | knownRegions = (
136 | en,
137 | Base,
138 | );
139 | mainGroup = 87432A921AC1F58900E918A4;
140 | productRefGroup = 87432A9C1AC1F58900E918A4 /* Products */;
141 | projectDirPath = "";
142 | projectRoot = "";
143 | targets = (
144 | 87432A9A1AC1F58900E918A4 /* ZMScrollableNavigationBar */,
145 | );
146 | };
147 | /* End PBXProject section */
148 |
149 | /* Begin PBXResourcesBuildPhase section */
150 | 87432A991AC1F58900E918A4 /* Resources */ = {
151 | isa = PBXResourcesBuildPhase;
152 | buildActionMask = 2147483647;
153 | files = (
154 | 87432ADA1AC1F5D500E918A4 /* Images.xcassets in Resources */,
155 | 87432AD81AC1F5D500E918A4 /* LaunchScreen.xib in Resources */,
156 | 87432AD91AC1F5D500E918A4 /* Main.storyboard in Resources */,
157 | );
158 | runOnlyForDeploymentPostprocessing = 0;
159 | };
160 | /* End PBXResourcesBuildPhase section */
161 |
162 | /* Begin PBXSourcesBuildPhase section */
163 | 87432A971AC1F58900E918A4 /* Sources */ = {
164 | isa = PBXSourcesBuildPhase;
165 | buildActionMask = 2147483647;
166 | files = (
167 | 87432AE11AC1F63800E918A4 /* main.m in Sources */,
168 | 87432ADC1AC1F5D500E918A4 /* ViewController.m in Sources */,
169 | 87BA5F061AC21F030007AE75 /* PushedViewController.m in Sources */,
170 | 87BA5F031AC21BFF0007AE75 /* PresentedViewController.m in Sources */,
171 | 87432AD61AC1F5D500E918A4 /* AppDelegate.m in Sources */,
172 | 87432ADE1AC1F5D500E918A4 /* UINavigationController+ZMScrollable.m in Sources */,
173 | );
174 | runOnlyForDeploymentPostprocessing = 0;
175 | };
176 | /* End PBXSourcesBuildPhase section */
177 |
178 | /* Begin PBXVariantGroup section */
179 | 87432AC81AC1F5D500E918A4 /* LaunchScreen.xib */ = {
180 | isa = PBXVariantGroup;
181 | children = (
182 | 87432AC91AC1F5D500E918A4 /* Base */,
183 | );
184 | name = LaunchScreen.xib;
185 | sourceTree = "";
186 | };
187 | 87432ACA1AC1F5D500E918A4 /* Main.storyboard */ = {
188 | isa = PBXVariantGroup;
189 | children = (
190 | 87432ACB1AC1F5D500E918A4 /* Base */,
191 | );
192 | name = Main.storyboard;
193 | sourceTree = "";
194 | };
195 | /* End PBXVariantGroup section */
196 |
197 | /* Begin XCBuildConfiguration section */
198 | 87432ABC1AC1F58A00E918A4 /* Debug */ = {
199 | isa = XCBuildConfiguration;
200 | buildSettings = {
201 | ALWAYS_SEARCH_USER_PATHS = NO;
202 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
203 | CLANG_CXX_LIBRARY = "libc++";
204 | CLANG_ENABLE_MODULES = YES;
205 | CLANG_ENABLE_OBJC_ARC = YES;
206 | CLANG_WARN_BOOL_CONVERSION = YES;
207 | CLANG_WARN_CONSTANT_CONVERSION = YES;
208 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
209 | CLANG_WARN_EMPTY_BODY = YES;
210 | CLANG_WARN_ENUM_CONVERSION = YES;
211 | CLANG_WARN_INT_CONVERSION = YES;
212 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
213 | CLANG_WARN_UNREACHABLE_CODE = YES;
214 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
215 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
216 | COPY_PHASE_STRIP = NO;
217 | ENABLE_STRICT_OBJC_MSGSEND = YES;
218 | GCC_C_LANGUAGE_STANDARD = gnu99;
219 | GCC_DYNAMIC_NO_PIC = NO;
220 | GCC_OPTIMIZATION_LEVEL = 0;
221 | GCC_PREPROCESSOR_DEFINITIONS = (
222 | "DEBUG=1",
223 | "$(inherited)",
224 | );
225 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
226 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
227 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
228 | GCC_WARN_UNDECLARED_SELECTOR = YES;
229 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
230 | GCC_WARN_UNUSED_FUNCTION = YES;
231 | GCC_WARN_UNUSED_VARIABLE = YES;
232 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
233 | MTL_ENABLE_DEBUG_INFO = YES;
234 | ONLY_ACTIVE_ARCH = YES;
235 | SDKROOT = iphoneos;
236 | TARGETED_DEVICE_FAMILY = "1,2";
237 | };
238 | name = Debug;
239 | };
240 | 87432ABD1AC1F58A00E918A4 /* Release */ = {
241 | isa = XCBuildConfiguration;
242 | buildSettings = {
243 | ALWAYS_SEARCH_USER_PATHS = NO;
244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
245 | CLANG_CXX_LIBRARY = "libc++";
246 | CLANG_ENABLE_MODULES = YES;
247 | CLANG_ENABLE_OBJC_ARC = YES;
248 | CLANG_WARN_BOOL_CONVERSION = YES;
249 | CLANG_WARN_CONSTANT_CONVERSION = YES;
250 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
251 | CLANG_WARN_EMPTY_BODY = YES;
252 | CLANG_WARN_ENUM_CONVERSION = YES;
253 | CLANG_WARN_INT_CONVERSION = YES;
254 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
255 | CLANG_WARN_UNREACHABLE_CODE = YES;
256 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
257 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
258 | COPY_PHASE_STRIP = NO;
259 | ENABLE_NS_ASSERTIONS = NO;
260 | ENABLE_STRICT_OBJC_MSGSEND = YES;
261 | GCC_C_LANGUAGE_STANDARD = gnu99;
262 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
263 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
264 | GCC_WARN_UNDECLARED_SELECTOR = YES;
265 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
266 | GCC_WARN_UNUSED_FUNCTION = YES;
267 | GCC_WARN_UNUSED_VARIABLE = YES;
268 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
269 | MTL_ENABLE_DEBUG_INFO = NO;
270 | SDKROOT = iphoneos;
271 | TARGETED_DEVICE_FAMILY = "1,2";
272 | VALIDATE_PRODUCT = YES;
273 | };
274 | name = Release;
275 | };
276 | 87432ABF1AC1F58A00E918A4 /* Debug */ = {
277 | isa = XCBuildConfiguration;
278 | buildSettings = {
279 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
280 | INFOPLIST_FILE = "Test Project/Info.plist";
281 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
282 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
283 | PRODUCT_NAME = "$(TARGET_NAME)";
284 | };
285 | name = Debug;
286 | };
287 | 87432AC01AC1F58A00E918A4 /* Release */ = {
288 | isa = XCBuildConfiguration;
289 | buildSettings = {
290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
291 | INFOPLIST_FILE = "Test Project/Info.plist";
292 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
294 | PRODUCT_NAME = "$(TARGET_NAME)";
295 | };
296 | name = Release;
297 | };
298 | /* End XCBuildConfiguration section */
299 |
300 | /* Begin XCConfigurationList section */
301 | 87432A961AC1F58900E918A4 /* Build configuration list for PBXProject "ZMScrollableNavigationBar" */ = {
302 | isa = XCConfigurationList;
303 | buildConfigurations = (
304 | 87432ABC1AC1F58A00E918A4 /* Debug */,
305 | 87432ABD1AC1F58A00E918A4 /* Release */,
306 | );
307 | defaultConfigurationIsVisible = 0;
308 | defaultConfigurationName = Release;
309 | };
310 | 87432ABE1AC1F58A00E918A4 /* Build configuration list for PBXNativeTarget "ZMScrollableNavigationBar" */ = {
311 | isa = XCConfigurationList;
312 | buildConfigurations = (
313 | 87432ABF1AC1F58A00E918A4 /* Debug */,
314 | 87432AC01AC1F58A00E918A4 /* Release */,
315 | );
316 | defaultConfigurationIsVisible = 0;
317 | defaultConfigurationName = Release;
318 | };
319 | /* End XCConfigurationList section */
320 | };
321 | rootObject = 87432A931AC1F58900E918A4 /* Project object */;
322 | }
323 |
--------------------------------------------------------------------------------
/Test Project/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
90 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
--------------------------------------------------------------------------------