Is it possible to set the font size for all fonts in a Swift iOS app? - swift

In order for user friendly, i wish to let user customise the font size of entire app in setting page.
Rather than find out every single font and style it, is there any solution to set entire font's size one shot?

You shouldn't set ALL text to be the same size, as that would not look good or be legible, and it goes against Apple's Interface Guidelines for typography.
This would be the opposite of "user friendly". You need some visual weight/hierarchy to distinguish sections of content and their importance, and focus the user's attention. If everything's the same size, it's hard to find what they need.
So, with this in mind, you couldn't just have 1 setting for them - you'd need to have separate settings for every type of text in your app. Apple has already built this functionality for you at the OS level.
This is called "Dynamic Type," which lets you set text sizes based on the purpose of a particular bit of type - headlines, subheads, titles, body text, captions, etc. You don't have to manually find/change fonts.
For example:
let headlineFont = UIFont.preferredFont(forTextStyle: UIFontTextStyle.headline)
let subheadFont = UIFont.preferredFont(forTextStyle: UIFontTextStyle.subheadline)
This isn't an in-app setting as you asked about, but is set in the iOS System Settings. Whatever default font size the user selects in Settings will be reflected in your app. This also requires that you've considered what sort of text each element is. Is it a headline, a label, a caption, etc.

Related

Extjs6 dynamically modify font size

How to modify the font size of the page in Extjs6, for example, I make a scroll wheel on the page which is small, medium, and large, and then provide the user to choose. After the selection, the overall font of the page is displayed according to the user's choice of size. My Ext version is 6.2 people who want to know Give an implementation suggestion or plan. thank you very much

How can I change the font size in a text view, but not the font style? (light vs. regular) - Swift

I am building an app in which the user types into a textView, and I want the text to get slightly smaller the more the user types so it can fit into the view without needing to move up and down. The problem is that I want the text to be the default System font, but "Light". When I use methods recommended from other questions on here it changes the font properly, but it also changes the font from System Light to System.
textView.font = textView.font.fontWithSize(15)
This is how I am changing the size of the font, I know there are others, this just happens to how I am doing it now. I need a way to change the font size, but also preserve the Light style. Thanks!
edit: I am writing this app in swift.
You can do it like.
textView.font = UIFont(name: textView.font.fontName, size: 18)
Here the font should be as same you defined but you can change the size as you want.
If you want to fix the size then and change the name of font then you can use textView.font.pointSize

iPhone: Localizing app icon still not supported?

My app's icon includes some text.
So I want to change language of the text by language or country.
There is a post which says localizing app icon is not supported:
But it was posted in December 2010, one and half years ago from now.
Is it still not possible to change icon of app by language?
Localizing both icon of app on device and icon on App Store are not supported?
Or localizing icon only on App Store is possible?
This hasn't changed. I have the impression, given their guidelines not to include banners such as "Free" and "Pro" (in spite of their popularity), that Apple's philosophy is that icons should be symbolic rather than textual, and that the app's name (localizable) is displayed anyway, therefore there should be no need for text in the icon.
I do agree that this is a pity though, as it is indeed valid to expect that icons should be localizable. After all, symbols can often be culture-specific... An extreme case would be a hand signal which could mean a friendly hello in one culture and an very nasty thing in another. Even colours have different connotations in different cultures. An often cited example is the colour of mourning, which is black in the West and white in some Asian cultures.
Your app's icon is a static image, you can't localize it. The only option is to remove the text from your app's icon. Why are you putting text in your app's icon anyway?

Can I make PSTextFieldSpecifier be read-only

Is there any way I could force PSTextFieldSpecifier be read-only in iPhone Settings view?
It has auto-scaling font size, center justification and without title looks just perfect for copyright notice. The problem is that it's editable text. Even when if I would reset value each time app starts up, it's still pretty not-too-nice behaviour.
Backup plan: use two PSTitleValueSpecifiers... just not sure if copyright notice is valid, when it's spread over two bold titles and two non-bold values. But that's a different question.
if you want to display a readonly textfield you can use PSTitleValueSpecifier

How to control the font size of html select boxes on iPhone

Regular HTML select boxes (such as, e.g. found here), while being "chosen" are presented by the iPhone on a native widget that seems to totally ignore regular html font sizes and whatnot. It does some ellipsing when it goes too long, but the font is way too big for a list I want to present -- even on landscape, only about 35 characters can fit.
Is there any way to tell the iPhone to use a smaller font there?
This is not possible. Use radio buttons instead.
Also, you can create custom select boxes. If created the good way, it works great. One small misstep and the UI is a disaster.