Custom font on iOS7 app which supports iOS 6 - ios7

I have made an app which has several custom fonts, but i'm struggling to make it work on ios6 devices, i have added them in myApp-Info.plist and it works without any problem on labels and buttons and everywhere except uiwebviews in ios7 , but in ios 6 it looks like the default font in everywhere and there is no change throughout the whole app in fonts. After searching couple of weeks, still haven't find any answer that would work.
Here is my code for assigning a font to label :
titleLable.font=[UIFont fontWithName:#"B Yekan" size:17];

I just encountered this problem, also, and found that in iOS 7, font names aren't case-sensitive; i.e., I was trying to use "ChunkFive-Roman", which worked in iOS 7 even though my code said "Chunkfive-Roman".
However, this doesn't work in iOS 6... I was getting the default font instead. Changing the font name to "ChunkFive-Roman" fixed it so that that the text was appearing correctly in both. (Note -- was using Simulator in both cases).

You have to follow the rules in this link, once you do it there u go..
Add your custom font into your project , i.e. Dragged the font's ttf file (CALIBRIZ_0.TTF) into your resource folder from finder and check the "copy file to project folder" option. )
Edit Info.plist: Add a new entry with the key Fonts provided by application.
For each of your files, add the file name to this array (Fonts provided by application)
Now set font to your label:
MyLabel.font = [UIFont fontWithName:#"Calibri" size:16];

http://blog.builtwithlogic.com/post/73503283890/installing-custom-fonts-on-iphone-and-ipad-ios-devices
Covers how to add fonts - Little confused though by your question you specifically mention iOS6 as the problem and UIWebView - Be interested to know what you mean by that piece?
Have you tried setting the fonts using UIAppearance ? or are you subclassing and amending the fonts as it could be that you've not done it right there. Could you supply some code showing how you setting you custom fonts throughout the app?
If you haven't already I'd ensure you've followed the steps in that email and then add a custom category to UIFont to pass back a specific font. If you haven't already done so I would also set the fonts in UIAppearance for your labels, Titles etc this is the cleanest and most efficient way to do it throughout your application as you only need set it one and you can set differently based on how a for example Label is presented -in a tableview in a navigation bar etc.
here's a link to the official docs
https://developer.apple.com/library/ios/documentation/uikit/reference/UIAppearance_Protocol/Reference/Reference.html
Appreciate this question is old but love to know if that helps.

I had a similar problem where the custom font would work in iOS7, but not iOS6.
The solution for me was to use the true font name not the filename.
To do this check the font name as shown in OSX's FontBook.
iOS7 allowed me to use the the filename (less the .ttf suffix), but iOS6 wanted the true font name as shown in FontBook.
For example for a font named CustomFont.ttf .....
I followed all the steps listed by others here to add the font to my app, but then used it by referencing it as #"CustomFont".
When I added the font to my mac and looked at it in FontBook (mac utility), it was actually named #"Custom font" - with a space and a lower case letter.
Hopefully this helps someone else out there :-)

iOS 6 cannot do custom fonts. That is a new feature only available in iOS 7.

Related

iOS 7 Newsstand default cover is not set

Since iOS7 the default cover that is set in the info.plist under Icon Files (iOS 5) are not shown after installation the app. Instead the default cover by Apple is shown.
I can see that this property is for iOS 5 but I tried other as well. An example - Icon Files could not be changed from an Array to a Dictionary.
Do you know how to set a default cover for Newsstand app in iOS 7?
Best Regards!
OK i got the solution.Add Icon files (iOS 5) if you didnt add previously in your app-info.plist. Make sure that the long edge on your default cover is at least 512 px. ( Mine is 300 * 528 px)
Please see screenshot:
check the references for the icons you are using in the .plist, make sure they are added as reference to the image and not as references to a folder like the references for the launch images and the icon images
Try to remove "App Icons Source" catalog. In Target=>"General" tab.

Multiple text Alignments in UITextView (iOS 4 compatible)

I need to use Multiple textAlignments in single UITextView i.e. one para LeftAligned and other Para Right.
I achieved this using NSMutableAttributedString but that's only for iOS 6 as it's crashing on devices with older OS. I am looking for some solution which works on previous iOS versions too. Ideally iOS4.3 compatible solutions. I had checked several solutions uploaded on SO here but couldn't find which does set multiple alignments to be exact. May be due to my little knowledge regarding core text, I am unable to use it. Some specific help with sample code will help much.
Thanks
If you are only displaying the text (without editing), you could use a UIWebView and CSS for text styling.

Embedding a custom font in a screensaver

I can't figure out how to include a font in my Mac screensaver.
I did this following tutorial, Embed font in a mac bundle, but my [NSFont fontWithName:size:] still returns null.
I don't really know where to start.
Any thoughts, solutions?
Thank you
The example you're following works for an application. The problem is that you're building a screensaver bundle. Those are not applications unto themselves, they are loaded by separate application. Apparently, the ATSApplicationFontsPath key, as its name implies, is only used when loading an application.
You will have to write code to enumerate the font file URLs in your bundle and register them. You can use -[NSBundle URLsForResourcesWithExtension:subdirectory:] and CTFontManagerRegisterFontsForURLs() for that.

Is the "Prerendered Icon Flag" bug fixed?

I've been reading the previous posts on this and it looked like the bug was fixed, but after an update, I'm having the same bug now. Apologies if any of the below is repetitive.
I recently updated my app. The .plist has Prerendered Icon Flag: true, and Icon already includes gloss effect: YES. However, in iTunes Connect the 512x512 icon has the big gloss over it? I went to check the binary details in iTunes Connect too and the Prerendered Icon Flag says false even though in the plist it's set to true?
Am I doing something wrong?
Check to make sure that you are adhering to the new iOS 5 icon layout in your .plist. If your strings such as "Icon already includes gloss effect" are now within the "Icon files (iOS 5)" dictionary, they will not be applied on iOS 5 devices.

How to get system icons in iOS

I want to use icons like opened/closed folder in my table (UITableView)?
UPD:
For example, in Java you can get a standard image "folder" and use it in the FileTree:
new
DefaultTreeCellRenderer().getDefaultClosedIcon()
And also can use the constants of L&F (colors, styles, icons).
In the iOS, I found only these standard icons.
But not folder icons...
I'm not quite sure exactly what you want - the folder icon from iOS? Could you explain a little better?
If it is a folder icon that you want, there's no quick way to get it from code - doing so would use private API's and your app is likely to be rejected from the app store.
If you want something like a folder icon, a good way to get it would be by taking a screenshot of the iPhone simulator and editing it to the right size etc.