iOS UINavigationController loading to white screen but app is running - ios

I'm developing an app with a single ViewController. When I run the app, it goes to that default LaunchScreen that is included when you start the file, and then proceeds to the ViewController. Everything is fine, it loads and does everything it's supposed to, which includes some audio feedback.
From my storyboard then, I've clicked on the existing ViewController and then Editor -> Embed In -> Navigation Controller. Navigation Controller appears, the Storyboard reflects the Navigation Bar on both screens, and the Navigation Controller has "Is Initial View Controller" checked. Great.
Now, however, if I run the app, the LaunchScreen goes and then a blank white screen follows. No navigation bar, none of the original interface. However, I still get my audio feedback - the app is running just fine.
So what's going on?
Let me know if there's anything you'd like to see (code, screenshots, etc.).

I was using PixateFreestyle to style some elements. At some point it seems I had rather heavy-handidly added:
view {
background-color:#ffffff;
}
Which covered the views nested in the root view controller. Figured it out when I noticed copying my classes to another project resulted in the same issues and started commenting out chunks. Took out the Pixate initialization and regained my view.
Thanks to everyone who offered help. If nothing else, I learned more about debugging iOS apps.

Related

Present a view controller just before the UIDocumentBrowserViewController to be shown at launch

Here are the facts: I have a document based app using iOS 11's UIDocumentBrowserViewController. And as noted in the documentation, I set it as my root view controller:
Always assign the document browser as your app's root view controller. Don't place the document browser in a navigation controller, tab bar, or split view, and don't present the document browser modally.
I have an animated launch screen in another view controller and in an usual app, it is the root controller. But here it can't be...
So my problem is that I can't achieve the smooth transition between the launch screen and the animated splash view controller.
I've tried to perform the segue unanimated to the splash in the viewWillAppear and in the viewDidLoad of the browser view controller... But between the launch screen and the splash screen, I have a glimpse of 1 second or two on the browser...
I even tried to present it over the browser view controller inside the applicationDidFinishLaunching but I have the same result...
So if anyone has a clean way of doing it, I'm interested. I would not like ending by inserting savagely views over the browser, if you see what I mean. 🤔
Thanks in advance.
Please watch the Managing Documents in your iOS apps WWDC session tomorrow. This restriction is about to get lifted. You can present the document browser modally full-screen over your splash screen, as long as you do not dismiss it afterwards (it needs to be at the "root" of your app for usability reasons). Don't forget to release any memory used by your splash screen once you present the browser.
However, I think a cleaner design would be to present your splash screen over the browser in viewWillAppear, as you suggest. If that doesn't work, could you please file a bug at bugreport.apple.com? Thanks.

Apple Watch: Status bar not visible after presenting a modal screen from page based navigation

When i present a modal screen from a page in page based navigation, the whole screen shifts up and the status bar is no longer visible.
Here is a gif of the issue:
I am using xCode 6.2 version.
This was not happening in xCode 6.2 Beta 4..
I am not sure if this is a simulator issue or this will actually happen on a real device too.
Does anyone have the same issue? Is there a workaround?
I reported a bug to apple (20109240) and it was marked as a duplicate of (19862945), and that one is still open.
Thanks in advance
This is a known issue in the final release that exhibits itself in two cases:
When presenting a second modal controller (paging or single) over an existing paging modal controller
When presenting a menu using Force Touch over a paging modal controller
This has been discussed in the Apple Developer Forums, and the only workaround I've heard about is one that I use in my app. Unfortunately, there's no simple code to share that solves the problem, so I'll describe the approach (which I'd consider messy, but workable).
First, you need to keep track of interface controller presentations. I have a framework for this, but you may have to roll your own. When a child interface controller has its willActivate called two times in a row (in other words, without a call to a different child interface controller) you can assume that a modal was presented/dismissed on top of it.
Your presenting/parent controller can then inform all children that the modal menu bug has happened, and those child controllers can unhide a replacement status bar with its own Cancel/Close button. With some work, you can recreate a pixel-perfect version of the standard status bar with identical behavior.
The final twist is to detect when your Watch app is suspended, then resumes. In that case, willActivate is also called twice. If you don't handle that situation, you'll end up unhiding the replacement status bar and have two on the screen simultaneously. Not a great scenario.
Getting this right is very tricky, but it does work. I just wish I had a simple code sample that you could inject.
Update: I pushed some of my workaround code to GitHub: https://github.com/mikeswanson/JBInterfaceController

Getting a black screen using the SWReveal Controller

I am having an issue with a black screen appearing on my app using the SWReveal Controller. I had it going fine with a view controllers set up and behaving as expected, not sure what has changed to cause this. The initial splash screen displays then straight to a black screen. I have tried reseting the simulator and readding the intially controller but it seems to get upset when I reconnect the segues to the relevent views.
Any direction on this would be great. I don't want to redo the app; I’d rather figure out the root, in case this happens on another app further down the development life-cycle.
Follow this link.
http://samwize.com/2015/03/25/setting-up-swrevealviewcontroller/
You have to set front & rear view controllers.

Presenting a second UIWindow causes the whole app to become unresponsive (on ios7)

So I'm trying to present a "modal view" that still shows the "presenting" view below as you will see in the GIFs below.
I am creating a UIWindow which I simply show over the "main" window. I'm retaining them both in my window manager class and it also does some simple animations.
It works well on the simulator, iOS8 and built with iOS8 SDK. It looks like this:
But when I open it on my actual device it doesn't work so well. See the GIF below.
Here's whats happening
The first presentation works well, animates the presenter and shows the modal. User activity is working.
The second presentation works 50%. The modal is shown, but the presenter does not animate. User activity working well.
The third presentation does not work at all, at this point the whole app is unresponsive, no taps/buttons/swipes are working
The NSLogs appears to have correct values.
Any ideas?
It appears changing [presentedWindow makeKeyAndVisible] to [presentedWindow setHidden:NO]; is solving my problem. I think I understand why but if someone comes in with a nice explanation I'll mark it as the answer.
EDIT The above was not the solution. It appears that I can present and dismiss it as long as I don't open the keyboard in-between.

How to make the landscape view look same as the portraitView while using a splitViewController?

What I meant is, When we use a UISplitViewController project
In portrait mode, whole window will be covered by the view and a popoverController will be presented to navigate to other views. In landscape mode, 40% of the window will be covered by a tableView using which we can change the view/page. And navigation button as well as popoverController will be hidden.
What I want is,
Even in landscape mode, it should be like portrait mode. No tablewView should be there. Whole window should be covered with the view in landscape mode. For navigating to other pages, a navigation button as well as the popoverController should be there.
How can I do this?? Plz help me...
Login to your developer account, goto dev forums and search for "UISplitViewController settings.app". there's lots of talk about that there. The summary is you can't do it though that controller apparently has some private features which make it possible (file a bug report telling apple they should expose that capability). There is a long discussion about building a splitview controller from scratch that mostly works this way. Alternately, rethink your design.

Resources