XCode 4.2 and SDK 4.3 have Custom button font issue? - iphone

I'm using custom button (label button). Works fine on SDK 5.0 but when I simulate to SDK 4.3 it gives me bigger font. Does anyone know what would be the issue is?

Yes, fonts have changed beetween SDK4.3 and SDK5. SDK4.3 default fonts where bolder/bigger that the one set by default in SDK5. What is the reason of this... I don't know. You should set yourself the wanted font instead of using the default system one to have a similar rendering in both case.

Related

autocorrectType is not working on iOS 13 using swift

I know this is quiet simple and straight forward to disable autocorrection on iPhone and it worlds pretty much fine, but until now. Surprisingly, suggestion bar appear for text field even I have disabled it from storyboard and even programmatically.
self.textField.autocorrectionType = .no
Done that in sotoryboard as well.
But it does appear on iOS 13, not on previous versions and simulator.
There are many answers already for this one but none is working on iOS 13 so no need to mark the question as duplicate.
Cheers!
If you are using a Storyboard you can disable autocorrection on the attributes inspector (the down arrow icon) under the Text input traits. See the image below for details.

UIFont.fontName in iOS10 doesn't return "regular" suffix

After a successful migration to swift 2.3 in my application, I found a font glitch.
I have an extension for UIFont where I change system font to my custom font.
In iOS 9 and earlier everything worked as expected. In iOS 10 it doesn't.
The problem was in self.fontName. Normally it should return "fontName" + suffix for style (ex:regular, bold, etc).
However in iOS 10 for regular the style, it doesn't return suffix only "fontName".
I googled to found why but couldn't find anything.
The problem is fixed but why this happens I don't know. Any idea?
Using font names has never been a good idea.
Use fontDescriptor and inspect the UIFontDescriptor's fontAttributes and symbolicTraits to obtain information on the font in question. You can then create a new descriptor with modified attributes and/or traits, and obtain a font with that descriptor using init(descriptor:size:).

Xcode5 ( 3.5" screen to 4 inch )

Recently I had upgraded to Xcode 5 and opened a project that had been created in Xcode 4.6.1. All the images and buttons had moved around so I went back and re-arranged everything. Now a new problem has occurred, when I switch from the 4" simulator to 3.5 inch images get cut off, buttons and toolbars move around as well. I been searching for an answer for days and Im new to stackoverflow so I hope I have follow all rules and my question in the correct section.
Few notes on the project:
Using Autolayout, Size - Inferred, Orientation - Inferred
Opens in: Default 5.0, Project Deployment Target 7.0, View as: iOS 7.0 and Later
It sounds like you do not have any constraints on your objects. You will need to add them in order for autolayout to work the way you want.
If you are not wanting to add constraints programmatically than you can simply add them to objects in IB.
Click the object you want to add constraints to:
Editor -> Resolve Autolayout Issues -> Add Missing Constraints.
That will give you a good place to start with and you can further adjust the constraints from there.

iPhone "page curl" icon is disappered in iOS 5

Does not SDK page curl icon anymore?
page curl icon is used on native map app (http://www.filemaker.com/products/bento/iphone/1/help/en/images/icon_page_curl.png)
I can assign page curl icon in iOS 5, but icon does not appear on tool bar.
this icon is appear in under iOS 5.
do you have any idea of this?
I just got answer from Apple that the problem has been determined and is a known issue.
So we all can just hope they will fix this in iOS 5.1 release.
I found this person created their own page curl icon. You can use this one (it's under an open license):
http://blog.shuningbian.net/2011/01/ios-toolbar-pagecurl-icon.html
I just took this, resized the image to 20x20 and plan used it in a custom UIBarButtonItem it in my app. It doesn't look quite as nice as apple's, but it works!
Alternatively you can give this tool a shot to try and extract the icon from UIKit on a version 4 device:
https://github.com/0xced/UIKit-Artwork-Extractor

iOS Fonts - Why does Interface Builder give you more font options? E.g HelveticaNeue-Medium?

I've looked at the following link:
Setting UILabel - Font through code - generates error - iPhone
Which provides code to see all the available iOS fonts. For HelveticaNeue we get the following:
HelveticaNeue-Italic
HelveticaNeue-Bold
HelveticaNeue-BoldItalic
HelveticaNeue
Why does Interface Builder provide a slew of other options for fonts though? I've plopped a UILabel down and I see options for HelveticaNeue-Medium and HelveticaNeue-Light for example and they seem to work fine when compiling ?
The reason I'm asking is that I'm now programmatically generating a UILabel and would like to set it's font to HelveticaNeue-Medium but it looks like that's not an option?!
The Interface Builder shows all fonts available on the Mac. Not all of them are available to iOS. Before using a font, make sure that is available on iOS.
While Interface Builder lets you pick any font, it defaults to Helvetica if the font isn't available. As far as I know, it also compiles down to Helvetica (or the system default, which apparently isn't Helvetica on iPhone 4).
Or, at least, custom fonts don't work in IB; I have to set them in -awakeFromNib or -viewDidLoad: (no, this is not a UIAppFonts problem).