diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index 40cd3a8b47..45f3b8df42 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -480,7 +480,7 @@ UIViewComponentPeer::UIViewComponentPeer (Component& comp, const int windowStyle view = [[JuceUIView alloc] initWithOwner: this withFrame: r]; view.multipleTouchEnabled = YES; - view.hidden = ! component.isVisible(); + view.hidden = true; view.opaque = component.isOpaque(); view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent: 0]; view.transform = CGAffineTransformIdentity; @@ -515,11 +515,10 @@ UIViewComponentPeer::UIViewComponentPeer (Component& comp, const int windowStyle window.rootViewController = controller; [window addSubview: view]; - - window.hidden = view.hidden; } setTitle (component.getName()); + setVisible (component.isVisible()); Desktop::getInstance().addFocusChangeListener (this); }