Skip to content

Commit 1e41cc5

Browse files
Added pushpopheaderbar category on UINavigationController. Not going to use it yet though.
1 parent 9c6eb6e commit 1e41cc5

File tree

5 files changed

+80
-3
lines changed

5 files changed

+80
-3
lines changed

vinylogue.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@
129129
34A62DB416EBC73D0070AE95 /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = 34A62DB216EBC73D0070AE95 /* Icon-Small.png */; };
130130
34ABECD116FA6E01007BF46A /* LastFMObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 34ABECD016FA6E01007BF46A /* LastFMObject.m */; };
131131
34ABECD216FA6E01007BF46A /* LastFMObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 34ABECD016FA6E01007BF46A /* LastFMObject.m */; };
132+
34D83EB317009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D83EB217009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.m */; };
133+
34D83EB417009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D83EB217009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.m */; };
132134
/* End PBXBuildFile section */
133135

134136
/* Begin PBXContainerItemProxy section */
@@ -253,6 +255,8 @@
253255
34A62DB216EBC73D0070AE95 /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small.png"; path = "Images/application/Icon-Small.png"; sourceTree = SOURCE_ROOT; };
254256
34ABECCF16FA6E00007BF46A /* LastFMObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LastFMObject.h; sourceTree = "<group>"; };
255257
34ABECD016FA6E01007BF46A /* LastFMObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LastFMObject.m; sourceTree = "<group>"; };
258+
34D83EB117009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+TCSPushPopHeaderBars.h"; sourceTree = "<group>"; };
259+
34D83EB217009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+TCSPushPopHeaderBars.m"; sourceTree = "<group>"; };
256260
D7DEBAFFCE0A4706B44FA7D9 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
257261
/* End PBXFileReference section */
258262

@@ -519,6 +523,8 @@
519523
3454CBC416F7B02B00B74623 /* UIImage+TCSImageRepresentativeColors.m */,
520524
3454CBF816F8D25400B74623 /* UILabel+TCSLabelSizeCalculations.h */,
521525
3454CBF916F8D25400B74623 /* UILabel+TCSLabelSizeCalculations.m */,
526+
34D83EB117009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.h */,
527+
34D83EB217009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.m */,
522528
);
523529
name = Categories;
524530
sourceTree = "<group>";
@@ -749,6 +755,7 @@
749755
3454CBF216F8CFB700B74623 /* TCSAlbumAboutDetailView.m in Sources */,
750756
3454CBFA16F8D25400B74623 /* UILabel+TCSLabelSizeCalculations.m in Sources */,
751757
34ABECD116FA6E01007BF46A /* LastFMObject.m in Sources */,
758+
34D83EB317009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.m in Sources */,
752759
);
753760
runOnlyForDeploymentPostprocessing = 0;
754761
};
@@ -783,6 +790,7 @@
783790
3454CBF316F8CFB700B74623 /* TCSAlbumAboutDetailView.m in Sources */,
784791
3454CBFB16F8D25400B74623 /* UILabel+TCSLabelSizeCalculations.m in Sources */,
785792
34ABECD216FA6E01007BF46A /* LastFMObject.m in Sources */,
793+
34D83EB417009400002D8B0C /* UINavigationController+TCSPushPopHeaderBars.m in Sources */,
786794
);
787795
runOnlyForDeploymentPostprocessing = 0;
788796
};

vinylogue/TCSAppDelegate.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ - (void)quicktest{
3636
- (void)configureApplicationStyle{
3737

3838
// STATUS BAR
39-
// [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
40-
39+
// [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
40+
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
41+
4142
// NAVIGATION BAR
4243
[[UINavigationBar appearance]
4344
setBackgroundImage:[[UIImage imageNamed:@"navBarPatch"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// UINavigationController+TCSPushPopHeaderBars.h
3+
// vinylogue
4+
//
5+
// Created by Christopher Trott on 3/25/13.
6+
// Copyright (c) 2013 TwoCentStudios. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface UINavigationController (TCSPushPopHeaderBars)
12+
13+
- (void)pushBarVisibility;
14+
- (void)popBarVisibilityAnimated:(BOOL)animated;
15+
16+
@end
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//
2+
// UINavigationController+TCSPushPopHeaderBars.m
3+
// vinylogue
4+
//
5+
// Created by Christopher Trott on 3/25/13.
6+
// Copyright (c) 2013 TwoCentStudios. All rights reserved.
7+
//
8+
9+
#import "UINavigationController+TCSPushPopHeaderBars.h"
10+
11+
@interface TCSBarVisibilityObject : NSObject
12+
13+
@property (nonatomic) BOOL navigationBarHidden;
14+
@property (nonatomic) BOOL toolBarHidden;
15+
@property (nonatomic) BOOL statusBarHidden;
16+
17+
@end
18+
19+
@implementation TCSBarVisibilityObject
20+
21+
@end
22+
23+
@implementation UINavigationController (TCSPushPopHeaderBars)
24+
25+
- (void)pushBarVisibility{
26+
TCSBarVisibilityObject *obj = [[TCSBarVisibilityObject alloc] init];
27+
obj.navigationBarHidden = [self isNavigationBarHidden];
28+
obj.toolBarHidden = [self isToolbarHidden];
29+
obj.statusBarHidden = [[UIApplication sharedApplication] isStatusBarHidden];
30+
[[[self class] barVisibilityStack] addObject:obj];
31+
}
32+
33+
- (void)popBarVisibilityAnimated:(BOOL)animated{
34+
TCSBarVisibilityObject *obj = [[[self class] barVisibilityStack] lastObject];
35+
if (obj != nil){
36+
[self setNavigationBarHidden:obj.navigationBarHidden animated:animated];
37+
[self setToolbarHidden:obj.toolBarHidden animated:animated];
38+
[[UIApplication sharedApplication] setStatusBarHidden:obj.statusBarHidden withAnimation:(animated ? UIStatusBarAnimationFade : UIStatusBarAnimationNone)];
39+
}
40+
}
41+
42+
+ (NSMutableArray *)barVisibilityStack{
43+
static NSMutableArray *stack;
44+
static dispatch_once_t onceToken;
45+
dispatch_once(&onceToken, ^{
46+
stack = [@[] mutableCopy];
47+
});
48+
return stack;
49+
}
50+
51+
@end
52+

vinylogue/vinylogue-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<key>CFBundleSignature</key>
3535
<string>????</string>
3636
<key>CFBundleVersion</key>
37-
<string>695</string>
37+
<string>707</string>
3838
<key>LSRequiresIPhoneOS</key>
3939
<true/>
4040
<key>UIPrerenderedIcon</key>

0 commit comments

Comments
 (0)