UIButton bad touch area after change position - objective-c

I have a problem. I am working on app and I am using Storyboard(AutoLayout off). For iPhone 5 and later it is good. But for iPhone 4S I have to change position programatically. But after change I cant click on UIButton, it doesnt change touch area. Where can be the problem? Or how you solve problems with screen size?
Thank you

Related

Detect how far the keyboard has animated?

I would like it to appear the keyboard is pushing another view up. The problem is there is a UITabbar between the UIView I would like to animate in unison with the keyboard, problem being the UITabbar breaks up what would give that appearance. What I would really like to be able to do is detect when the keyboard is at the exact point my view then animate that view.
Is this possible without going into the private API's?
Too be clear I have the animation working, just working out a way to make it smoother. The effect I am trying to create is similar to the messages app, but there is a UITabbar between to UIView and the bottom of the screen.
Perhaps this will work...
The height of the keyboard on the iPhone is 216 pixels. The default animation duration for the keyboard display is 0.25 seconds.
The height for a tab bar is 44 pixels.
So, if you started the UIView transition animation afterDelay:((44.0/216.0) * 0.25), this should look right on an iPhone. Perhaps try and see?
If this works, it's pretty easy how to figure out for landscape, and iPad, etc.
Additionally, if this does work, in your final implementation, I would avoid hardcoding the 0.25.

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.

iPhone 5 retina 4 inch touch screen

I'm adapting my app to iphone 5 and I've got a problem. I saw all documentation regarding this and it didn't work yet.
I put the Default-568h#2x.png and everything resized successfully.
The problem is in the touch stuff. I've got a toolbar on the bottom and when I touch it nothing happens :( in the retina 4" simulator. Works fine in retina 3.5
In retina 4", if I set the toolbar in the inspector above 439 px in the Y position works fine. Anything below this makes my toolbar not to work.
As I said, I tried many many things unsuccessfully.
I'm using Xcode 4.6.1, I've got a Main View (not having a Window option in the Attributes inspector).
Thanks in advance.
Your window or the main view is not resizing correctly. Make sure you have set them up such that they autoresize in both directions. Try to set different background colors to your views to find the view that is not resizing correctly.
Ensure that all of your views are auto-resizing correctly to fill the screen. It sounds like the main container view you have isn't being resized and is drawing the toolbar outside of its frame. This will work from a visual point of view as UIView - clipsToBounds defaults to NO, but touches won't work outside the frame.

How to position static buttons and iPhone 5

I am working on an app where i have 12 buttons and labels underneath on one of the views. They are placed on the storyboard directly. I want to make sure they will get properly repositioned in iPhone 5. The solution that i tried is just to deselect all the lines in the autosizing for all the buttons. Now when i try it on iphone 5 the buttons get resized. The problem if i stretch the storyboard and move the buttons they get messed up when running on the smaller screen. So i can only position them on the smaller screen and then it seems to work. The app does not rotate. I would like to know if this is a good solution or there is a better solution for this case. I would like for the app to support iOS 5+
Thank you!
If you want layouts to work with varying screen sizes, you should become familiar with the new constraint-based layout scheme in iOS 6. A WWDC video on the subject can be viewed at http://www.youtube.com/watch?v=Dkr9eKxlMAk&feature=player_detailpage.
Essentially, you're going to use the old struts and springs system for pre-iOS 5 and conditionally use the new scheme for iOS 6. (iPhone 5 won't run any iOS version prior to 6.)

Zooming in image using scrollview Xcode

I am trying an iPad application using Xcode. I am just a beginner so there are things I don't know how to do. In my app, I have some images showing one by one by scrollview. Now, I want them to zoom in when double tap and zoom out when double tap again. Can anyone tell me how to zoom in and out using the same scrollview which is used to display all the images?
Thanks. :)
Please Refer the Apple Documents... Scroll View Programming Guide for iOS