UISearchController disappears when pushing a new UIViewController - ios

I'm currently working with an example from Raywenderlich: UISearchController-Tutorial (The finished project is at the end of their article or here) and I noticed that when I execute a search and click on one of the results, during the push transition, the UISearchController disappears. It's visible on this video: here
Before selecting a result
During the transition to the new VC
I run this example with Xcode 10, iOS 12 (sim: iPhone 8)
Any idea / pointer would be deeply appreciated
Cheers.

Its default in iOS12. Just look at the Apple-Mail App. There it is the same. Actually you dont need the searchbar, when you are showing another VC

Related

Xcode runtime error Could not load the "_IBBrokenImage_"

I am working on an app (Xcode 11.4, iOS 13) with several view controllers. While running on simulator or device, when I navigate to a specific VC, the debugger emits a:
"`Could not load the "_IBBrokenImage_" image referenced from a nib in the bundle with identifier ...`"
This particular VC does not have any images, just text in buttons, labels and a UITable. It does not trigger standard Swift or Exception breakpoints. Is there a specific Method iOS uses to pull image resources that I might try to trap this with? Alternatively, is there a different approach to finding the issue being complained about?
Thanks!
This happened to me when I updated to Xcode 11.4. For some reason, my UIBarButtonItem's image was set as Unkown Image in storyboard. I just had to initialize the image again.
Here is the answer (and if is due to buggy IB in Xcode 11.4):
Re-examination of the XML of the storyboard file revealed that Xcode had added,
on its own, a variation for RC (landscape) orientation. I didn't do it! The variation image was a random string, basically unassigned.
Also, the IB frequently complains that it can not compile by XML from time to time.
I think a new release of Xcode would be helpful!
VC3 -- click --> VC1 -- programmatically go to --> VC2
I got this error when app is going to another viewcontroller(VC2) too quickly (programmatically - in my case) before the current viewcontroller (VC1) has finished loading all of its images in nib. In my case, the app travels from VC3 to VC1 and from VC1 to VC2 continuously. So I had changed the app to go from VC3 to VC2 directly and the error has gone. I hope this will be applied to a similar situation.
I had this issue on Xcode 13.2.1 when I unselected 'Installed' on a view in XIB. Deleting the view (I no longer needed it) resolved the error for me.
Change the image to another run and see if it shows, then change it back to the previous image.

Empty line rendered in UINavigationBar with UISearchController in iOS 11

This is most likely to be an iOS bug, I've reported to Apple already (35410538) but I'd like to find a workaround to temporary fix it.
When you have an UITableViewController inside UITabBarController which is embedded by UINavigationController an empty line is rendered when scrolling. This happens on both simulator and device. the navigation controller has to be set to show iOS 11's large titles and have an UISearchController in it.
I've setup a sample project demonstrating it here.
Has anyone found a workaround to fill that line?
Thanks!

UINavigationController is Automatically popping to root view when device rotates

I currently have multiple views open as children to my navigation controller through the method navigation controller.push(). When you rotate the device it automatically goes back all the way to the root view controller, as if you called poptorootview().
I am wondering why it is doing this and how to stop this from happening. I have not modified UINavigationController class in any way.
Thank you!
In case anyone else is looking for any workaround .I had this really annoying issue in iOS 11.1 only but everything was looking good in iOS 10 and below.
Finally I got it fixed by updating my Xcode to 9.2 and the problem has been disappeard, still I have no idea what caused that, but it take 3 days to me to get rid of it!

How to use setHidesBottomBarWhenPushed correctly?

I used the setHidesBottomBarWhenPushed to hide tabBar when A viewController pushed to B viewController,but in the process ,the navigationBar displayed black background color and then became normal quickly.
I have spent a day to trying to solve this problem,but all ways not working.
Appreciating your help.
Thank you.
I just created a very simple "Tabbed Application" project like this.
Pust to viewController when clicked push barButtonItem,and the "Hide Bottom Bar On Push " property of viewController was checked in storyboard.
The result was :
I met the same problem while using old MacBook (about 2011 early) before. I think it is the render issue of the simulator while using some out-of-dated devices. But actually, when you run your code on real device (iPhone 5 above), this issue is unusual.

Swift UIPopover storyboard

I am getting started with Swift right now.
I am rebuilding an old app completely in Swift. It is an iPad-only app.
Right now I can't get UIPopover working.
I am trying to tie a button in a view(1) to another view(2) with segue "Present as Popover".
None of the elements I add to view(2) is shown in the popover in simulator. It is always a blank / white view.
Any help is appreciated!
Is this for iOS 8? If so, try using the "popover presentation" action segue.

Resources