UISegmentedControl works on iPhone but not iPad? - ios

I use a UISegmentedControl, with 2 segments that spans the width of the screen.
This works as expected on iPhone. Tapping cat mode switches the highlight to cat mode, and the appropriate functions take place. However, on iPad, tapping Cat Mode does nothing. No highlight switch, no functions. If I start the highlight on Cat Mode, the same thing happens in reverse (all good on iPhone, Dog Mode can't be selected on iPad).
I use obviously one storyboard for both iPhone and iPad with Autolayout, and I'm not varying anything related to this segmented control for traits, so I have no clue what's going on. All other functions perform properly on iPhone and iPad.
Please let me know if I can provide additional info to help solve this question.
Thanks!

There was a Google Ad Banner blocking it. View debugger helped me see that. Thanks #matt for the suggestion to try it.

Related

Safari IOS Having clickable elements at top of screen doesn't work very good with landscape on Iphone

I have this app that has a bar at the top of the page that has a bunch of clickable elements it has always been a problem since on Safari IOS when clicking high up it brings down the address bar and exits fullscreen. We solved this initially by adding some padding up top to make the clickable area larger but they seem to have increased this size on IOS 13 and adding more padding will make it look horrible. Anyone had this problem and have a workaround for it?
Some way the click area for bringing down the address bar smaller or something?
The big problem is that we need our app to stay in fullscreen so the most optimal would be to be able o decrease the clickable area for the address bar to come down or to be able to block it in landscape mode is there really no way to go around this? for instance going into twitch.com on safari and iPhone and put it in landscape you are not able to press the search icon.
I have the same issue, I don't think is possible to fix this as it seems to be a safari issue, if you check not event apple.com site works as expected.
The workaround I did is detecting when the app gets out of fullscreen by comparing the screen.height with the screen.availHeight and move the top bar just below the address bar and there users can click, not optimal, but works for us. :)
Hope it helps
In your CSS code try to remove every value of "REM" "VW" "VH" use only pixels "PX". that should fix the issue 100%.

iOS simulator does not display TextFields correctly

I was designing a login screen for an app. The screen itself is pretty simple. In the Storyboard editor I see:
When I run it on a simulator (iPhone 6s Plus), however, things do not seem right. The textfields do not appear:
If I click into the area where the textfield is supposed to be, I can see it is really there:
I think the issue might end up being just the display, but I want to make sure. Has anyone else had this happen? What was the reason for this issue?
You have set the UITextBorderStyle of your text fields to None. That means they have no visible border. If that isn't what you want, pick a different border style.
Evidently, the border was there, the display was so low quality that I couldn't really see it :/

iphone simulator only shows the background images not the labels and text box, why is this?

This is a simple iOS mobile app exercise. I have a image as a background, and then the labels and text box are added. I run the simulator and it shows correctly. but after a while I run the simulator again, the simulator only shows the background image, the text box and labels are not there anymore. I restart writing everything many time and the same thing happen at some point. This is driving me crazy. Did anyone know what is going on here??? Thank you so much in advance for your help!!!
if you done with story board than your object must be in right order.
Right/Proper Way
Wrong Way
I supposed you drag all button, label,text box objects in the storyboard. All the thing are supposed to disappear if you do not used any Layout stuff. Please try AutoLayout.
Or if you write the code to show your label in viewDidLoad(), please add the objects to your subview as self.view.addSubview(yourObjects).

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.

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)

Resources