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
10
votes
1 answer

How can Window from Object Library in Interface builder be used

I've been doing iOS developement for a while but never used or seen someone using the Window object. I tried googling about it but I did not found any relevant articles. I know about 'UIWindow' object and how it can be used from code. So what can be…
Jelly
  • 4,522
  • 6
  • 26
  • 42
10
votes
6 answers

Dismiss all UIAlertControllers currently presented

Is there a way to dismiss all UIAlertControllers that are currently presented? This is specifically because from anywhere and any state of my app, I need to get to a certain ViewController when a push notification is pressed.
David
  • 7,028
  • 10
  • 48
  • 95
10
votes
3 answers

What is the purpose of UIWindow?

I've always seen references to an app's 'window', and I see that AppDelegates usually have a UIWindow property called 'window'. So I'm just wondering how to perceive this UIWindow object. I see that it's a subclass of UIView, so I guess technically…
hgwhittle
  • 9,316
  • 6
  • 48
  • 60
9
votes
4 answers

Is it possible to use full screen in Mac Catalyst?

Porting a game to macOS Catalyst, but window is quite small. Is it possible to start in full screen instead?
Lim Thye Chean
  • 8,704
  • 9
  • 49
  • 88
9
votes
8 answers

How to add view in UIWindow?

I wanted to add a view in UIWindow with following code: AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate; UIWindow *window = delegate.window; UIView *aView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 100,…
Prajeet Shrestha
  • 7,978
  • 3
  • 34
  • 63
9
votes
5 answers

iOS 7 UI Transition issue: Touch events ignored at bottom of screen

I'm currently fixing an issue in an old app (built in the days of iOS 5) where button touch events are ignored at the bottom of the screen. I am able to recreate this issue by creating a new project, deleting the storyboard (and the reference in the…
Felix Khazin
  • 1,479
  • 2
  • 10
  • 16
8
votes
2 answers

How to use multiple iOS custom view controllers without a navigation controller

I am building an app that uses multiple types of screens--all which warrant their own custom view controllers. I am successfully switching between view controllers and their related views by reassigning the main window's rootViewController with a…
GarlicFries
  • 8,095
  • 5
  • 36
  • 53
8
votes
4 answers

How to disable screen Recording in iOS app

Is there any way to disable the screen recording? or is is possible through a configuration profile? or any third party library is available?
Alok Maurya
  • 127
  • 1
  • 2
  • 9
8
votes
4 answers

Putting a UIView or UIWindow above Statusbar

My goal is to draw an invisible button above the status bar on the top of my iPhone app (dimension 320*20 pixels). No matter what I try, something is buggy: For example, I tried to create a new view. When I want to place the view on the top of my…
andreas
  • 7,844
  • 9
  • 51
  • 72
8
votes
7 answers

Height and width on iPhone (/iPad)

This is just a test application, There is only a AppDelegate class to create all I did was create a Window based app, set the supported orientations to only the landscape in the info.plist, and then add the following code: -…
Jonathan.
  • 53,997
  • 54
  • 186
  • 290
8
votes
2 answers

iOS9: Custom UIWindow makes status bar disappear

When I create a custom UIWindow in iOS9, the window becomes visible on the screen, but the status bar suddenly disappears. When the window becomes hidden, the status bar appears again. Below, 2 screenshots of what I get on iOS9 with Xcode7…
Runo Sahara
  • 715
  • 8
  • 23
8
votes
4 answers

Detect android webview

I have an html-javascript page, and I need to detect whenever it open on web view (Like inside facebook webview, twitter webview, etc.), and if it a webview - display another content. Note: I do not control the third-party Android apps, so I cannot…
Megi Ben Nun
  • 405
  • 3
  • 6
  • 20
8
votes
2 answers

UIWindow frame in ios 8 different from ios 7 in Landscape

I've create simple module where I add subview to UIWindow. In simulator ios 7(Xcode 5.1.1) I have printed self.windows and I get: ; layer =…
edzio27
  • 4,126
  • 7
  • 33
  • 48
7
votes
2 answers

UIView subview of UIWindow doesn't rotate

I'm adding a UIView to a UIWindow that's not the keyWindow. I'd like the UIView to rotate when the device rotates. Any special properties on the window or the view I need to set? Currently the view is not rotating. I'm aware of the fact that only…
SundayMonday
  • 19,147
  • 29
  • 100
  • 154
7
votes
1 answer

UIWindow not visible on top of Storyboard

I have a UIWindow object that I have want to show on top a Storyboard. That I made like this - UIWindow *webWindow = [[UIWindow alloc] initWithFrame:CGRectMake(0, 20, 320,480)]; webWindow.windowLevel = UIWindowLevelAlert; I am making it…
arank
  • 221
  • 3
  • 10