I am trying to add 3 different custom font to 3 different target how can i add that font. one storyboard have 3 labels which has bold, semi-bold, regular font weight with different size. i have added ttf font file in each target info.plist but how can i set font to each lable ???
-
You have to do this manually, something like creating a protocol named Themeable (which has a set font function). Then conform for each view controller | view had labels.sonle– sonle2022-07-08 06:35:12 +00:00Commented Jul 8, 2022 at 6:35
-
you mean if target == "this" { lable.font = .arialBoldFont(size: 17) } like this ?? @sonAsmita– Asmita2022-07-08 06:45:07 +00:00Commented Jul 8, 2022 at 6:45
-
Sorry I misunderstood, you mean 'different target' is different environments like dev, prod, stagging don't you?sonle– sonle2022-07-08 06:53:40 +00:00Commented Jul 8, 2022 at 6:53
-
no different target for different app fevers @sonAsmita– Asmita2022-07-08 06:57:48 +00:00Commented Jul 8, 2022 at 6:57
-
If I read the question correctly it's not about flavors, targets at all? Because you've already added fonts for each target, the question is how to apply correct font to labels in storyboard, right?Bojan Bozovic– Bojan Bozovic2022-07-09 13:59:11 +00:00Commented Jul 9, 2022 at 13:59
|
Show 1 more comment