Commit 5d752352 authored by Carola Nitz's avatar Carola Nitz

resize playbackController according to orientation

parent 8b206ed6
......@@ -329,6 +329,22 @@
_viewAppeared = YES;
}
- (void)viewWillLayoutSubviews
{
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
CGSize viewSize = self.view.frame.size;
if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) {
[_controllerPanel setFrame:CGRectMake(0, viewSize.height - 55, viewSize.width, 55)];
[_repeatButton setFrame:CGRectMake(8, 16, 32, 35)];
[_audioSwitcherContainer setFrame:CGRectMake(48, 12, 40, 40)];
} else {
[_controllerPanel setFrame:CGRectMake(0, viewSize.height - 90, viewSize.width, 90)];
[_repeatButton setFrame:CGRectMake(18, 54, 32, 35)];
[_audioSwitcherContainer setFrame:CGRectMake(20, 14, 40, 40)];
}
}
}
- (void)_startPlayback
{
if (_playerIsSetup)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment