Porting an iPhone app on iPad to make a universal app - ipad

i have a similar question about UIActionSheet on iPad, actionnaly i have an iPhone app that i want to port on iPad, for the xib there is no problem the auto-Resizing is doing it very well, but for the UIActionSheet and the alertViews that i'm using to call UIDatePickers i have troubles, the first problem is the alertView: it displays only in portrait mode it doesn't rotate with the view (perhaps i could replace it with PopOverController?) the second problem is the UIActionSheet containing the UIDatePicker, when i'm on the iPad simulator it shows me a little empty rectangle inspite the UIDatePicker What should i do to port my UIActionSheet on iPad? i'm waiting for your help Thank you very much

In both cases it seems like a UIPopOverController seem appropriate. The main difference is that the UIPopOverController expects a viewController to control it. Beyond that, it's implementation is similar to both an actionSheet and an alertView.

Related

How to present actionSheet in iPhone style on iPad on iOS13?

Some background to understand the question better:
On iOS 12 on iPad when I was using .actionSheet as a type for UIAlertController, it is shown as a popover. Also it was required to set a sourceRect and sourceView, otherwise it would crash.
But. When I would present such an alert in the ViewController that is presented as a formSheet/pageSheet/popover, then the alert wouldn't require the sourceRect/sourceView and would be presented as a iPhone style action sheet (but not as a popover as it should be on iPad). It looked like this:
What happened with iOS 13:
On iOS13 this behaviour changed. The above case now is crashing and requiring the sourceRect/sourceView as it normally happens for iPads. Meaning even if the alert is presented in the formSheet/pageSheet/popover VC, it will still require the sourceRect/sourceView and now it will be presented as a popover (but not iPhone style action sheet).
Question:
I will appreciate a lot if someone knows how to keep the alert presentation in the same actionSheet style (but not popover) for such cases, as it was before on iOS 12.
Update: apparently this issue started to appear with iOS13.2 (not 13.0)
The desired behaviour is not possible since iOS 13.2 anymore.

UISplitViewController - Use as slideout-style menu

I'm struggling a bit with the new UISplitViewController in iOS 8.
I want to achieve a slideout-style menu on iPhone (landscape and portrait) as well as on iPad in portrait orientation and a persistent sidebar on iPad in landscape orientation.
I got a UITableViewController as the master and a UINavigationController with a couple of UIViewControllers as the detail in my SplitViewController.
Is it possible to to get something like this with the new UISplitViewController in iOS 8?
First it would be enough the get the iphone sliding thing to run :D
Thank you :)
The UISplitViewController will do just that. Sliding menus and everything.
It works like a dream if you use it exactly by the book. And this requires setup of some UINavigationControllers as part of the magic.
Tutorial is highly recommended for the first time. It's easy to get it messed up quickly otherwise. :)
http://nshipster.com/uisplitviewcontroller/
By default, the UISplitViewController in iOS8 will only act as a slideout-style menu on the iPad (in both portrait and landscape mode) and iPhone 6+ (in landscape mode only).
As to whether or not it is possible to get the slideout-style menu working on all iphones via the splitViewController, I don't actually know (I'm still new to iOS development). I suspect that it entails modifying how the splitViewController treats different size classes. If there isn't an easy way to change the splitViewController's behavior, perhaps you could subclass the splitViewController and override the functionality that you do not like.
I have not tried this before, nor do I actually know how the controller determines how it is displayed in different size classes. However, if I were trying to accomplish what you are, then this is what I would be looking up.

Present Popover iOS 8 storyboard

I am making an iOS 8 app, and I like to use the storyboard whenever possible.
My problem is very simple, I want to make a simple popover view that appears when a user clicks a button entirely from storyboard!
When the user taps on "ADD" the popover is displayed.
So I did that:
It works on iPad:
but on iPhones (anyone) it displays the popover on fullscreen.
But I thought that the new popover system works on iOS 8 (my deployment Target is iOS 8)
Someone knows why?
Thank you in advance.
And sorry for my English.

How to Convert iPhone app to support iPad

I have existing iPhone app. Now i want it to give support for iPad app i Followed the below link (Converting Storyboard from iPhone to iPad). After implementing the suggestions given by tharkay. I run the app in iPad only Navigation bar coming properly but all components(like buttons, labels)are not resizing those are coming as iPhone size.
Can anybody help me to solve the problem?
Under your Project->Targets->General->Deployment Info make sure that in your iPad tab the right Main Interface is selected (it's your iPad storyboard name).
Use autolayout to setup the constraints on the UI Elements so that they can respond appropriately to different screen size like in your case iPad. Check out this link !
http://www.raywenderlich.com/50317/beginning-auto-layout-tutorial-in-ios-7-part-1

UIBarButtonItem in UiToolbar not responding to touch, only in ios7 portrait mode

I'm updating an existing app for iOS7. The app uses a UIToolbar with two UIBarButtonItem's, one on the left, the other on the right.
The left UIBarButtonItem works as expected. The right UIBarButtonItem does also, except in landscape orientation on iOS7. It works fine in iOS6 (all orientations), and in portrait mode (only) in iOS7. I'm seeing this in both the simulator and on my iPad mini.
The button is obviously correctly bound to a segue (since it usually works), and I have confirmed that it is enabled even when it is not working. (My view controller has an update timer, and I log the state on every tick.)
Has anybody else seen something like this? Any ideas?
TIA,
Doug K;

Resources