Setting BOLD font on iOS UILabel

It’s a fishy business to mess with the font names. And supposedly you have an italic font and you wanna make it bold – adding simply @”-Bold” to the name doesn’t work. There’s much more elegant way: – (UIFont *)boldFontWithFont:(UIFont *)font { UIFontDescriptor * fontD = [font.fontDescriptor fontDescriptorWithSymbolicTraits:UIFontDescriptorTraitBold]; return [UIFont fontWithDescriptor:fontD size:0]; } size:0 means … Read more

How to detect Dynamic Font size changes from iOS Settings?

With Swift 5 and iOS 12, you can choose one of the three following solutions in order to solve your problem. #1. Using UIContentSizeCategoryAdjusting‘s adjustsFontForContentSizeCategory property UILabel, UITextField and UITextView conform to UIContentSizeCategoryAdjusting protocol and therefore have an instance property called adjustsFontForContentSizeCategory. adjustsFontForContentSizeCategory has the following declaration: A Boolean value indicating whether the object automatically … Read more

UIFont fontWithName font name

Might be interesting for you as Quick Win within the Debugger: (lldb) po [UIFont fontNamesForFamilyName:@”Helvetica Neue”] (id) $1 = 0x079d8670 <__NSCFArray 0x79d8670>( HelveticaNeue-Bold, HelveticaNeue-CondensedBlack, HelveticaNeue-Medium, HelveticaNeue, HelveticaNeue-Light, HelveticaNeue-CondensedBold, HelveticaNeue-LightItalic, HelveticaNeue-UltraLightItalic, HelveticaNeue-UltraLight, HelveticaNeue-BoldItalic, HelveticaNeue-Italic ) November 2018 – Update A new swift-y reference for “Custom Fonts with Xcode” – by Chris Ching. I had to update, … Read more

UIFont – how to get system thin font

You can use system font thin weight: UIFont.systemFont(ofSize: 34, weight: UIFontWeightThin) List of available weights for San Francisco: UIFontWeightUltraLight UIFontWeightThin UIFontWeightLight UIFontWeightRegular UIFontWeightMedium UIFontWeightSemibold UIFontWeightBold UIFontWeightHeavy UIFontWeightBlack As of iOS 11, UIFontWeight* was renamed to UIFont.Weight.*. More you can get here https://developer.apple.com/documentation/uikit/uifont.weight.

Visual List of iOS Fonts?

Have you tried iOS Fonts? This gives you a visual of all of the available fonts with the ability to enter your own string of text to see how it would look. This doesn’t appear to have been updated for iOS 7 however but I am unaware of any additional fonts which have been added … Read more

How do I set bold and italic on UILabel of iPhone/iPad?

Don’t try to play with the font names. Using the font descriptor you need no names: UILabel * label = [[UILabel alloc] init]; // use your label object instead of this UIFontDescriptor * fontD = [label.font.fontDescriptor fontDescriptorWithSymbolicTraits:UIFontDescriptorTraitBold | UIFontDescriptorTraitItalic]; label.font = [UIFont fontWithDescriptor:fontD size:0]; size:0 means ‘keep the size as is’ With Swift try the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)