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.

627 questions
15
votes
1 answer

After rotation UIView coordinates are swapped but UIWindow's are not?

Using Xcode 4.2.1 iPad iOS 5.0.1, create a new "Single View" iPad project. In the controller, add: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } - (void) dumpView: (UIView *) view { …
verec
  • 4,634
  • 3
  • 31
  • 39
15
votes
3 answers

Why is AppDelegate.swift window an optional?

I was reading Apple docs, when I found this sentence: The AppDelegate class contains a single property: window. var window: UIWindow? This property stores a reference to the app’s window. This window represents the root of your app’s view…
user5273262
14
votes
7 answers

Capturing full screenshot with status bar in iOS programmatically

I am using this code to capture a screenshot and to save it to the photo album. -(void)TakeScreenshotAndSaveToPhotoAlbum { UIWindow *window = [UIApplication sharedApplication].keyWindow; if ([[UIScreen mainScreen]…
Umair Khan Jadoon
  • 2,740
  • 11
  • 38
  • 55
14
votes
1 answer

Where can I change the window my app uses from UIWindow to my own subclass "MyWindow" with storyboard?

I've got a universal project here with storyboard. I've created a subclass of UIWindow called MyWindow, and I need to load it instead of the default UIWindow. Prior to storyboard, I would simply go to the .XIB file in XCode and change the class for…
thebro
  • 305
  • 2
  • 11
14
votes
2 answers

App called -statusBar or -statusBarWindow on UIApplication

I'm trying to build my app with Xcode 11 beta 6 and iOS 13 beta 8 but it throws this error once it starts to run: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App called -statusBar or -statusBarWindow on…
Lukas Würzburger
  • 6,207
  • 7
  • 35
  • 68
14
votes
1 answer

The app delegate must implement the window property if it wants to use a main storyboard file

I'm programmatically implement a list view controller. When I try to run the project, I got error: 2012-11-07 22:46:34.719 myTableViewControl[12021:c07] The app delegate must implement the window property if it wants to use a main storyboard…
max
  • 645
  • 3
  • 11
  • 21
13
votes
1 answer

How did Vesper show users wallpaper without UIApplicationIsOpaque key?

An app named Vesper was updated for iOS 7 and shows the user's wallpaper on iOS 7. I have found that using UIApplicationIsOpaque key and UIBackgroundStyleLightBlur can show the users background but will not pass validation. Vesper passed validation…
Maximilian Litteral
  • 2,989
  • 1
  • 26
  • 40
12
votes
1 answer

makeKeyWindow vs makeKeyAndVisible

What is the difference between makeKeyWindow and makeKeyAndVisible which are two methods of UIWindow ? When will a UIWindow be a keyWindow but will not be visible?
allenlinli
  • 1,704
  • 3
  • 19
  • 46
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,182
  • 5
  • 24
  • 40
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
  • 6,652
  • 9
  • 40
  • 77
9
votes
5 answers

Set rootViewController iOS 13

After upgrading Xcode a critical part of my application has stopped working. When my app launches I run a function to check boolean flags and set the correct rootViewController. But the code I have been using to set this has now stopped…
Oliver Ferris
  • 331
  • 1
  • 3
  • 16
9
votes
4 answers

Xcode 11 beta: AppDelegate file doesn't have window global variable

I am facing an issue in Xcode 11 beta. The problem is that I am not getting default window variable declared in AppDelegate file. Is anybody facing this same issue?
Rashesh Bosamiya
  • 499
  • 5
  • 12
9
votes
3 answers

Manually Created UIWindow is Wrong Size

I am learning how to create an iOS app without Interface Builder (i.e. storyboards, xibs, etc.). Below is the basic app delegate class I am working with. The problem is that when displayed the UIWindow does not use up the full screen of the device…
macinjosh
  • 5,581
  • 9
  • 45
  • 69
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,272
  • 3
  • 29
  • 51
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,448
  • 1
  • 10
  • 16
1 2
3
41 42