I have just changed my app to iOS 7 only, and noticed that the Push Segues have changed their animation.
Previously 2 viewControllers animated in/out side-by-side, at the same speed.
But now, the incoming viewController animates quicker, over the top of the slower, outgoing segue.
I cannot find this change reported anywhere. Is it really a change in the OS, or is my app being weird!
Thanks in advance.
The appearance of the navigation view controller’s push animation has changed between iOS 6 and iOS 7: as you’ve noticed, there’s now a sort of depth/parallax effect to the animation. You can see it for yourself in any of the system apps that use a navigation controller, e.g. Settings.
Related
I have seen some tutorials about iphone development, but they're before ARC and before storyboard it seems.
The guy creates a switch that will switch between two views.
A class with a blue background, and a class with a red background.
How would you do this in IOS5 with storyboard?
I've heard about segues, but they get a 'back' button, which the guy in the tutorial didnt get - he simply changed between views my tapping the switch/button.
You better go through this tutorials to understand how to develop app in IOS 5. The tutorials, which you have already seen are for ios4 and prior to it. Also you can use those in IOS 5 too. But Storyboard is much easier than XIB.
http://www.techotopia.com/index.php/IPhone_iOS_5_Development_Essentials
http://www.techotopia.com/index.php/Using_Xcode_Storyboarding_%28iPhone_iOS_5%29
Anyway #dew given you the correct answer.
You need to add 2 View Controllers into your storyboard and then embed in navigation controller. After you create some button in one view, you just gotta ctrl-drag it to the other view and select push, that should do it. Or simply chech out this tutorial http://maybelost.com/2011/10/tutorial-storyboard-in-xcode-4-2-with-navigation-controller-and-tabbar-controller-part1/ :)
I would highly suggest watching the first 2 or 3 lectures of Stanford's CS193P introductory iPhone programming course. It's free and will start you off on the right foot. It's also targeted for iOS5 and Xcode 4. Check it out at:
http://itunes.apple.com/itunes-u/ipad-iphone-application-development/id473757255
To answer your question, moving between view controllers is usually done using a container controller or pushing view controllers 'modally'. I would suggest reading the View Controller Programming Guide put out by apple for an overview of how these things work.
In iOS5 you can use storyboards to set-up segues (as you suggested). They don't always 'give you a back' button, only when you segue between view controllers within a navigation controller. You can have a button push a view controller onto a screen by setting up target-action.
Again, the iTunesU lectures will cover all this. Check it out!
I tap a tab bar item, which triggers poptoRootViewControllerAnimated. Most of the time it works as expected, but in some cases it pops to the correct view, but the navigation item is out of sync, "stuck" from the view i previously was at.
I've read about people having this problem with iPad's, when in landscape mode, but the solutions I've found don't work in this case. This is an iPhone app in portrait mode.
Happens with the simulator as well as on an actual iPhone. If someone has a suggestion or solution i'll be a very happy man!
Turns out that the different iOS versions handle this differently. This only occured on the older versions, so we had to rebuild the stack manually there.
do you get any message in the console like
nested push animation can result in
corrupted navigation bar
and
Finishing up a navigation transition
in an unexpected state. Navigation Bar
subview tree might get corrupted.
if yes take a look at these few answers...
but what they all basically mean is you are trying to pop from the navigation controller too early, probably before it is properly loaded...
All worked fine in iOS 3.x on the iPad to prevent the Master view of the UISplitViewController from hiding. I created a method SizeControls() that was called whenever the device rotated (WillAnimateRotation event).
Now with iOS 4 on the iPad this no longer works. While the SizeControls is called something is still causing the Master view to be hidden. What do I need to do so that on both iOS 3 and iOS 4 I can have both Master and Details views appear just like in the Settings UI?
Thank you.
Take a look here, apple recommends you show the master view in a popover when in portrait.
If thats not a goer take a look at MGSplitViewController. Its a very nice split view which gives you this functionality for free.
I am looking for the best approach to mimic the iPod application on the iPhone/iPod Touch. Specifically, I want to mimic what happens when the iPod player (when a track is actually played) shows up. The iPod application starts as a tabBarController with every tab holding a navigationController. However, when a track is played, the entire tabBarController is replaced by a new viewController.
What is the best approach for this kind of UI? At first, I thought the tabBarController needed to be added to a separate navigationController, but this resulted in two navigation bars (one on top of the other).
Any advice is welcome. Cheers.
Use the hidesBottomBarWhenPushed property. Your controller will stay within your existing navigation-controller hierarchy (unlike fluchtpunkt's solution), and the tab bar will automatically hide and show itself when your player controller appears and disappears.
you want to present the new viewcontroller as a modal vc.
- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated
My app has 4 tabs. All the view controllers support rotation, and indeed are rotated when I rotate the device. For one of the view controllers, I need to reposition some of the subviews upon rotation. I do this in willRotateToInterfaceOrientation of that view controller, and it works fine.
The problem comes when I switch to a different tab, then rotate the device, then go back to the original tab. It apparently has not received the rotation notification, since willRotateToInterfaceOrientation has not been called. So it seems as though only the "active" view controller gets notified that the device has rotated.
The question: how do you get all the view controllers (controlled by a TabBarController) to rotate?
Unfortunately this is a bug in iOS 3.x. It works fine in iOS 4.x. I've seen apps that manually keep track of orientation changes and then do the rotation manually for inactive viewcontrollers. Sucks.
Looking through the iOS 3.2 docs to make sure this works, there is a viewControllers property in UITabBarController. Try something like this:
for (UIViewController * viewController in tabBarController) {
// Do stuff here with each 'viewController'.
}
I recommend that you do something with the UIViewController's -shouldAutorotateToInterfaceOrientation: method but you may have another way in which you plan on achieving the rotation.
You should also check for the interface orientation in viewWillAppear method of the controller whose subviews frame you are changing.Because when you move to the new tab and rotate the device and now when you tap another tab the viewWillAppear method will we called and there you can change the frames accordingly.
I also faced the same problem which i sorted out using this approach