Airplay route options popover - ios

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)

Related

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

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!

All iOS screen size compatibility?

New to iOS developing here. Basically I am creating a soundboard app. I have the app essentially working (aka buttons returning sounds).
However my app only looks proper on the iPhone 6. I just have one ViewController in my main storyboard. When I run the simulator for the 4S/5/6+ or iPads, my buttons are pretty much everywhere.
I tried playing with size classes/autolayout through Apple's documentation, but couldn't get it working properly. What's the best (easiest ;) ) route I can follow to have it basically looking the same on ALL devices?
PS: I have one background placed too, I don't mind if it looks different on all devices since it's pretty minimalistic, but if someone can shed some light here too, that would be great.
Thanks!
You have a few options:
1) Continue your plan spending time getting friendly with Auto Layout and Size Classes. This might be difficult at first, but it will really pay off later. You should use the Assistant Editor's Preview mode to let you see iPhone 4, 5 and 6 side-by-side as you work so you can make sure your layouts look great everywhere.
2) Use a component like UIStackView where layouts are automatically adjusted to fit various devices. If your soundboard is as simple as a grid of buttons, you can do that in just a few minutes using a stack view.
3) Use a component like UITableView or UICollectionView where content is designed to scroll. Using this method you design only one sound button of your app (i.e., enough to play one sound) then have iOS replicate that across all the sounds you want. When your interface is presented on a device of a different size iOS will just make the content scroll.
Very roughly, option 1 makes you do all the work; option 2 makes your layout shrink down until it fits the available space; and option 3 makes your layout stay the same size no matter what, but you should expect it to scroll on some devices.
There is no right solution; it's entirely down how you want your app to work.

iPhone App not showing up properly on iphone 6 simulator

My app works good on iphone 4s, 5 , 5s simulators. On iphone 6,it shows up weirdly. It does not occupy the entire screen
What could be the issues?
if you are using the Auto resizing just under stand the concept for example
assume that u have a book self , u need to layout the book in the book self so u need to do the following steps
initially arrange the book self (this is your main View).
arrange the all books in inside the book self where u need the location (this is your subview, buttons, labels, all UI Elements).
u keep to follow the above two steps in always. got it
need reference follow the apple tutorial
this tutorial may also help u
The black view is an added view? If the goal is just to set the background color, better to just set the color of the root view.
If you're not using autoLayout (and I don't reccomend it, it's more trouble than it's worth in most cases) one simple to handle different screeen sizes is programatically.
Everything in the view in Interface Builder needs to be an outlet.
in -viewDidLoad, set the center of each view. For example, to center the mobile number text: [self.enterYourMobileNumberLabel setCenter: CGMakePoint(self.view.center.x, self.enterYourMobileNumberLabel.center.y)]
You could also set the frame for more percise handling, etc., using margin constants. Frames are often more code and more cumbersome, but AutoLayout is a nightmare.
Resolved the issue. Thanks for your valuable responses users.It has got nothing to do with Autolayout or autoresizing.
Just go to images.xcassets, right clicking in the navigator area, add launchImage. Then select your project (or target), go to general-->App Icons and Launch images and set Launch Images Source as Launch Image and most importantly, set Launch Screen file blank.
The app would now work well in iphone 6 simulator too.

Where do I get the iOS toolbar icons for up/down arrow?

I'm looking for these button icons,
, that I found in the Apple developer's guide for working with toolbars (almost half way down the page, but I can't find them in the storyboard.
I found a bunch of other icons in the storyboard for images, as shown here on the right, and I expected they would be there but they weren't.
Where do I get all these icons that Apple suggests I use? I would really like to use the up/down arrows for casting votes in my app.
Specifically, where can I get all of the images found in this guide
(source: apple.com)
They are not available. They're just a list of icons they have developed for iOS as a showcase. You should look into making them yourself and applying them as a UIButtonTypeCustom. Small drawback is that if the iOS style changes (like iOS6 -> iOS7) you need to manually update your custom buttons while the rest is automatically upgraded.

iOS Human Interface Guidelines: Picker Control on iPad without Popover

I am planning to use a couple of picker controls and segmented controls (as a kind of control panel) embedded in a container view controller to control the contents of a second child view controller. However, according to Apple iOS Human Interface Guidelines, on an iPad a picker may not be presented in the main screen and must be presented in a popover:
On iPad, present a picker only within a popover. A picker is not
suitable for the main screen.
How strict is this rule?
Would it be ok in my case to have the picker on the main screen in order to provide the required interactivity?
Clearly the answer to your question really depends on Apple, not on anything we developers might think or say. Your screen design looks very reasonable to me, but the issue is really whether Apple will approve it.
It might be better to ask if anyone has had an app approved with pickers outside of popovers.
Alternatively, you could ask if anyone has had an app rejected for using Pickers outside popovers.
Apple rules and common sense have a high degree of overlap, but where they differ the only thing that matters is Apple. Either ask them, or just submit your app for approval and see.
Good luck!
Here is my experience regarding picker.
I had an app (say appAA) approved, which use picker view in a modal view, three pickers, one followed by another.
I had another app (say appBB) which basically copies the modal view of appAA. This app was rejected because of a functional problem which I could not reproduce. I debuted in Resolution Center, then the reviewer rejected again with additional reason, saying the pickers are not presented in popover!
I guess I have to put the pickers into the popover if I want appBB to be approved since the review mentioned so.
I think the answer is simply How ugly does it make the UI look?
The left/right edges of the picker were originally intended to be flush with the edge of the iPhone screen (and it was hardcoded to be 320px wide, which failed to work sensibly in landscape mode). On the iPad, the UIPopover lets it be flush with the frame. The obvious way to achieve this effect without using a UIPopover is to draw your own frame, instead of leaving a flat grey background between the pickers.
However, the easiest (and better looking, IMO) solution is to take the picker background (as a 1px-wide image) and use a UIImageView to stretch it behind all the pickers so they look like part of a continuous bar. Remember to check both retina and non-retina versions.

Resources