I currently am subclassing a UILabel to change the font to a custom font, however I would also like it to retain the size that I have set in storyboard for each label. Is there a method of doing this and also detect the current chosen style bold etc and replacing it with the relevant custom font if possible?
Here is the code I use to set the current font.
- (id)initWithCoder:(NSCoder *)coder {
self = [super initWithCoder:coder];
if (self) {
self.font = [UIFont fontWithName:@"FrutigerLT-Roman" size:17.0];
}
return self;
}
To add a custom font, to your app, check the following link: http://shang-liang.com/blog/custom-fonts-in-ios4/
Now, to keep the size set in the storyboard, it should be fine: