Failed to install custom fonts in WatchKit

I am trying to install the Roboto font and add as a target to expand the clock set, but it still comes as zero. Can we install custom fonts in the watch kit.

+2
ios watchkit apple-watch uifont
source share
2 answers

It worked for me .. Using the following codes.

Add a custom font to WatchKit Extension and WatchKit App target Info.plist

enter image description here

Now you write the code as follows,

NSMutableAttributedString *attString =[[NSMutableAttributedString alloc] initWithString: @"Yano rocks! Always"]; [attString setAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"Open Sans" size:20.0]} range:NSMakeRange(0, attString.string.length)]; [self.loadingLabel setAttributedText:attString]; 
+7
source share

All Articles