├── UIViewControllerScrollingStatusBar
├── en.lproj
│ └── InfoPlist.strings
├── AppDelegate.h
├── ViewController.h
├── UIViewControllerScrollingStatusBar-Prefix.pch
├── main.m
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
├── UIViewControllerScrollingStatusBar-Info.plist
├── ViewController.m
├── AppDelegate.m
└── Base.lproj
│ └── Main.storyboard
├── UIViewControllerScrollingStatusBarTests
├── en.lproj
│ └── InfoPlist.strings
├── UIViewControllerScrollingStatusBarTests-Info.plist
└── UIViewControllerScrollingStatusBarTests.m
├── UIViewControllerScrollingStatusBar.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcuserdata
│ └── antondomashnev.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── UIViewControllerScrollingStatusBar.xcscheme
└── project.pbxproj
├── .gitignore
├── Source
├── UIViewController+ScrollingStatusBar.h
└── UIViewController+ScrollingStatusBar.m
├── UIViewControllerScrollingStatusBar.podspec
├── LICENSE
└── README.md
/UIViewControllerScrollingStatusBar/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBarTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #xcode specific
2 | build/*
3 | Pods/*
4 | *.pbxuser
5 | *.mode2v3
6 | *.mode1v3
7 | *.perspective
8 | *.perspectivev3
9 | *~.nib
10 | #ignore private workspace stuff added by Xcode4
11 | xcuserdata
12 | project.xcworkspace
13 |
14 | ## generic files to ignore
15 | *~
16 | *.lock
17 | *.DS_Store
18 | *.swp
19 | *.out
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // UIViewControllerScrollingStatusBar
4 | //
5 | // Created by Anton Domashnev on 25.06.14.
6 | // Copyright (c) 2014 Anton Domashnev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // UIViewControllerScrollingStatusBar
4 | //
5 | // Created by Anton Domashnev on 25.06.14.
6 | // Copyright (c) 2014 Anton Domashnev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @property (nonatomic, weak) IBOutlet UITableView *tableView;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/UIViewControllerScrollingStatusBar-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_5_0
10 | #warning "This project uses features only available in iOS SDK 5.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // UIViewControllerScrollingStatusBar
4 | //
5 | // Created by Anton Domashnev on 25.06.14.
6 | // Copyright (c) 2014 Anton Domashnev. 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 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/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 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/Source/UIViewController+ScrollingStatusBar.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+ScrollingStatusBar.h
3 | // UIViewControllerScrollingStatusBar
4 | //
5 | // Created by Anton Domashnev on 25.06.14.
6 | // Copyright (c) 2014 Anton Domashnev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIViewController (ScrollingStatusBar)
12 |
13 | - (void)enableStatusBarScrollingAlongScrollView:(UIScrollView *)scrollView;
14 | - (void)disableStatusBarScrollingAlongScrollView:(UIScrollView *)scrollView;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/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 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar.xcodeproj/xcuserdata/antondomashnev.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | UIViewControllerScrollingStatusBar.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 6D865FE8195A170C0008FE39
16 |
17 | primary
18 |
19 |
20 | 6D866009195A170D0008FE39
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBarTests/UIViewControllerScrollingStatusBarTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | antondomashnev.${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 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "UIViewControllerScrollingStatusBar"
3 | s.version = "1.0.0"
4 | s.summary = "Make scrolling along scrollView status bar in a one line of code"
5 | s.description = <<-DESC
6 | Category for UIViewController with UIScrollView to scroll statusBar along any UIScrollView subclass.
7 | DESC
8 | s.homepage = "https://github.com/Antondomashnev"
9 | s.author = { 'Anton Domashnev' => 'antondomashnev@gmail.com' }
10 | s.source = { :git => "https://github.com/Antondomashnev/UIViewController-ScrollingStatusBar.git", :tag => s.version.to_s}
11 | s.platform = :ios, "7.0"
12 | s.ios.deployment_target = "7.0"
13 | s.source_files = "Source/*.{h,m}"
14 | s.license = { :type => 'MIT', :file => 'LICENSE' }
15 | s.requires_arc = true
16 | end
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBarTests/UIViewControllerScrollingStatusBarTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewControllerScrollingStatusBarTests.m
3 | // UIViewControllerScrollingStatusBarTests
4 | //
5 | // Created by Anton Domashnev on 25.06.14.
6 | // Copyright (c) 2014 Anton Domashnev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIViewControllerScrollingStatusBarTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation UIViewControllerScrollingStatusBarTests
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 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Anton
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.
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/UIViewControllerScrollingStatusBar-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | antondomashnev.${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 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UIViewControllerBasedStatusBarAppearance
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // UIViewControllerScrollingStatusBar
4 | //
5 | // Created by Anton Domashnev on 25.06.14.
6 | // Copyright (c) 2014 Anton Domashnev. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #import "UIViewController+ScrollingStatusBar.h"
12 |
13 | @interface ViewController ()
14 |
15 | @end
16 |
17 | @implementation ViewController
18 |
19 | - (void)viewDidLoad
20 | {
21 | [super viewDidLoad];
22 | self.tableView.contentInset = UIEdgeInsetsMake([UIApplication sharedApplication].statusBarFrame.size.height, 0, 0, 0);
23 | [self enableStatusBarScrollingAlongScrollView:self.tableView];
24 | }
25 |
26 | - (void)dealloc
27 | {
28 | /*
29 | !!! Dont forget to disable it in dealloc !!!
30 | */
31 | [self disableStatusBarScrollingAlongScrollView:self.tableView];
32 | }
33 |
34 | - (void)didReceiveMemoryWarning
35 | {
36 | [super didReceiveMemoryWarning];
37 | // Dispose of any resources that can be recreated.
38 | }
39 |
40 | #pragma mark - UITableViewDataSource
41 |
42 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
43 | {
44 | return 1;
45 | }
46 |
47 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
48 | {
49 | return 100;
50 | }
51 |
52 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
53 | {
54 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
55 | if(!cell){
56 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"];
57 | }
58 | cell.textLabel.text = [NSString stringWithFormat:@"Row %d", indexPath.row];
59 | return cell;
60 | }
61 |
62 | #pragma mark - UITableViewDelegate
63 |
64 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
65 | {
66 | return 44.;
67 | }
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | UIViewController-ScrollingStatusBar
2 | =============
3 | -------------
4 |
5 | Category for UIViewController with UIScrollView to scroll statusBar along any UIScrollView subclass.
6 |
7 |
8 |
9 | ------------
10 | Requirements
11 | ============
12 |
13 | UIViewController-ScrollingStatusBar works on any iOS version only greater or equal than 7.0 and is compatible with only ARC projects. It depends on the following Apple frameworks:
14 |
15 | * Foundation.framework
16 | * UIKit.framework
17 | * CoreGraphics.framework
18 |
19 | You will need LLVM 3.0 or later in order to build UIViewController-ScrollingStatusBar.
20 |
21 | ------------------------------------
22 | Adding UIViewController-ScrollingStatusBar to your project
23 | ====================================
24 |
25 | From CocoaPods
26 | ------------
27 |
28 | Add `pod 'UIViewController-ScrollingStatusBar' '~> 1.0.0'` (i hope it will be merged soon =)) to your Podfile.
29 |
30 | Source files
31 | ------------
32 |
33 | There is an old school way to add the UIViewController-ScrollingStatusBar to your project is to directly add the source files from Source folder in project folder to your project.
34 |
35 | -----
36 | Usage
37 | =====
38 |
39 | You can create scrolling status bar with only a one line of code for any UIViewController subclass
40 | ```objective-c
41 | /*
42 | import category
43 | */
44 | #import "UIViewController+ScrollingStatusBar.h"
45 |
46 | /*
47 | for example in viewDidLoad
48 | */
49 | - (void)viewDidLoad
50 | {
51 | ...
52 | [self enableStatusBarScrollingAlongScrollView: someScrollView];
53 | }
54 |
55 | /*
56 | Don't forget to disable it in for example dealloc
57 | */
58 | - (void)dealloc
59 | {
60 | [self disableStatusBarScrollingAlongScrollView: someScrollView];
61 | }
62 |
63 | ```
64 |
65 | -------
66 | License
67 | =======
68 |
69 | This code is distributed under the terms and conditions of the MIT license.
70 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // UIViewControllerScrollingStatusBar
4 | //
5 | // Created by Anton Domashnev on 25.06.14.
6 | // Copyright (c) 2014 Anton Domashnev. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @implementation AppDelegate
12 |
13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
14 | {
15 | // Override point for customization after application launch.
16 | return YES;
17 | }
18 |
19 | - (void)applicationWillResignActive:(UIApplication *)application
20 | {
21 | // 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.
22 | // 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.
23 | }
24 |
25 | - (void)applicationDidEnterBackground:(UIApplication *)application
26 | {
27 | // 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.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | - (void)applicationWillEnterForeground:(UIApplication *)application
32 | {
33 | // 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.
34 | }
35 |
36 | - (void)applicationDidBecomeActive:(UIApplication *)application
37 | {
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 | {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar/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 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar.xcodeproj/xcuserdata/antondomashnev.xcuserdatad/xcschemes/UIViewControllerScrollingStatusBar.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 |
--------------------------------------------------------------------------------
/Source/UIViewController+ScrollingStatusBar.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+ScrollingStatusBar.m
3 | // UIViewControllerScrollingStatusBar
4 | //
5 | // Created by Anton Domashnev on 25.06.14.
6 | // Copyright (c) 2014 Anton Domashnev. All rights reserved.
7 | //
8 |
9 | #import "UIViewController+ScrollingStatusBar.h"
10 |
11 | #import
12 |
13 | @interface ADScrollingHandler : NSObject
14 |
15 | - (instancetype)initWithDidScrollBlock:(void(^)(UIScrollView *scrollView))didScrollBlock;
16 |
17 | @end
18 |
19 | NSString* const ADScrollingHandlerDidScrollBlock = @"ADScrollingHandlerDidScrollBlock";
20 |
21 | @implementation ADScrollingHandler
22 |
23 | - (instancetype)initWithDidScrollBlock:(void(^)(UIScrollView *scrollView))didScrollBlock
24 | {
25 | if(self = [super init]){
26 | self.didScrollBlock = didScrollBlock;
27 | }
28 | return self;
29 | }
30 |
31 | #pragma mark - Properties
32 |
33 | - (void)setDidScrollBlock:(void(^)(UITableView *tableView))didScrollBlock
34 | {
35 | objc_setAssociatedObject(self, (__bridge const void *)(ADScrollingHandlerDidScrollBlock), didScrollBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
36 | }
37 |
38 | - (void(^)(UITableView *tableView))didScrollBlock
39 | {
40 | return objc_getAssociatedObject(self, (__bridge const void *)(ADScrollingHandlerDidScrollBlock));
41 | }
42 |
43 | #pragma mark - KVO
44 |
45 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
46 | {
47 | if(![keyPath isEqualToString:@"contentOffset"]){
48 | return;
49 | }
50 |
51 | if(self.didScrollBlock){
52 | self.didScrollBlock(object);
53 | }
54 | }
55 |
56 | @end
57 |
58 |
59 | @interface ADStatusBarWindow : UIWindow
60 |
61 | @end
62 |
63 | @implementation ADStatusBarWindow
64 |
65 | - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
66 | {
67 | /*
68 | 20 points hardcoded for performance reason (default portrait status bar height)
69 | */
70 | return point.y <= 20.;
71 | }
72 |
73 | @end
74 |
75 |
76 | NSString* const UIViewControllerScrollingStatusBarContext = @"UIViewControllerScrollingStatusBarContext";
77 | NSString* const UIViewControllerScrollingHandler = @"UIViewControllerScrollingHandler";
78 | NSString* const UIViewControllerStatusBarView = @"UIViewControllerStatusBarView";
79 | NSString* const UIViewControllerScrollView = @"UIViewControllerScrollView";
80 |
81 | @implementation UIViewController (ScrollingStatusBar)
82 |
83 | #pragma mark - Properties
84 |
85 | - (void)setScrollingHandler:(ADScrollingHandler *)handler
86 | {
87 | objc_setAssociatedObject(self, (__bridge const void *)(UIViewControllerScrollingHandler), handler, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
88 | }
89 |
90 | - (ADScrollingHandler *)scrollingHandler
91 | {
92 | return objc_getAssociatedObject(self, (__bridge const void *)(UIViewControllerScrollingHandler));
93 | }
94 |
95 | - (void)setStatusBarView:(UIView *)statusBarView
96 | {
97 | objc_setAssociatedObject(self, (__bridge const void *)(UIViewControllerStatusBarView), statusBarView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
98 | }
99 |
100 | - (UIView *)statusBarView
101 | {
102 | return objc_getAssociatedObject(self, (__bridge const void *)(UIViewControllerStatusBarView));
103 | }
104 |
105 | - (void)setScrollView:(UIScrollView *)scrollView
106 | {
107 | objc_setAssociatedObject(self, (__bridge const void *)(UIViewControllerScrollView), scrollView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
108 | }
109 |
110 | - (UIScrollView *)scrollView
111 | {
112 | return objc_getAssociatedObject(self, (__bridge const void *)(UIViewControllerScrollView));
113 | }
114 |
115 | #pragma mark - Gestures
116 |
117 | - (void)statusBarViewTap:(UITapGestureRecognizer *)tap
118 | {
119 | [self.scrollView setContentOffset:CGPointMake(0, -self.scrollView.contentInset.top) animated:YES];
120 | }
121 |
122 | #pragma mark - UI
123 |
124 | static UIWindow *fakeStatusBarWindow = nil;
125 | - (UIWindow *)fakeStatusBarWindow
126 | {
127 | static dispatch_once_t onceToken;
128 | dispatch_once(&onceToken, ^{
129 | fakeStatusBarWindow = [[ADStatusBarWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
130 | fakeStatusBarWindow.backgroundColor = [UIColor clearColor];
131 | fakeStatusBarWindow.userInteractionEnabled = YES;
132 | fakeStatusBarWindow.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
133 | fakeStatusBarWindow.windowLevel = UIWindowLevelStatusBar;
134 | fakeStatusBarWindow.hidden = NO;
135 | });
136 | return fakeStatusBarWindow;
137 | }
138 |
139 | - (void)createStatusBarView
140 | {
141 | CGRect frame = [UIApplication sharedApplication].statusBarFrame;
142 | frame.size.height *= 2;
143 | self.statusBarView = [[UIView alloc] initWithFrame:frame];
144 | self.statusBarView.clipsToBounds = YES;
145 | self.statusBarView.backgroundColor = [UIColor clearColor];
146 | UIView *statusBarImageView = [[UIScreen mainScreen] snapshotViewAfterScreenUpdates:NO];
147 | UIView *statusBarImageViewClipView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height * 0.5)];
148 | statusBarImageViewClipView.clipsToBounds = YES;
149 | [statusBarImageViewClipView addSubview:statusBarImageView];
150 | [self.statusBarView addSubview:statusBarImageViewClipView];
151 | [self.statusBarView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(statusBarViewTap:)]];
152 | [self.fakeStatusBarWindow addSubview:self.statusBarView];
153 | }
154 |
155 | #pragma mark - Helpers
156 |
157 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView
158 | {
159 | CGFloat offsetY = scrollView.contentOffset.y;
160 | if(offsetY > -scrollView.contentInset.top){
161 | if(!self.statusBarView){
162 | [self createStatusBarView];
163 | [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
164 | }
165 | self.statusBarView.frame = (CGRect){.origin = CGPointMake(self.statusBarView.frame.origin.x, MAX(-self.statusBarView.frame.size.height * 0.5, -scrollView.contentInset.top - offsetY)), .size = self.statusBarView.frame.size};
166 | }
167 | else{
168 | if(self.statusBarView){
169 | [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
170 | [self.statusBarView removeFromSuperview];
171 | self.statusBarView = nil;
172 | }
173 | }
174 | }
175 |
176 | #pragma mark - Interface
177 |
178 | - (void)enableStatusBarScrollingAlongScrollView:(UIScrollView *)scrollView
179 | {
180 | NSParameterAssert(scrollView);
181 |
182 | __weak id wSelf = self;
183 | self.scrollingHandler = [[ADScrollingHandler alloc] initWithDidScrollBlock:^(UIScrollView *scrollView) {
184 | [wSelf scrollViewDidScroll:scrollView];
185 | }];
186 |
187 | self.scrollView = scrollView;
188 | [scrollView addObserver:self.scrollingHandler forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:(__bridge void *)(UIViewControllerScrollingStatusBarContext)];
189 | }
190 |
191 | - (void)disableStatusBarScrollingAlongScrollView:(UITableView *)scrollView
192 | {
193 | self.scrollView = nil;
194 | [scrollView removeObserver:self.scrollingHandler forKeyPath:@"contentOffset" context:(__bridge void *)(UIViewControllerScrollingStatusBarContext)];
195 | }
196 |
197 | @end
198 |
--------------------------------------------------------------------------------
/UIViewControllerScrollingStatusBar.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 6D865FED195A170D0008FE39 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D865FEC195A170D0008FE39 /* Foundation.framework */; };
11 | 6D865FEF195A170D0008FE39 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D865FEE195A170D0008FE39 /* CoreGraphics.framework */; };
12 | 6D865FF1195A170D0008FE39 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D865FF0195A170D0008FE39 /* UIKit.framework */; };
13 | 6D865FF7195A170D0008FE39 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6D865FF5195A170D0008FE39 /* InfoPlist.strings */; };
14 | 6D865FF9195A170D0008FE39 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D865FF8195A170D0008FE39 /* main.m */; };
15 | 6D865FFD195A170D0008FE39 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D865FFC195A170D0008FE39 /* AppDelegate.m */; };
16 | 6D866000195A170D0008FE39 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D865FFE195A170D0008FE39 /* Main.storyboard */; };
17 | 6D866003195A170D0008FE39 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D866002195A170D0008FE39 /* ViewController.m */; };
18 | 6D866005195A170D0008FE39 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D866004195A170D0008FE39 /* Images.xcassets */; };
19 | 6D86600C195A170D0008FE39 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D86600B195A170D0008FE39 /* XCTest.framework */; };
20 | 6D86600D195A170D0008FE39 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D865FEC195A170D0008FE39 /* Foundation.framework */; };
21 | 6D86600E195A170D0008FE39 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D865FF0195A170D0008FE39 /* UIKit.framework */; };
22 | 6D866016195A170D0008FE39 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6D866014195A170D0008FE39 /* InfoPlist.strings */; };
23 | 6D866018195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D866017195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests.m */; };
24 | 6D866024195A18A40008FE39 /* UIViewController+ScrollingStatusBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D866023195A18A40008FE39 /* UIViewController+ScrollingStatusBar.m */; };
25 | /* End PBXBuildFile section */
26 |
27 | /* Begin PBXContainerItemProxy section */
28 | 6D86600F195A170D0008FE39 /* PBXContainerItemProxy */ = {
29 | isa = PBXContainerItemProxy;
30 | containerPortal = 6D865FE1195A170C0008FE39 /* Project object */;
31 | proxyType = 1;
32 | remoteGlobalIDString = 6D865FE8195A170C0008FE39;
33 | remoteInfo = UIViewControllerScrollingStatusBar;
34 | };
35 | /* End PBXContainerItemProxy section */
36 |
37 | /* Begin PBXFileReference section */
38 | 6D865FE9195A170C0008FE39 /* UIViewControllerScrollingStatusBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIViewControllerScrollingStatusBar.app; sourceTree = BUILT_PRODUCTS_DIR; };
39 | 6D865FEC195A170D0008FE39 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
40 | 6D865FEE195A170D0008FE39 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
41 | 6D865FF0195A170D0008FE39 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
42 | 6D865FF4195A170D0008FE39 /* UIViewControllerScrollingStatusBar-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIViewControllerScrollingStatusBar-Info.plist"; sourceTree = ""; };
43 | 6D865FF6195A170D0008FE39 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
44 | 6D865FF8195A170D0008FE39 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
45 | 6D865FFA195A170D0008FE39 /* UIViewControllerScrollingStatusBar-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewControllerScrollingStatusBar-Prefix.pch"; sourceTree = ""; };
46 | 6D865FFB195A170D0008FE39 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
47 | 6D865FFC195A170D0008FE39 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
48 | 6D865FFF195A170D0008FE39 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
49 | 6D866001195A170D0008FE39 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
50 | 6D866002195A170D0008FE39 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
51 | 6D866004195A170D0008FE39 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
52 | 6D86600A195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIViewControllerScrollingStatusBarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
53 | 6D86600B195A170D0008FE39 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
54 | 6D866013195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIViewControllerScrollingStatusBarTests-Info.plist"; sourceTree = ""; };
55 | 6D866015195A170D0008FE39 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
56 | 6D866017195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIViewControllerScrollingStatusBarTests.m; sourceTree = ""; };
57 | 6D866022195A18A40008FE39 /* UIViewController+ScrollingStatusBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+ScrollingStatusBar.h"; sourceTree = ""; };
58 | 6D866023195A18A40008FE39 /* UIViewController+ScrollingStatusBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+ScrollingStatusBar.m"; sourceTree = ""; };
59 | /* End PBXFileReference section */
60 |
61 | /* Begin PBXFrameworksBuildPhase section */
62 | 6D865FE6195A170C0008FE39 /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | 6D865FEF195A170D0008FE39 /* CoreGraphics.framework in Frameworks */,
67 | 6D865FF1195A170D0008FE39 /* UIKit.framework in Frameworks */,
68 | 6D865FED195A170D0008FE39 /* Foundation.framework in Frameworks */,
69 | );
70 | runOnlyForDeploymentPostprocessing = 0;
71 | };
72 | 6D866007195A170D0008FE39 /* Frameworks */ = {
73 | isa = PBXFrameworksBuildPhase;
74 | buildActionMask = 2147483647;
75 | files = (
76 | 6D86600C195A170D0008FE39 /* XCTest.framework in Frameworks */,
77 | 6D86600E195A170D0008FE39 /* UIKit.framework in Frameworks */,
78 | 6D86600D195A170D0008FE39 /* Foundation.framework in Frameworks */,
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | /* End PBXFrameworksBuildPhase section */
83 |
84 | /* Begin PBXGroup section */
85 | 6D865FE0195A170C0008FE39 = {
86 | isa = PBXGroup;
87 | children = (
88 | 6D866021195A18770008FE39 /* Source */,
89 | 6D865FF2195A170D0008FE39 /* UIViewControllerScrollingStatusBar */,
90 | 6D866011195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests */,
91 | 6D865FEB195A170C0008FE39 /* Frameworks */,
92 | 6D865FEA195A170C0008FE39 /* Products */,
93 | );
94 | sourceTree = "";
95 | };
96 | 6D865FEA195A170C0008FE39 /* Products */ = {
97 | isa = PBXGroup;
98 | children = (
99 | 6D865FE9195A170C0008FE39 /* UIViewControllerScrollingStatusBar.app */,
100 | 6D86600A195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests.xctest */,
101 | );
102 | name = Products;
103 | sourceTree = "";
104 | };
105 | 6D865FEB195A170C0008FE39 /* Frameworks */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 6D865FEC195A170D0008FE39 /* Foundation.framework */,
109 | 6D865FEE195A170D0008FE39 /* CoreGraphics.framework */,
110 | 6D865FF0195A170D0008FE39 /* UIKit.framework */,
111 | 6D86600B195A170D0008FE39 /* XCTest.framework */,
112 | );
113 | name = Frameworks;
114 | sourceTree = "";
115 | };
116 | 6D865FF2195A170D0008FE39 /* UIViewControllerScrollingStatusBar */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 6D865FFB195A170D0008FE39 /* AppDelegate.h */,
120 | 6D865FFC195A170D0008FE39 /* AppDelegate.m */,
121 | 6D865FFE195A170D0008FE39 /* Main.storyboard */,
122 | 6D866001195A170D0008FE39 /* ViewController.h */,
123 | 6D866002195A170D0008FE39 /* ViewController.m */,
124 | 6D866004195A170D0008FE39 /* Images.xcassets */,
125 | 6D865FF3195A170D0008FE39 /* Supporting Files */,
126 | );
127 | path = UIViewControllerScrollingStatusBar;
128 | sourceTree = "";
129 | };
130 | 6D865FF3195A170D0008FE39 /* Supporting Files */ = {
131 | isa = PBXGroup;
132 | children = (
133 | 6D865FF4195A170D0008FE39 /* UIViewControllerScrollingStatusBar-Info.plist */,
134 | 6D865FF5195A170D0008FE39 /* InfoPlist.strings */,
135 | 6D865FF8195A170D0008FE39 /* main.m */,
136 | 6D865FFA195A170D0008FE39 /* UIViewControllerScrollingStatusBar-Prefix.pch */,
137 | );
138 | name = "Supporting Files";
139 | sourceTree = "";
140 | };
141 | 6D866011195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests */ = {
142 | isa = PBXGroup;
143 | children = (
144 | 6D866017195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests.m */,
145 | 6D866012195A170D0008FE39 /* Supporting Files */,
146 | );
147 | path = UIViewControllerScrollingStatusBarTests;
148 | sourceTree = "";
149 | };
150 | 6D866012195A170D0008FE39 /* Supporting Files */ = {
151 | isa = PBXGroup;
152 | children = (
153 | 6D866013195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests-Info.plist */,
154 | 6D866014195A170D0008FE39 /* InfoPlist.strings */,
155 | );
156 | name = "Supporting Files";
157 | sourceTree = "";
158 | };
159 | 6D866021195A18770008FE39 /* Source */ = {
160 | isa = PBXGroup;
161 | children = (
162 | 6D866022195A18A40008FE39 /* UIViewController+ScrollingStatusBar.h */,
163 | 6D866023195A18A40008FE39 /* UIViewController+ScrollingStatusBar.m */,
164 | );
165 | path = Source;
166 | sourceTree = "";
167 | };
168 | /* End PBXGroup section */
169 |
170 | /* Begin PBXNativeTarget section */
171 | 6D865FE8195A170C0008FE39 /* UIViewControllerScrollingStatusBar */ = {
172 | isa = PBXNativeTarget;
173 | buildConfigurationList = 6D86601B195A170D0008FE39 /* Build configuration list for PBXNativeTarget "UIViewControllerScrollingStatusBar" */;
174 | buildPhases = (
175 | 6D865FE5195A170C0008FE39 /* Sources */,
176 | 6D865FE6195A170C0008FE39 /* Frameworks */,
177 | 6D865FE7195A170C0008FE39 /* Resources */,
178 | );
179 | buildRules = (
180 | );
181 | dependencies = (
182 | );
183 | name = UIViewControllerScrollingStatusBar;
184 | productName = UIViewControllerScrollingStatusBar;
185 | productReference = 6D865FE9195A170C0008FE39 /* UIViewControllerScrollingStatusBar.app */;
186 | productType = "com.apple.product-type.application";
187 | };
188 | 6D866009195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests */ = {
189 | isa = PBXNativeTarget;
190 | buildConfigurationList = 6D86601E195A170D0008FE39 /* Build configuration list for PBXNativeTarget "UIViewControllerScrollingStatusBarTests" */;
191 | buildPhases = (
192 | 6D866006195A170D0008FE39 /* Sources */,
193 | 6D866007195A170D0008FE39 /* Frameworks */,
194 | 6D866008195A170D0008FE39 /* Resources */,
195 | );
196 | buildRules = (
197 | );
198 | dependencies = (
199 | 6D866010195A170D0008FE39 /* PBXTargetDependency */,
200 | );
201 | name = UIViewControllerScrollingStatusBarTests;
202 | productName = UIViewControllerScrollingStatusBarTests;
203 | productReference = 6D86600A195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests.xctest */;
204 | productType = "com.apple.product-type.bundle.unit-test";
205 | };
206 | /* End PBXNativeTarget section */
207 |
208 | /* Begin PBXProject section */
209 | 6D865FE1195A170C0008FE39 /* Project object */ = {
210 | isa = PBXProject;
211 | attributes = {
212 | LastUpgradeCheck = 0510;
213 | ORGANIZATIONNAME = "Anton Domashnev";
214 | TargetAttributes = {
215 | 6D866009195A170D0008FE39 = {
216 | TestTargetID = 6D865FE8195A170C0008FE39;
217 | };
218 | };
219 | };
220 | buildConfigurationList = 6D865FE4195A170C0008FE39 /* Build configuration list for PBXProject "UIViewControllerScrollingStatusBar" */;
221 | compatibilityVersion = "Xcode 3.2";
222 | developmentRegion = English;
223 | hasScannedForEncodings = 0;
224 | knownRegions = (
225 | en,
226 | Base,
227 | );
228 | mainGroup = 6D865FE0195A170C0008FE39;
229 | productRefGroup = 6D865FEA195A170C0008FE39 /* Products */;
230 | projectDirPath = "";
231 | projectRoot = "";
232 | targets = (
233 | 6D865FE8195A170C0008FE39 /* UIViewControllerScrollingStatusBar */,
234 | 6D866009195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests */,
235 | );
236 | };
237 | /* End PBXProject section */
238 |
239 | /* Begin PBXResourcesBuildPhase section */
240 | 6D865FE7195A170C0008FE39 /* Resources */ = {
241 | isa = PBXResourcesBuildPhase;
242 | buildActionMask = 2147483647;
243 | files = (
244 | 6D866005195A170D0008FE39 /* Images.xcassets in Resources */,
245 | 6D865FF7195A170D0008FE39 /* InfoPlist.strings in Resources */,
246 | 6D866000195A170D0008FE39 /* Main.storyboard in Resources */,
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | 6D866008195A170D0008FE39 /* Resources */ = {
251 | isa = PBXResourcesBuildPhase;
252 | buildActionMask = 2147483647;
253 | files = (
254 | 6D866016195A170D0008FE39 /* InfoPlist.strings in Resources */,
255 | );
256 | runOnlyForDeploymentPostprocessing = 0;
257 | };
258 | /* End PBXResourcesBuildPhase section */
259 |
260 | /* Begin PBXSourcesBuildPhase section */
261 | 6D865FE5195A170C0008FE39 /* Sources */ = {
262 | isa = PBXSourcesBuildPhase;
263 | buildActionMask = 2147483647;
264 | files = (
265 | 6D866003195A170D0008FE39 /* ViewController.m in Sources */,
266 | 6D865FFD195A170D0008FE39 /* AppDelegate.m in Sources */,
267 | 6D866024195A18A40008FE39 /* UIViewController+ScrollingStatusBar.m in Sources */,
268 | 6D865FF9195A170D0008FE39 /* main.m in Sources */,
269 | );
270 | runOnlyForDeploymentPostprocessing = 0;
271 | };
272 | 6D866006195A170D0008FE39 /* Sources */ = {
273 | isa = PBXSourcesBuildPhase;
274 | buildActionMask = 2147483647;
275 | files = (
276 | 6D866018195A170D0008FE39 /* UIViewControllerScrollingStatusBarTests.m in Sources */,
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | };
280 | /* End PBXSourcesBuildPhase section */
281 |
282 | /* Begin PBXTargetDependency section */
283 | 6D866010195A170D0008FE39 /* PBXTargetDependency */ = {
284 | isa = PBXTargetDependency;
285 | target = 6D865FE8195A170C0008FE39 /* UIViewControllerScrollingStatusBar */;
286 | targetProxy = 6D86600F195A170D0008FE39 /* PBXContainerItemProxy */;
287 | };
288 | /* End PBXTargetDependency section */
289 |
290 | /* Begin PBXVariantGroup section */
291 | 6D865FF5195A170D0008FE39 /* InfoPlist.strings */ = {
292 | isa = PBXVariantGroup;
293 | children = (
294 | 6D865FF6195A170D0008FE39 /* en */,
295 | );
296 | name = InfoPlist.strings;
297 | sourceTree = "";
298 | };
299 | 6D865FFE195A170D0008FE39 /* Main.storyboard */ = {
300 | isa = PBXVariantGroup;
301 | children = (
302 | 6D865FFF195A170D0008FE39 /* Base */,
303 | );
304 | name = Main.storyboard;
305 | sourceTree = "";
306 | };
307 | 6D866014195A170D0008FE39 /* InfoPlist.strings */ = {
308 | isa = PBXVariantGroup;
309 | children = (
310 | 6D866015195A170D0008FE39 /* en */,
311 | );
312 | name = InfoPlist.strings;
313 | sourceTree = "";
314 | };
315 | /* End PBXVariantGroup section */
316 |
317 | /* Begin XCBuildConfiguration section */
318 | 6D866019195A170D0008FE39 /* Debug */ = {
319 | isa = XCBuildConfiguration;
320 | buildSettings = {
321 | ALWAYS_SEARCH_USER_PATHS = NO;
322 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
323 | CLANG_CXX_LIBRARY = "libc++";
324 | CLANG_ENABLE_MODULES = YES;
325 | CLANG_ENABLE_OBJC_ARC = YES;
326 | CLANG_WARN_BOOL_CONVERSION = YES;
327 | CLANG_WARN_CONSTANT_CONVERSION = YES;
328 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
329 | CLANG_WARN_EMPTY_BODY = YES;
330 | CLANG_WARN_ENUM_CONVERSION = YES;
331 | CLANG_WARN_INT_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
334 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
335 | COPY_PHASE_STRIP = NO;
336 | GCC_C_LANGUAGE_STANDARD = gnu99;
337 | GCC_DYNAMIC_NO_PIC = NO;
338 | GCC_OPTIMIZATION_LEVEL = 0;
339 | GCC_PREPROCESSOR_DEFINITIONS = (
340 | "DEBUG=1",
341 | "$(inherited)",
342 | );
343 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
344 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
345 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
346 | GCC_WARN_UNDECLARED_SELECTOR = YES;
347 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
348 | GCC_WARN_UNUSED_FUNCTION = YES;
349 | GCC_WARN_UNUSED_VARIABLE = YES;
350 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
351 | ONLY_ACTIVE_ARCH = YES;
352 | SDKROOT = iphoneos;
353 | };
354 | name = Debug;
355 | };
356 | 6D86601A195A170D0008FE39 /* Release */ = {
357 | isa = XCBuildConfiguration;
358 | buildSettings = {
359 | ALWAYS_SEARCH_USER_PATHS = NO;
360 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
361 | CLANG_CXX_LIBRARY = "libc++";
362 | CLANG_ENABLE_MODULES = YES;
363 | CLANG_ENABLE_OBJC_ARC = YES;
364 | CLANG_WARN_BOOL_CONVERSION = YES;
365 | CLANG_WARN_CONSTANT_CONVERSION = YES;
366 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
367 | CLANG_WARN_EMPTY_BODY = YES;
368 | CLANG_WARN_ENUM_CONVERSION = YES;
369 | CLANG_WARN_INT_CONVERSION = YES;
370 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
371 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
372 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
373 | COPY_PHASE_STRIP = YES;
374 | ENABLE_NS_ASSERTIONS = NO;
375 | GCC_C_LANGUAGE_STANDARD = gnu99;
376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
378 | GCC_WARN_UNDECLARED_SELECTOR = YES;
379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
380 | GCC_WARN_UNUSED_FUNCTION = YES;
381 | GCC_WARN_UNUSED_VARIABLE = YES;
382 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
383 | SDKROOT = iphoneos;
384 | VALIDATE_PRODUCT = YES;
385 | };
386 | name = Release;
387 | };
388 | 6D86601C195A170D0008FE39 /* Debug */ = {
389 | isa = XCBuildConfiguration;
390 | buildSettings = {
391 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
392 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
393 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
394 | GCC_PREFIX_HEADER = "UIViewControllerScrollingStatusBar/UIViewControllerScrollingStatusBar-Prefix.pch";
395 | INFOPLIST_FILE = "UIViewControllerScrollingStatusBar/UIViewControllerScrollingStatusBar-Info.plist";
396 | PRODUCT_NAME = "$(TARGET_NAME)";
397 | WRAPPER_EXTENSION = app;
398 | };
399 | name = Debug;
400 | };
401 | 6D86601D195A170D0008FE39 /* Release */ = {
402 | isa = XCBuildConfiguration;
403 | buildSettings = {
404 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
405 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
406 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
407 | GCC_PREFIX_HEADER = "UIViewControllerScrollingStatusBar/UIViewControllerScrollingStatusBar-Prefix.pch";
408 | INFOPLIST_FILE = "UIViewControllerScrollingStatusBar/UIViewControllerScrollingStatusBar-Info.plist";
409 | PRODUCT_NAME = "$(TARGET_NAME)";
410 | WRAPPER_EXTENSION = app;
411 | };
412 | name = Release;
413 | };
414 | 6D86601F195A170D0008FE39 /* Debug */ = {
415 | isa = XCBuildConfiguration;
416 | buildSettings = {
417 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UIViewControllerScrollingStatusBar.app/UIViewControllerScrollingStatusBar";
418 | FRAMEWORK_SEARCH_PATHS = (
419 | "$(SDKROOT)/Developer/Library/Frameworks",
420 | "$(inherited)",
421 | "$(DEVELOPER_FRAMEWORKS_DIR)",
422 | );
423 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
424 | GCC_PREFIX_HEADER = "UIViewControllerScrollingStatusBar/UIViewControllerScrollingStatusBar-Prefix.pch";
425 | GCC_PREPROCESSOR_DEFINITIONS = (
426 | "DEBUG=1",
427 | "$(inherited)",
428 | );
429 | INFOPLIST_FILE = "UIViewControllerScrollingStatusBarTests/UIViewControllerScrollingStatusBarTests-Info.plist";
430 | PRODUCT_NAME = "$(TARGET_NAME)";
431 | TEST_HOST = "$(BUNDLE_LOADER)";
432 | WRAPPER_EXTENSION = xctest;
433 | };
434 | name = Debug;
435 | };
436 | 6D866020195A170D0008FE39 /* Release */ = {
437 | isa = XCBuildConfiguration;
438 | buildSettings = {
439 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UIViewControllerScrollingStatusBar.app/UIViewControllerScrollingStatusBar";
440 | FRAMEWORK_SEARCH_PATHS = (
441 | "$(SDKROOT)/Developer/Library/Frameworks",
442 | "$(inherited)",
443 | "$(DEVELOPER_FRAMEWORKS_DIR)",
444 | );
445 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
446 | GCC_PREFIX_HEADER = "UIViewControllerScrollingStatusBar/UIViewControllerScrollingStatusBar-Prefix.pch";
447 | INFOPLIST_FILE = "UIViewControllerScrollingStatusBarTests/UIViewControllerScrollingStatusBarTests-Info.plist";
448 | PRODUCT_NAME = "$(TARGET_NAME)";
449 | TEST_HOST = "$(BUNDLE_LOADER)";
450 | WRAPPER_EXTENSION = xctest;
451 | };
452 | name = Release;
453 | };
454 | /* End XCBuildConfiguration section */
455 |
456 | /* Begin XCConfigurationList section */
457 | 6D865FE4195A170C0008FE39 /* Build configuration list for PBXProject "UIViewControllerScrollingStatusBar" */ = {
458 | isa = XCConfigurationList;
459 | buildConfigurations = (
460 | 6D866019195A170D0008FE39 /* Debug */,
461 | 6D86601A195A170D0008FE39 /* Release */,
462 | );
463 | defaultConfigurationIsVisible = 0;
464 | defaultConfigurationName = Release;
465 | };
466 | 6D86601B195A170D0008FE39 /* Build configuration list for PBXNativeTarget "UIViewControllerScrollingStatusBar" */ = {
467 | isa = XCConfigurationList;
468 | buildConfigurations = (
469 | 6D86601C195A170D0008FE39 /* Debug */,
470 | 6D86601D195A170D0008FE39 /* Release */,
471 | );
472 | defaultConfigurationIsVisible = 0;
473 | defaultConfigurationName = Release;
474 | };
475 | 6D86601E195A170D0008FE39 /* Build configuration list for PBXNativeTarget "UIViewControllerScrollingStatusBarTests" */ = {
476 | isa = XCConfigurationList;
477 | buildConfigurations = (
478 | 6D86601F195A170D0008FE39 /* Debug */,
479 | 6D866020195A170D0008FE39 /* Release */,
480 | );
481 | defaultConfigurationIsVisible = 0;
482 | defaultConfigurationName = Release;
483 | };
484 | /* End XCConfigurationList section */
485 | };
486 | rootObject = 6D865FE1195A170C0008FE39 /* Project object */;
487 | }
488 |
--------------------------------------------------------------------------------