I've recently updated my project for iOS 10 and now the buttons on the bottom of the screen don't work in the ipad simulator. Other buttons in the app work while in the ipad simulator and all of the buttons work on all of the other simulators. Tried searching around for this problem but didn't find anything so I'm pretty stumped.
Edit:
Buttons that aren't working are "Bet High", "+", "-", "Bet Low". You can click them and tell they are clicked by the animation but the action linked to the buttons aren't getting called. Clicking the ad works too
screenshot
Edit #2:
Now I feel stupid. After poking around with NSLog I found that the iPad Pro (9.7 inch) simulator thought it was a 3.5 inch display so it was using my storyboard for 3.5 inch displays which didn't have those buttons hooked up to their corresponding actions (still weird though as each storyboard was duplicated from my original storyboard for the 4.7 inch display which had everything hooked up when duplicated)
*face palm
Check the UI like storyboard, buttons and so on. You can try rebuild the button again. If the problem still happen again, copy the sample code from internet like Apple Developer and check your code. You can also the your simulator and run it again.
Related
Currently attempting to convert an iPhone application to also work on the iPad. I am running into an issue where the buttons all the way on the right, do not work when clicked on the iPad. It looks like since the buttons are shifted more to the right than on the iPhone, they no longer become clickable. Buttons to the right work fine on the iPhone. Buttons to the left work fine on both systems. Any help on correct setting to fix this issue would be appreciated. Attached is a sample button that does not work:
If I missed writing something or need more detail, please let me know.
Environment: Xcode 8.2.1, Objective-C (Not using swift)
So I'm doing the Ray Wenderlich tutorials on iOS, and I'm doing the button tutorial. When I run the app, I get something that looks like this:
I have two questions:
I often see simulators show up in the form of an actual iPhone and was wondering if that was possible, or if that rectangle is the only way to view it?
The reason I'm asking is when I connected the button to an action (It says 'Pressed!'). So, is it supposed to show up in the box (bottom right) only, or should it should up on the simulator itself- mimicking what the user would see on-screen?
Regarding your first question: Probably a problem with screen size. See also here How can I restore the iPad frame around iOS Simulator 5.1?
The output seen in the screenshot is produced with NSLog and won't be seen on the device. You need to add an UILabel or such and set its text.
In the Simulator menu, try selecting Window then Scale and go to 50%. The retina models are far too big on my screen. Also, the old iOS 6 simulator with standard iPhone did look like a real phone, so examples from a while ago will look different.
If you want to support iOS 6.x, you can load it into Xcode. From Xcode main menu, select Xcode and then Preferences, and go to the Downloads tab.
In Xcode my UIButton is centered and locked in the right place using the grids but when I run the app I'm building from a tutorial I'm following the button is slightly to the right.
Is there a quick fix for this other than shifting the button to the left in Xcode until it's centered in simulator which is pointless because the guides in Xcode are there to help so I'd like to take advantage of them and not need to do this.
Make sure you have unchecked the use Autolayout option for your Xib.
if is horizontal centered image, try like this:
ps: make sure that the parent view of the UIButton is also centered in the screen
After updating XCode I realised the issue was that XCode was launching ios simulator for 3.5inch iphone. I changed the device to iphone 4inch retina and this fixed the issue.
Firstly, I'm French so; sorry for the english mistakes, I hope you'll understand my problem. I've only been working on iOS apps 3 months, maybe I havn't got all iOS development concepts.
I have an app correctly running on device and simulator using iOS 5 but when I try it on a iOS6 device or simulator I have a weird situation. A black bar appears at the top of the screen between the navigation bar and my tableview.
I did some research, others have the same problem but, what solved their problem didn't work for me.
See: Black bar between navigation bar and table view appears on iOS 6
I'm facing this problem since I upgraded my xcode version to 4.5 and the iOS6 SDK. See the following screenshots of the simulator, firstly running iOS6 then iOS5. The weird thing is that the black bar is here just after the application is launched. If I changed tab (obviously viewcontrollers are switched) then the black bar is no longer present.
I try to change the first viewController by switching the element of my tabBar but the same situation appears even if I put the tab called "Tendances" in first. The black bar is on this view but not on the others.
I have made these screenshots on the iphone 3 simulator but using iphone4 or 5 simulator or a real device didn't resolve my issue.
Screenshot 1: I launch the application on a iOS6 simulator. You may see that the black bar is betwen the navigation bar and the tableView header.
Screenshot 2: I'm still running the same app on the same simulation (iOS6), I decided to switch tab, using the tabBarController. The black bar disappear.
Screenshot 3: I go back to the first tab then there is no black bar...
Screenshot 4: I closed the simulator running iOS6 for another running iOS5. I launched the app then as you may seen there is no black bar.
I had the exact same problem: when first launching the app / this tableviewcontroller (mine is a fetchedresultscontroller, just to be more clear), the navigation bar would shrink in height and a black bar would appear in between the navigation bar and the viewcontroller's items. If I switched to a different view controller (not a tableview one) and came back, the bar would be gone and the nav bar back to its normal size. I have spent my last 3 hours looking for answers and just trying everything out there but nothing worked for me.
What did work in my case is a pretty weird solution: making the navigation bar invisible and then visible once again. So it seems like this actually loads it twice, first time being with the black bar and the second one, back to normal.
In my viewDidLoad I have this now:
[self.navigationController setNavigationBarHidden:YES];
[self.navigationController setNavigationBarHidden:NO];
Try this solution: How to set the top position = 0 after setStatusBarHidden:Yes?
I had once had the same issue, struggled through a lot of SO pages but this was the ultimate solution.
I develop a iPad App with has one UISplitViewController. In the DetailView is a TabBarController with some NavigationControllers.
My Problem is that: The Detail View is Black when i start the App in Landscape, Home Button Right. When i turn the iPad around that the Home Button is on the left side, the Detail View shows content. When i start the App in Landscape, Home Button Left all works fine.
I tested several things, like rebooting the device or modify the shouldAutorotateToInterfaceOrientation, but nothing helped.
iOS 4 Problem. Fixed in newer Versions.