|
|
|
@@ -118,6 +118,8 @@ using namespace juce; |
|
|
|
- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation duration: (NSTimeInterval) duration;
|
|
|
|
- (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation;
|
|
|
|
- (void) viewWillTransitionToSize: (CGSize) size withTransitionCoordinator: (id<UIViewControllerTransitionCoordinator>) coordinator;
|
|
|
|
- (BOOL) prefersStatusBarHidden;
|
|
|
|
- (UIStatusBarStyle) preferredStatusBarStyle;
|
|
|
|
|
|
|
|
- (void) viewDidLoad;
|
|
|
|
- (void) viewWillAppear: (BOOL) animated;
|
|
|
|
@@ -298,6 +300,15 @@ static void sendScreenBoundsUpdate (JuceUIViewController* c) |
|
|
|
juceView->owner->updateTransformAndScreenBounds();
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool isKioskModeView (JuceUIViewController* c)
|
|
|
|
{
|
|
|
|
JuceUIView* juceView = (JuceUIView*) [c view];
|
|
|
|
jassert (juceView != nil && juceView->owner != nullptr);
|
|
|
|
|
|
|
|
return Desktop::getInstance().getKioskModeComponent() == &(juceView->owner->getComponent());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // (juce namespace)
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
@@ -339,6 +350,16 @@ static void sendScreenBoundsUpdate (JuceUIViewController* c) |
|
|
|
MessageManager::callAsync ([=]() { sendScreenBoundsUpdate (self); });
|
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL) prefersStatusBarHidden
|
|
|
|
{
|
|
|
|
return isKioskModeView (self);
|
|
|
|
}
|
|
|
|
|
|
|
|
- (UIStatusBarStyle) preferredStatusBarStyle
|
|
|
|
{
|
|
|
|
return UIStatusBarStyleDefault;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) viewDidLoad
|
|
|
|
{
|
|
|
|
sendScreenBoundsUpdate (self);
|
|
|
|
@@ -991,13 +1012,15 @@ bool UIViewComponentPeer::canBecomeKeyWindow() |
|
|
|
//==============================================================================
|
|
|
|
void Desktop::setKioskComponent (Component* kioskModeComp, bool enableOrDisable, bool /*allowMenusAndBars*/)
|
|
|
|
{
|
|
|
|
[[UIApplication sharedApplication] setStatusBarHidden: enableOrDisable
|
|
|
|
withAnimation: UIStatusBarAnimationSlide];
|
|
|
|
|
|
|
|
displays->refresh();
|
|
|
|
|
|
|
|
if (ComponentPeer* const peer = kioskModeComp->getPeer())
|
|
|
|
if (ComponentPeer* peer = kioskModeComp->getPeer())
|
|
|
|
{
|
|
|
|
if (UIViewComponentPeer* uiViewPeer = dynamic_cast<UIViewComponentPeer*> (peer))
|
|
|
|
[uiViewPeer->controller setNeedsStatusBarAppearanceUpdate];
|
|
|
|
|
|
|
|
peer->setFullScreen (enableOrDisable);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
|