[TIMOB-8500] iOS: NavBar moves out of place on video player #1972

Merged
merged 3 commits into from Apr 13, 2012

2 participants

@vishalduggal

Test is in JIRA

@sptramer sptramer commented on an outdated diff Apr 12, 2012
iphone/Classes/TiMediaVideoPlayerProxy.m
@@ -875,14 +871,15 @@ -(void)handleThumbnailImageRequestFinishNotification:(NSNotification*)note
}
}
--(void)handleRotationNotification:(NSNotification*)note
+-(void)resizeRootView:(id)unused
@sptramer
sptramer added a line comment Apr 12, 2012

Should not take an argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sptramer sptramer commented on an outdated diff Apr 12, 2012
iphone/Classes/TiMediaVideoPlayerProxy.m
@@ -907,14 +903,9 @@ -(void)handleFullscreenExitNotification:(NSNotification*)note
[event setObject:NUMBOOL(NO) forKey:@"entering"];
[self fireEvent:@"fullscreen" withObject:event];
}
- if (hasRotated) {
- // Because of the way that status bar visibility could be toggled by going in/out of fullscreen mode in video player,
- // (and depends on whether or not DONE is clicked as well) we have to manually calculate and set the root controller's
- // frame based on whether or not the status bar was visible when we entered fullscreen mode.
- [[[TiApp app] controller] resizeViewForStatusBarHidden:statusBarWasHidden];
- [[[TiApp app] controller] repositionSubviews];
- }
- hasRotated = NO;
+ [[UIApplication sharedApplication] setStatusBarHidden:statusBarWasHidden];
+
+ [self performSelector:@selector(resizeRootView:) withObject:nil afterDelay:0.3];
@sptramer
sptramer added a line comment Apr 12, 2012

Constant is a magic number and must either be documented, named-defined, or explicitly calculated via a method. Use of hardcoded values such as these in the past for animation/rotation purposes has led to synchronization issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sptramer

Code reviewed, please address comments.

@sptramer

Code reviewed, APPROVED.

@sptramer

Functional tested, iPhone Sim 5.1 and iPad Sim 5.1.

TIMOB-1526: Passed
TIMOB-3876: Passed
TIMOB-8500: Passed

APPROVED

@sptramer sptramer merged commit 863891c into appcelerator:master Apr 13, 2012
@vishalduggal vishalduggal deleted the unknown repository branch Oct 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment