Skip to content

Commit 012fbff

Browse files
author
Jordan Morgan
committed
Merge pull request #28 from bufferapp/task/put-close-btn-on-top
Ensure close button stays on top of subviews
2 parents 19d09c9 + b468ac8 commit 012fbff

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: BFRImageViewController/BFRImageViewController.m

+6-5
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ - (void)viewDidLoad {
7070
if (self.shouldHideStatusBar) {
7171
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
7272
}
73-
74-
//Add chrome to UI now if we aren't waiting to be peeked into
75-
if (!self.isBeingUsedFor3DTouch) {
76-
[self addChromeToUI];
77-
}
7873

7974
//Setup image view controllers
8075
self.imageViewControllers = [NSMutableArray new];
@@ -98,6 +93,11 @@ - (void)viewDidLoad {
9893
[[self view] addSubview:[self.pagerVC view]];
9994
[self.pagerVC didMoveToParentViewController:self];
10095

96+
//Add chrome to UI now if we aren't waiting to be peeked into
97+
if (!self.isBeingUsedFor3DTouch) {
98+
[self addChromeToUI];
99+
}
100+
101101
//Register for touch events on the images/scrollviews to hide UI chrome
102102
[self registerNotifcations];
103103
}
@@ -111,6 +111,7 @@ - (void)addChromeToUI {
111111
self.doneButton.frame = CGRectMake(20, 20, 17, 17);
112112

113113
[self.view addSubview:self.doneButton];
114+
[self.view bringSubviewToFront:self.doneButton];
114115
}
115116
}
116117

0 commit comments

Comments
 (0)