How to turn iPhone style table view into iPad style table view (Swift) - ios

I apologise in advance if this is a really simple thing to do, but I have searched and searched for answers and cannot find anything anywhere.
I have made an iPhone app that has a similar sort of interface to the built-in iPhone Mail app. It has a table view, and when you tap on an item it segues to the corresponding document. When I build it for iPadOS it works in the same way, as you would expect.
But this isn't how iPad apps are supposed to look. I want my app to look like the Mail app does when running on an iPad, with the table view to the left of the content when in landscape, and the ability to slide it in when in portrait. I simply have no idea how to even get started though. If anyone can help, I'd really appreciate it! Thanks!

Related

Swift: implementing a new item dialogue like 'add alarm' in clock app

I want to implement an add new item dialogue in my app similar to add alarm dialogue in the clock app (screenshot). Prior to this moment I always used the same storyboard scene design for iphone and ipad with autolayout to make it look good on both devices. But I'm wondering how can I implement a view similar to Add Alarm dialogue - it looks very compact on both iphone and ipad especially because on ipad it's a separate small view that is not stretched across the screen. Can somebody please point me how to implement it? I don't really need the code, just some directions that can help me.
Found it in the apple documentation:
https://developer.apple.com/library/content/featuredarticles/ViewControllerPGforiPhoneOS/PresentingaViewController.html

Instagram pop up feature alike in swift

I was wondering if anyone have any idea how to work out something similar to Instagrams's feature that when you keep pressed a picture in a profile, it pops up until you release the screen. I have been looking around and haven't really found an answer. I was trying to work with popovers but they're not allowed in iphone and most of the alternatives use storyboards. Basically the difference from what im looking for and a popoverpresentation is that I want the new screen to cover most of the screen, not from it to come from the button itself, if that makes sense, while I have the screen pressed. So basically does anybody know how to do this in swift using no storyboards? Thank you!

Airplay route options popover

I'm having a problem with the airplay route options popover drawing too short on iOS 8, such that the user can't even tell that there are options other than iPad available. In the attached screenshot, there are actually two airplay speakers available. You can scroll down and select them, but I doubt most users would think to try that.
I inspected the view hierarchy to see if there was a view corresponding to where it was choosing to bound the popover, but didn't see anything interesting.
The same issue was posted in the apple developer forums, but doesn't have an answer: https://devforums.apple.com/message/1039783#1039783
This happens in both portrait and landscape mode, 100% of the time on an iPad 3rd gen running 8.0.2. Built with Xcode 6.
Let me know if more information would be helpful, and thanks in advance for any thoughts!
This appears to be an actual bug in iOS 8 apps built with Xcode 6. I created a test app and submitted it to apple as part of a Technical Support Incident. They examined it, credited us back the TSI and said they would track it as a bug. We also confirmed with another music application that they were seeing the same behavior.
Thanks Apple! Great job with that whole iOS 8 thing, it seems to be going swimmingly!
I don't have a fix, but I can make it about 2x better with this magic incantation:
[UITableView appearance].tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 10, 0.01f)];
The gray gap between the nav bar and the menu choices is caused by having a tableHeaderView set to nil, which I found from another SO question: Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7. Then, you set your prototype table view to have the workaround.
The risk here is that you could potentially screw up other table views in your app. I so far have not been able to find an appearanceWhenContainedIn magic that will select this broken audio route picker. But in my app at least, the tables are fine, because none of them had header views anyway.
(Note that the thing that says "Airplay" is a prototype UINavigationBar, so if you need to modify that, you can as well -- but only if you want to apply it to all the nav bars in your app! Again, I can't find an appearanceWhenContainedIn that works for me)

Show a view on main screen while the app is in background in ios

Thanks in advance.
Is it possible to show a capture screen like assistive touch view in ios when we click on application icon.Means i want to show the iPad screen and top on the with transparent background a view need to display.
I want to create an app like this after clicking the app icon i want a screen like this on my main screen and i can able to customize it and capture the selected area. is it possible to do that. and is there any api for that.
i don't think you are allowed to capture the home screen in public api. this question had similar request.
How can I take a screenshot of the iPhone home screen programmatically
UIGetScreenImage() mentioned in the answer is very useful, if you only targeting Jailbroken phones.
However, i found an open source library called "Record My screen", which claim can
Record the display even on non-jailbroken iPhones.
I personally didn't test that, since i believe Apple would somehow find that and pull the app off (that happened to several apps before). If you really interested in it, maybe you can learn something from that library.
Hope that helps you.

Recreating the iOS 5 Mail.app sidebar (iPad)

iOS 5's Mail app has a nifty little swipe gesture that brings up the sidebar in portrait mode. Now it seems like that gesture would be useful in other apps that use the master/detail layout, but as far as I can tell Apple hasn't released any sample code or documentation to show how the effect was created.
I've thought about how to replicate the effect in my own app but I'm not super experienced in view programming. Has anyone managed to recreate this effect in their own apps or would anyone know how to do so?
Here's a downloadable project that pretty well reverse engineers everything the Mail app is doing with its split view interface: https://github.com/mattneub/Programming-iOS-4-Book-Examples/blob/master/convertedToIOS5/p560p575splitViewNoPopover/p560p575splitViewNoPopover/MySplitViewController.m
Here you go: http://useyourloaf.com/blog/2011/11/16/mail-app-style-split-view-controller-with-a-sliding-master-v.html

Resources