Skip to main content

All Questions

Tagged with
0 votes
1 answer
69 views

How to add a small image on right side of text whatever font size it is?

I'm trying to achieve this on iOS using Swift and storyboards: Notice that the image size on the right never changes, only the text font size changes depending on the user's default font size. I want ...
paprika's user avatar
  • 350
0 votes
1 answer
636 views

How to make UILabel font size static (disregard of iOS setting font size change)?

How to make UILabel font size static (disregard of iOS setting font size change)? That is to say, when user set their font size to be larger in their iPhone's accessibility font size, or change the ...
RainCast's user avatar
  • 4,501
1 vote
1 answer
893 views

How to change font size for each segment in UISegmentedControl. Swift

can i change font sizes for each segment in UISegmentedControll? I know i can change for all, but i want each segment to have different font size. Is it possible? For example if I have 3 segments I ...
Michał Michalik's user avatar
0 votes
1 answer
187 views

Automatically scale a string (sentence) font size based on the longest word

So this is a tough one. I have a dynamically generated sentence. Essentially, I have a view that is a dynamic image and on the left side of it, there's an overlaid 'darker area' with some text on top ...
nickcoding2's user avatar
0 votes
1 answer
125 views

Animate `CATextLayer` font-size from bottom left

is it possible to animate the font-size of a CATextLayer, starting from bottom left? I am able to animate the CATextLayer with the following code, but it is always starting from top-left: let ...
user3532505's user avatar
0 votes
0 answers
32 views

Is the font size different for each mobile phone(iPhone)?

Is the font size different for each mobile phone? example) fontSize = 24 iPhone 11 pro -> 24 iPhone SE -> 20 Since the resolution is different for each mobile phone, does the font size change?
Park재현's user avatar
0 votes
1 answer
253 views

iOS, tvOS: Typography - Fitting Font Size

We have iOS and tvOS targets in the same project. There are same labels in the project but since their screen size's is different, labels' font sizes' need to be different. I am here to ask what is ...
jecae's user avatar
  • 11
0 votes
1 answer
186 views

Autoshrink fontsize of UILabeltext siwft

I have a multiline UILabel text which expands dynamically according to the text length. I have setup proper auto layout in storyboard and grows bigger if the text is lengthy. But i want to reduce the ...
j.TK's user avatar
  • 223
1 vote
1 answer
177 views

How to check if an NSMutableAttributedString font size is smaller/greater than some value?

I try to make an if block by checking if an NSMutableAttributedString font size is smaller/greater than some value. I couldn't find an explanation about this. Code sample is as follows: if textView....
Anthon Santhez's user avatar
0 votes
2 answers
2k views

How can I change DatePicker font weight in SwiftUI

I've tried below code. But .font function does not change anything. I want to the date more darker. How can I do that? struct TestView: View { @State private var date = Date() var body: ...
Kenan Nur's user avatar
  • 433
2 votes
2 answers
2k views

Find width of string (swift)

How do I find the width of a string (CGFloat) given the font name and font size? (The goal is to set the width of a UIView to be just wide enough to hold the string.) I have two strings: one with &...
Greg's user avatar
  • 707
2 votes
1 answer
647 views

Determine font size or scale of a UILabel

I have a label (titleLabel) on my VC that is animated to show one letter after another until the whole string is visible. The code is as follows and is working: titleLabel.text = "" ...
wyodoodoyw's user avatar
1 vote
2 answers
153 views

Stanford CS193p - Changing font size in line with card count number?

I'm on the final task for Assignment 1, "5. When your game randomly shows 5 pairs, the font we are using for the emoji will be too large (in portrait) and will start to get clipped. Have the font ...
24SGR's user avatar
  • 51
3 votes
3 answers
3k views

Change font size base on device

is there any way to understand which type of Device the user is using. I would like to use it in order to change the font size for the iPhone8 , if device == "iPhone8" { use Textfontsize 20 } else { ...
Damiano Miazzi's user avatar
0 votes
1 answer
68 views

Having trouble scaling the font-size to the frame's height/width

I'm using the iPhone 11 as the baseline and I'm trying to get the font-size to scale up when I run it on an iPad, but I cannot get it to work. I'm doing everything programmatically and I'm also using ...
user avatar

15 30 50 per page