So when I use the iphone 5 simulator for xcode my round react buttons are all in the right position. But when I use the iphone 4 simulator the buttons move around and get deformed. how can I get this to not happen? I want the buttons to stay in the same place no matter what version of phone i use. So an example would be, I position 5 buttons verticaly on the left side of the screen. When I use the iphone 5 simulator the buttons are in the right place. I use the iphone 4 simulator and the buttons are all smooshed. Thanks
Related
I have inserted a label into my View Controller and centred it to the middle. When I run the app on the simulator for iPhone 6 the label is not centred.
I have tried adding constraints to the label. When running the app in the iPhone 6 simulator hides the label completely. What am i doing wrong?
Make the background color of the label to a darker shade.
If there are any red constraints, try to eliminate them
The best method to centre a label is to select the label from the structure hierarchy, click on to the Align button in the bottom, select Horizontally and Vertically in Container to be at 0 value
I'm annoyed I even have to ask this. Where do I find a more detailed list of devices that the storyboard can be viewed in? I'm not talking about devices you can make the simulator as, I'm referring to within the storyboard. Thanks.
Be patient!
There is a bar under the storyboard editor which contains the scale size of the storyboard at the center (- 100% +). Exactly at the left side of that bar, there is a button which shows for example: "View as: iPhone 8 plus". Press that button to see a list of devices you can select to change the storyboard scenes for that.
Whenever I launch my app on the iPhone 5/5s the UIScrollview does not work and part of the content is cut off, UNLESS I delete the following constraints:
However, if I delete these constraints, the content is not correctly aligned on the iPhone 6/6 Plus.
It does however have a little bit of a scroll when I launch it on the iPhone 4s.
How do I fix to have scroll working on iPhone 5/5s/4s but still keep the content the same across every iPhone? thanks
Here is my tree incase
FIXED: Changed the Vertical Space Constraint constant to 0.
When I run the application on Xcode an error appears saying "Modal segues are deprecated in iOS 8.0 and later". When I get to the simulator everything appears very large even after I reduce the scale to 50%.
There seems to be two questions here.
1) Why are Modal Segues deprecated in iOS8 and should I be concerned?
and
2) Everything is big in the simulator.
Modal Segues are replaced with adaptive segues in iOS8. The View Controller Programming Guide has information on the replacements, such as the "Show" segue and the "Show Detail" segue. The idea is that you can use one storyboard to describe an interface that works well on iPhones with small (4S, 5) screens as well as larger screens (6, 6+) and even iPads. To make efficient use of larger screens, it's now possible to have split views on iPhone in iOS8, and the new segue types let you specify that the next view should be shown in the detail area of a split view, or in the current view controller's area (aka its "context").
Traditional modal segues will continue to work, but they are not the preferred approach any longer, and as with all deprecated API, there is a possibility that a future release of the OS may remove those deprecated features. Consider revising your app to use the new approach. There are some WWDC videos, #214 and #218 at https://developer.apple.com/videos/wwdc/2014/ that are worth a watch if you want to get up to speed in a couple hours.
As for things being bigger in the simulator, it sounds like you're using the iPhone 6+ simulator, which is not only larger but also has 3X the pixels of a traditional iPhone non-retina. It will be larger when you run it, so you might want to drop it down to a smaller size like 50 or 25%. As an extra tip, those "change the size" shortcuts are Command+1, COmmand+2 and Command+3, so it's pretty easy to shuffle the size around. Alternatively, use another simulator, like the 5S Simulator.
I have a universal iOS 6 Application that supports both landscape and portrait orientations.
I have a view that consists of a UIPickerView at the bottom and a label near the top.
On an iPad or iPad Mini there's enough space for the UIPickerView to rotate. However the UIPickerView consumes the entire screen area on an iPhone (both 4 inch and 3.5 inch screens).
I'm sure it doesn't help I have a Tab Bar at the bottom.
Is there anyway I could EITHER shorten/shrink my UIPickerView or force portrait-only in this view?
You can force portrait-only through a combination of -[UIViewController supportedInterfaceRotations] and -[UIViewController shouldAutorotate]. (This is slightly different in iOS 5 and lower, where you have to use -[UIViewController shouldAutorotateToInterfaceOrientation:].