Questions tagged [uiwindow]

The UIWindow class defines objects (known as windows ) that manage and coordinate the windows an application displays on the screen.

In iOS, windows and views are used to present application’s content on the screen. Windows do not have any visible content themselves but provide a basic container for application’s views. The two principal functions of a window are to provide an area for displaying its views and to distribute events to the views. The window is the root view in the view hierarchy. A window belongs to a level; the windows in one level appear above another level. For example, alerts appear above normal windows. Typically, there is only one window in an iOS application.

649 questions
35
votes
4 answers

Convert a UIView origin point to its Window coordinate system

I want to get the origin of scrollView in the window coordinate system. For Example, presently, scollView origin is (0,51). But in window coordinate system it should be 51 + 44(navigation bar height)+20(status bar height) = 115. Means in window…
Nishit
  • 591
  • 1
  • 6
  • 17
32
votes
3 answers

Passing touches between stacked UIWindows?

I have two windows -- a front one, and a back one. The front one is used to overlay some stuff on top of the back one. I want to be able to capture touches on some parts of the front window, but not others; I want the front window to receive…
Anna Dickinson
  • 3,307
  • 24
  • 43
31
votes
5 answers

iPhone - UIWindow rotating depending on current orientation?

I am adding an additional UIWindow to my app. My main window rotates correctly, but this additional window I have added does not rotate. What is the best way to rotate a UIWindow according to the current device orientation?
aryaxt
  • 76,198
  • 92
  • 293
  • 442
31
votes
4 answers

subclassing UIWindow while using storyboards

I have same issue as explained in this question: Where can I change the window my app uses from UIWindow to my own subclass "MyWindow" with storyboard? My question is how do i implement a 'window' getter method in my app delegate that returns…
izaslavs
  • 403
  • 4
  • 12
27
votes
3 answers

View on top of everything: UIWindow subview VS UIViewController subview

In order to make a UIView on top of all views like the behavior of UIAlertView, the best way I see is by putting it in the app window, which is by adding the view to: [[[UIApplication sharedApplication] delegate] window] However, the downside I…
Zian Chen
  • 510
  • 1
  • 5
  • 11
26
votes
1 answer

Whats a key window in Objective-C Cocoa?

What is a key window? And what is it used for? I read its used for "key input";but could someone expand on this? An example would be appreciated.
fdh
  • 5,256
  • 13
  • 58
  • 101
25
votes
4 answers

How to disable long touch in UIWebView?

I want to disable long-touch from the application. I have no control on the HTML that I am loading on my WebView.
Alex Terente
  • 12,006
  • 5
  • 51
  • 71
25
votes
5 answers

Changing the rootViewController of a UIWindow

When my app first loads, I set the rootViewController property of my UIWindow to controllerA. Sometime during my app, I choose to change the rootViewController to controllerB. The issue is that sometimes when I do a flip transition in controllerB,…
aloo
  • 5,331
  • 7
  • 55
  • 94
25
votes
1 answer

UIWindow endDisablingInterfaceAutorotationAnimated: error

I'm receiving the following error when a user is in MFMailComposerViewController and presses the Home button: [UIWindow endDisablingInterfaceAutorotationAnimated:] called on > without matching -beginDisablingInterfaceAutorotation. Ignoring. I have…
Maddy
  • 251
  • 3
  • 4
23
votes
3 answers

Is it possible that an iOS application can have more than one window?

I have been asked this question many times in the interview searched every where didn't get any proper answer.So finally posting this question here.
Bharat Bhushan
  • 409
  • 4
  • 15
22
votes
5 answers

Making a button persistent across all view controllers

I want to have a persistent button in the bottom right corner of my app. During all view transitions, the button should remain static. I'm having trouble deciding what view to add the button to. I know the button ought to be stored in the…
D-Nice
  • 4,772
  • 14
  • 52
  • 86
21
votes
4 answers

UIStatusBarStyle changes after displaying a UIWindow over UIStatusBar

I am displaying a UIWindow over the UIStatusBar, by default the UIStatusBarStyle is set to UIStatusBarStyleLightContent, but when I display the UIWindow the UIStatusBarStyle switches to the black style.
David Gölzhäuser
  • 3,525
  • 8
  • 50
  • 98
21
votes
4 answers

makeKeyAndVisible & makeKeyWindow - uiwindow in iphone

In every application, there is always written as [window makeKeyAndVisible]; What is mean by makeKey?
sagarkothari
  • 24,520
  • 50
  • 165
  • 235
18
votes
3 answers

Resize a UIView to allow space for ad unit

I am trying to add an ad unit above a subclass of UIView RCTRootView. This would move the RCTRootView down about 50px. This is my current attempt. RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation …
Patrick
  • 1,410
  • 2
  • 19
  • 37
18
votes
6 answers

UIWindow with wrong size when using landscape orientation

I have an empty application and there is no storyboard or xib involved. I want to have a hidden status bar and support only landscape orientation. Again, I wan't to make those changes only within code and don't touch the Info.plist. Problem I create…
Joa Ebert
  • 6,565
  • 7
  • 33
  • 47
1
2
3
43 44