I'm developing an iOS 10 app using NavigationController and Storyboards. I'm having a difficult time to figure out whats going on with a strange - as I'm calling it - bug:
When I navigate to a new ViewController, it show's nicely, but when the app unwind a segue, the top view controller doesn't go all the way to the right, instead, it left's about 50 points on screen, and then suddenly it goes away...
I'm putting a image that illustrates what I'm talking about...
PS: both ViewControllers uses UIImageView as background...
Thanks a lot!
Please share the code where you are setting the fame for the view(s). It could possibly be an offset that is being added. Though, you do mention that it does go away suddenly, so it could be something else.
Related
I want to segue between my view controllers the same way Apple's Clock app segues between the World Clock, Alarm, Bedtime etc. They just appear instantly, and most important of all, it doesn't instantiate new instances of the different parts (e.g. the Stopwatch and Timer keeps going after segueing).
I'm trying to prevent using a Navigation Controller, because I don't want a back button or anything to appear. I just want buttons that segue you to the other parts of the app without stopping timers etc.
If anyone could point me in the right direction in regards to this, I would appreciate it very much.
Maybe you want to use a UITabBarController?
See https://developer.apple.com/library/content/documentation/WindowsViews/Conceptual/ViewControllerCatalog/Chapters/TabBarControllers.html
apple is using a UITabBarController over there
you can use that
Im a little bit curious : I wondered how did Apple made the transition from the home screen of the Find My iPhone app to the detail controller. I need to use this kind of transition for my app, but I'd like some insights before digging in.
When you move the view or select a device, it actually pushes a detail controller (without animation) but there is no transition on the mapView and no delay on the map tiles. My guess is that they should use a single instance of the MKMapView and move it along between the controllers, but maybe there is another way.
Any idea how would you do that?
Thanks.
I'm pretty new to iOS and created a standard show detail segue. Now it works but the result is a bit choppy. I navigate from a UITableViewController to a ViewController but the animation kind of just 'keeps hanging' half way trough.
I've tried making a screen cap of it:
But since the capturing software is also a bit crappy the entire .gif is choppy.
The choppiness occurs about halfway trough the animation and continues just a moment after. Is this standard behavior? Or am I doing something wrong?
The navigation is as follows:
From UITableViewController - Show (e.g. push) segue -> UIViewController
Looks same as in this question While pushing a viewcontroller there is a jerk in animation Unfortunately, it not solved yet. Pretty sure this can be simulator issue\bug. I had same issue with collectionView scrolling (lags on simulator) but it works well on device (even on slow one).
I'm working on an iPhone app and have the strangest issue.
On iOS 6, buttons on the navigation bar are completely ignoring taps in the top half. Have a look at the image below, I have roughly selected tap areas of my navbar buttons:
https://www.dropbox.com/s/izs6ic5jlubm1yk/navtap_problem.png
Here's some, potentially useful, information:
the app supports iOS 6 and 7
the app is not using autolayout (working with deltas instead)
this issue is present only on iOS 6, it's working fine on iOS 7
the issue is present in all views across the app (that have a navigation bar on top)
the issue present in both navigation bars that are manually added in IB as well as in navigation bars that are coming from the UINavigationController
the problem is not present if I directly start the app from one of affected view controllers
the problem is present when I start the app through my empty InitialViewController and load another VC
I'm using ECSlidingViewController and loading the real VC (that users will see) from the InitialViewController like this:
self.topViewController = [self.storyboard instantiateViewControllerWithIdentifier:#"SearchSplitViewNavigationController"];
[self resetTopView];
It looks like something invisible is covering the top half of the navigation screen. I checked the contents of self.view.subviews, but didn't see anything there.
Any ideas what might be causing this? Or what else could I check?
If you are including any element programmatically, then that element isn't using the deltas you are including through the storyboard.
For these elements you must test for the iOS version you're in and adjust the delta in code.
Check this: Best Way to check for iOS 7 or earlier? for help on the version checking.
I've found a solution (not the cause though). This awesome library helped me a lot to identify the problem.
There was actually a transparent UIView sitting on top of my navigation bars. It was located at 0,20 and had a height of 20 points.
That view is not in the self.view.subviews array, but doing [self.view bringSubviewToFront:myNavigationBar] seems to do the trick...
I have an UISplitViewController in a TabbarController, it works fine until I left the SplitView in portrait mode and change in my other view to landscape and go back to my splitview tab.
After that my controller try to call willPresentViewController and this fails with
2012-11-08 10:08:27.047 app[77747:c07] *** Assertion failure in -[UIPopoverController _incrementSlideTransitionCount:],
/SourceCache/UIKit_Sim/UIKit-2372/UIPopoverController.m:510
I thought it happened because the splitview didnt rotate when I came back.
I tried this control https://github.com/grgcombs/IntelligentSplitViewController but it didnt work either.
I can resolve it a bit but I have the problem now that the master in landscape is always black when I rotate in the kind I described.
The whole "leave tab, rotate, come back to tab" can be a pain because inactive tabs don't get the rotation events.
In the past I have used two different ways to solve the issue:
Create a custom sub-class of the UITabBarController which forwarded rotation events to UIViewControllerseven if they were not the active tab.
Have the UIViewController which needs to know about rotations use the NSNotificationCenter and register for the event UIDeviceOrientationDidChangeNotification
Which one I used really depended on how many of my tabs needed to track that information. If 1 tab needs the info, #2 is probably the direction to head, but if 4 out of 5 need it, then #1 is probably the way to go.