Getting a black screen using the SWReveal Controller - ios

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.

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.

Sporadic black screen when performing segue in iOS 9.2.1 / XCode 7.2

Upvoters: can you let me know if you've seen this problem as well?
The issue I'm seeing occurs roughly every 1 in 15 times when I try to modally launch a view controller from a button on a certain scene.
This is done with iOS 9.2.1 and XCode 7.2, though it is not clear which versions it happens on. It's not easy to change the iOS version down.
The symptoms are as follows:
The destination view controller is not visible on the phone. Instead, the top bar (the one with the carrier) goes black, and sometimes it flickers so the whole screen is completely black. The launching view controller is visible, but not responsive.
When this happens, I go to the XCode screen and do view debugging. Remarkably, this shows the destination screen, almost as it's supposed to look. The only difference is that one of the views has not done its drawRect, and one of the other views looks all speckled. But of course it does not at all correspond to what the phone is showing.
The cancel button on the destination screen seems to still work, because when I press where it's supposed to be, the app continues to function. If I try to relaunch the screen with the button, it again doesn't work though. So once this has happened, the screen has stopped working for that session and the app needs to be killed and restarted.
There are not many hints, but this information may help:
There's 3 scrollviews containing views on the destination screen. All three child views have their own drawRect. It turns out one of the drawRects is not called when the error occurs, resulting in the grey background being shown. The speckled view does run, but I have no clue why it looks like that in view debugging.
No warnings in XCode. Nothing about NSLayout constraints or presentations overlapping.
Two fields are set on the destination view controller on the prepareForSegue function.
The segue is launched from the times button by way of the storyboard. There's no missing or extra outlet, and it is named correctly for the prepare function to catch it.
The issue is sporadic, but will reliably occur if you launch/cancel many times in a row.
Here are the screen grabs. I won't show you the black screen. It's just black with the carrier and the time.
I've solved it. Checking the memory usage turned out to be quite useful.
The grey area was supposed to be filled by a large background with lines drawn. It turns out the naive implementation of drawBackground causes the memory size to balloon to over 200MB. I replaced it with a CSTiledLayer, and now it takes a few MB instead.

iOS UINavigationController loading to white screen but app is running

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.

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.

Rotations issues in ios6 - black screen

I found several problems with rotations in ios6 using iPAD...all of us...I resolved mostly all of them using the new method shouldAutorotate and shouldAutorotateToInterfaceOrientation. But in one of the views is not updating properly the rotation. You can see (more or less) what happen:
The top images describes the behaviour from landscape to portrait...if I change the rotation of my app in other different of the first image, and come back to the first tab, the app doesn't update properly the view in portrait.
The bottom images describes what happen when I am comming from portrait to landscape...in the last screen I can the half of the screen completely black.
My level in iOS is really basic I will like some tips...what do you think which could be the problem? because in other tabs is not happen of the same app it is not happen.
If you need a piece of code, let me know...thank you!
Try this:
https://github.com/alexth/TBSV
Sample how to have NavigationBar, TabBar and SplitViewController in one project with correct looking transitions between orienations
Thanks for your reaction (ironic). I've discovered what was the problem with the rotation only in a particular screen of my app. The problem is that the one that built the app before me, used one UISplitViewController inside of a UITabBarController. This mix of ViewController, in iOS 6 bring a bunch of problems, specially with the rotations. After thousands of tries, I found this link and it is solved.
UISplitViewController inside UITabBarController in iOS6:
http://objectiveseesharp.wordpress.com/
That's all.
Should I change the title of the question?

Resources