Buttons all the way to the right do not work on iPad - objective-c

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)

Related

Buttons not working on ipad simulator

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.

Is there a different way to view the iOS Simulator in Xcode 5 / Am I viewing my button correctly?

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, however when I build and run the app it isn't. How do I fix this?

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.

UI in in IOS simulator doesn't show

I have a question I am trying to create a database from a tutorial that I have posted on here. The problem that I keep having is that when I build the project the project is built successfully. However when the IOS simulator pulls up to show me the UI I have a black screen. I have doubled checked that my connections to my storyboards are correct. and still my UI still not displaying. I have made sure that I had my sqlite library connected within the project and it is. This is a single view application for an IPAD. I have searched ways of finding issues within my code and I have done breakpoints to see where my application breaks. and This is what I have found.
this is where my application breaks because is the first screen that it pops after I have started the IOS simulator. I do not know how to fix this.
this screen basically tells me that there is something wrong with the UIwindow alloc. For some reason is breaking here and I do not know why.
This last screen shot is not that great to interpret especially if its in numbers.
Please help. I will be posting more screen shots if needed at this point I need all the help that I can get. I did not think that it would be difficult to create and link a db.
If you are using storyboards you need to remove all the code in didFinishLaunchingWithOptions and just return YES. Also set your main storyboard file appropriately in the plist file.

Best way to create floating notification iOS

I've got a tabbed iPad application with just about each tab running a UIWebView. I'm getting all sorts of callbacks, like when a user tries to leave the corporate site (which only displays the company site to users). In this case, I pop up a "toast" style window that tells them to click a button to open the page in Safari. I also pop it up with a spinner and no text to indicate that a page is loading. The approximate look that I'm going for is used in lots of applications, but you can see it best when changing the volume on the iPhone or iPad. It's just a translucent rounded square that fades in and out.
Right now I've got it implemented on one of my tabs, and I did it by creating the objects (a spinner, a label, and a UIImage with the square) and then programmatically hiding and showing them using [UIView beginAnimations] and changing the label's text. It works perfectly but I've got these nagging things hovering over my interface in Xcode, and it takes a lot of setup to accomplish if I wanted it to be in another tab, which I do. I can't help but think that there's a better way to accomplish this. I thought about making and adding a subview, but that would leave a white background to the toast. What I'm thinking is creating some sort of object that I can allocate in a tab's view controller whenever it's needed.
What are your guys ideas, or have you done this in the past? I see it in a lot of prominent applications, like Reeder, so I'm sure it's been done more eloquently than I have done it.
Matt Gallagher has a great class called LoadingView here Showing message over iPhone Keyboard. I use it.
MBProgressHUD is a popular library for this, as well.