UI label wont align properly in iOS 6/iOS 7 - ios

I created the applications using Xcode 5[IOS 7].I used the custom font for this applications.
While i run the application in IOS 7 the label alignment good.But when i run the same application IOS 6 the label alignment wont align properly.
iOS 7
iOS 6.
kindly give me the solutions.

You have to go with below step:
step (1)
Uncheck mark Autolayout field.
step (2)
From your nib file set value of that UILable is: "Y" = -20;
may be it will help.

This problem is pretty much weird but has a simple solution.I had been facing the same problem too.
Click on the label and then autoresize it by clicking Command key icon ⌘ (Command key) and the = (equal to) sign together.
This should autofit the label.

Related

How to set constraints in Xcode 8 in Objective C

I am new in iOS and I am facing problem regarding to set constraints in Xcode 8. I have set constraints in Xcode 6.2 now I update xcode 8 and my constraint are not working.
I have tried each thing which is on net but nothing help. I have also changed Opens in "Xcode 7.x" but not work. I am using custom tableview and it shows text as in the image.
Constraint screenshot:
Select the controller size same as Xcode 6.2 in the storyboard.

Auto layout doesn't work on iPhone 6 device but works on emulator

I have an app which uses auto layout constraints added in Xcode designer , mostly using "add missing constraints" option from Editor menu , problem is screens looks good on iPhone 6 iOS 8.3 emulator but doesn't work on actual iPhone 6 device iOS 8 as well. I m not adding anything from code
Below are the examples
What am i missing with auto layout ?
**** additional details ***
There is a principle that you need to know.. Every view you add to the storyboard must have enough constraints to confirm it's:
Width
Height
X position
Y position
You should review the constrains you added.
Especially the first textfield(Your Full Name).
Seems like it's Y position constrains wrong.
You will get into problem 9 out of 10 times when Xcode adds missing constraints for you. I would suggest you to go for a better tutorial of autolayout.

Automatic constraints to storyboard and xib in XCode 6?

I was just trying to learn Autolayout in XCode 6. But I noticed a strange change in the XCode 6 that is whenever I drag and drop a button (or any UI element) on a xib the XCode isn't automatically adding the constraints to the button. However I do remember this facility was there in the previous versions of XCode. But in XCode 6 I had to explicitly add the constraints to the UI element. Here are the images of what happens in previous version of Xcode 6 and previous version of Xcode .
There we can see in XCode 6 no constraints have been added by default but however in previous version of XCode constraint was added by default.
So it would be helpful if you guys let me know if there's a way to enable the feature of adding constraints by default in XCode 6 or is it the way XCode 6 ways where we need to add constraints manually?
Thanks in advance :)
With the introduction of size classes, to have a universal storyboard for both iPhone and iPad, setting the constraints automatically wouldn't make much sense for me.
You can ask Xcode to resolve auto layout issues for you by pressing the (Resolve Auto Layout Issues) button in the lower right of the Interface Builder window and choosing “Add Missing Constraints”. The added constraints will fix the subviews relative to their superviews.
Adding the constraints automatically while editing was done in Xcode 4, and it was a disaster. Every time you moved a view, it broke something.
As of 5, any missing constraints will be added at compile time to your views. If you select a view and look in the size inspector, it will tell you this. See here for more details on constraints and interface builder.

How to make an app for iOS 6 compatible which is built in iOS 7?

My application is in iOS7 compatible, Xcode 5. Now, I have to make it iOS 6 compatible, so when I set deployment target iOS 6.1, all frame changes, what is solution for this?
I have attached screenshot for reference.
One thing to notice, I have used storyboard and have not used autoLayout.
First of all of you should understand new iOS 7 UI. Check it here: link
There are few differences in UI that are connected to status bar new visualization and etc.
I have noticed that some elements have different y offset positions for iOS 6 and iOS 7.
So if you use storyboard or xib you can find
So if you can find iOS 6/7 Deltas option. I've attache screenshot for you:
Just modify delta Y position for all of view using -20 value because of status bar issue.
Hope it will help you.
Select each ViewController in your Storyboard and, tick both options "Under top bars" , "Under bottm bars"
Programmatically you'd set your view controller's wantsFullScreenLayout to YES. It defaults to NO under iOS 6 but both defaults to YES and is deprecated as of 7. Or set the "Use Full Screen (Deprecated)" tick box in the interface builder.
Look Size Inspector at 4th position in the utilities area at right side and change value of delta Y in IOS 6/7 to -20 and delta Height to 20. I hope it will work

UISegmentedControl, text truncated on iOS 7

I have an UISegmentedControl in my app and on iOS 7 text is truncated. Instead of having "Stations" I have "S." even if my control is 320 width.
Using Spark Inspector I am able to see that size of label containing text is very small (13 pixels).
Also it works on iOS 7.1.
Do you have an idea?
Thanks for your help.
Thierry
EDIT: I created a blank project and it works...

Resources