Prevent UISplitViewController Master View from hiding (iPad iOS 4.x) - iphone

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.

Related

Swift 3 - UISplitViewController - Hide/Expand Master View in Landscape (e.g. Notes App)

Just started with Swift and would like to replicate some functionality present in the standard Apple 'Notes' app. Specifically the Expand button that appears in the Details View when on iPad in landscape mode.
i.e.
The closest I have come (as a simple quick solution) is to add the following into AppDelegate:
splitViewController.preferredDisplayMode = .primaryOverlay
However although this allows for toggling the Master View in landscape orientation (similar to the default portrait behaviour), it is done with the Master View as a popover/overlay. I however would prefer the behaviour present in the Notes app in that the Master View slides in/out (without overlaying the Detail View).
Edit: also interested in how to only show the corresponding button only in Landscape mode while on iPad.
Any help would be greatly appreciated! Thanks
splitViewController.preferredDisplayMode = .allVisible
This should do the trick. It makes the Master View slide in and out when toggling to fullscreen mode.

Have segue push animations really changed in iOS 7?

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.

Is it possible to share view controller between iPhone and iPad storyboards?

Is it possible to share view controller between iPhone and iPad storyboards?
For example in classic master-detail application we could use same master table view on ipad and iphone. How can I do this?
upd:
I want completely reuse view controller, for example for master table view we would have table view layout, visual setup, autolayout settings, IBOutlets connections, cells visual setup and outlets connections and so on. I don't want to do this twice because layouts usually are too complex and manual editing is error-prone. Is it possible?
Yes, it is possible to use the same view controller for both iPhone and iPad (storyboards). Just keep in mind the difference (e.g. there is no master-detail feature on iPhone), and make sure to trigger device specific functionality only on that particular device ...

Strategy for developing Universal IOS application

I have an iPhone application available in appstore.
Now i would like to develop Universal version of the same app.
The iPad version of the current application will be the same. Just screens will be adapted for iPad size. The behaviour won't be changed due to device type.
My question is below:
In iPhone version, there is a page which displays hotel list.
The controller class is:
HotelListViewController.m
HotelListViewController.h
the xib is: HotelListViewController.xib
Now which is best practice for making same page of iPad:
Option 1:
Just creating HotelListViewControlleriPad.xib
and using same HotelListViewController.m and .h
Option 2:
Creating HotelListViewControlleriPad.xib
creating HotelListViewControlleriPad.m and h
thanks.
You need to go by option 1, as only view differs so you need to have different xib for iPhone and iPad.
If in your controller, there is certain view related stuff then you can handle that stuff conditionally.
You can check this thread also for some interested related discussion - How to develop an universal app for iPhone + iPad without xib files?
Either go for option 1 or use the same xib and view controller class as in iPhone but make the view controller a child view controller of the full screen view controller on iPad (for example using split view controller or a custom container view controller).

Iphone dev - Multiview app with storyboard

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!