Is there any way to use UIAppearance to change the height of a label inside of a UINavigationBar. Here\'s the code and an image of what\'s going on so you can understand wh
Probably you can get the UIAppearance for UILabel inside UINavigationBar.
I ended up solving this by creating a custom UIView:
+(NavigationBarTitleLabel *)titleLabelWithTitle:(NSString *)title {
// this will appear as the title in the navigation bar
NavigationBarTitleLabel *labelWrapper = [[NavigationBarTitleLabel alloc] initWithFrame:CGRectMake(0, 0, 200, 34)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 8, 200, 32)];
label.font = [UIFont fontWithName:@"MarketingScript" size:28.0];
label.text = title;
label.textColor = XHEXCOLOR(0XFFFFFF);
label.textAlignment = UITextAlignmentCenter;
label.backgroundColor = [UIColor clearColor];
label.layer.shadowColor = [UIColor blackColor].CGColor;
label.layer.shadowRadius = 2;
[labelWrapper addSubview:label];
[labelWrapper sizeToFit];
return labelWrapper;
}
and then setting the titleView property on the navigationItem:
self.navigationItem.titleView = [NavigationBarTitleLabel titleLabelWithTitle:self.title];