uiwindow

UIStatusBarStyle changes after displaying a UIWindow over UIStatusBar

跟風遠走 提交于 2020-01-12 06:35:07
问题 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. 回答1: I came across this topic while struggling with the same problem. What you have to do is create a new view controller and set it as the root view controller of your UIWindow (that is the UIWindow that you are displaying over your other view). Then, in this new view controller implement

Putting a UIView or UIWindow above Statusbar

只谈情不闲聊 提交于 2020-01-09 18:22:08
问题 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 app, it always disappears behind the status bar instead of being in front of it! I found another great idea on Stackoverflow: Add UIView Above All Other Views, Including StatusBar Even if a second UIWindow isn't recommended, I tried to implement it.

DidFinishLoading view change

孤人 提交于 2020-01-07 03:19:47
问题 I have a login screen view and 5 tabs in the app.I want when I done with the LoginScreen and it should move to the Tabs views(5) .for this once Login Task is done,I have to remove the view and add the another view controller of the tab..how to do this... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.viewController = [[ViewController alloc]

How to create an App using the Single View App template where the main window does not rotate but the rest does?

倖福魔咒の 提交于 2020-01-05 05:29:07
问题 How to create an App using the Single View App template where the main window does not rotate but its rootViewController and everything else autorotates? Apple does that on CIFunHouse but because the code is poorly explained in that matter, it is impossible to know how they did it. If you run the app you will see that the camera's preview window does not autorotate because the preview was added to the window but everything else does. Apple uses this technique on their native iPad camera app.

UIWindow frame in ios 8 different from ios 7 in Landscape

此生再无相见时 提交于 2020-01-02 02:18:28
问题 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: <UIWindow: 0x8db1670; frame = (0 0; 768 1024); autoresize = W+H; gestureRecognizers = <NSArray: 0x8db1a70>; layer = <UIWindowLayer: 0x8db17d0>> but on ios8 (Xcode 6 beta 6) I get: <UIWindow: 0x794320d0; frame = (0 0; 1024 768); gestureRecognizers = <NSArray: 0x79437a80>; layer = <UIWindowLayer: 0x7943c400>> The question is: why there is a difference in frame

“Application windows are expected to have a root view controller” conditional appearance

旧时模样 提交于 2019-12-31 04:09:28
问题 I'm writing an app for iPhone using Xcode 4.5 and iOS6. I'm also creating a new UIWindow to be able to manage the area of the status bar (to display messages there, etc.) I'm using storyboards and my appDelegate method looks like this: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { return YES; } The message does not appear in the console when I put it in the method called viewDidAppear : - (void)viewDidAppear:(BOOL)animated { if

Why is main window of type double optional?

隐身守侯 提交于 2019-12-27 23:36:40
问题 When accessing UIapplication's main window it is returned as a UIWindow?? let view = UIApplication.sharedApplication().delegate?.window // view:UIWindow?? Why is it returning as a double optional and what does it mean and if put into a if let should I add one ! after it? if let view = UIApplication.sharedApplication().delegate?.window! My first though was to replace ? with a ! after delegate but that was not the solution. 回答1: @matt has the details, but there is a (somewhat horrible, somewhat

Orientation in a UIView added to a UIWindow

心已入冬 提交于 2019-12-27 16:23:19
问题 I have a UIView which is supposed to cover the whole device (UIWindow) to support an image zoom in/out effect I'm doing using core animation where a user taps a button on a UITableViewCell and I zoom the associated image. The zooming is performing flawlessly, what I haven't been able to figure out is why the subview is still in portrait mode even though the device is in landscape. An illustration below: I do have a navigation controller but this view has been added to the UIWindow directly.

Custom UIwindow not display

跟風遠走 提交于 2019-12-25 23:16:14
问题 I'm trying to create a new window for Custom alert on rootViewController. - (void)viewdidAppear { UIWindow *newWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; newWindow.windowLevel = UIWindowLevelAlert + 1.0f; newWindow.backgroundColor = [UIColor redColor]; newWindow.hidden = NO; UIViewController *vc = [[UIViewController alloc] init]; vc.view.backgroundColor = [UIColor blueColor]; newWindow.rootViewController = vc; [newWindow makeKeyAndVisible]; But the newWindow not

Window for an External Display affects primary screen

别来无恙 提交于 2019-12-25 04:31:45
问题 I create a new window when there is an additional screen (up to 2). Each window shows a different content, in a different screen. The problem is under iOS7: Creating and showing this external window makes the status bar visible in the first one, which is also the main one. Then, the system adds some space (20points) to rearrange the top bar and some views. It does not work for me, because it's a custom bar. Why is this happening and how may I stop the system to add the status bar? This is the