-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
Description
example code to reproduce problem.
_labelPrompt = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 160, 22)];
_labelPrompt.backgroundColor = [UIColor clearColor];
_labelPrompt.numberOfLines = 1;
_labelPrompt.font = [UIFont boldSystemFontOfSize: 14.0f];
_labelPrompt.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5];
_labelPrompt.textAlignment = UITextAlignmentCenter;
_labelPrompt.textColor = [UIColor whiteColor];
_labelPrompt.adjustsFontSizeToFitWidth = YES;
_labelTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 22, 160, 22)];
_labelTitle.backgroundColor = [UIColor clearColor];
_labelTitle.numberOfLines = 1;
_labelTitle.font = [UIFont boldSystemFontOfSize: 14.0f];
_labelTitle.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5];
_labelTitle.textAlignment = UITextAlignmentCenter;
_labelTitle.textColor = [UIColor whiteColor];
UIView* titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 160, 44)];
[titleView addSubview:_labelPrompt];
[titleView addSubview:_labelTitle];
_labelPrompt.text = @"prompt";
_labelTitle.text = @"title";
if (UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad) {
self.layeredNavigationItem.rightBarButtonItem = _buttonHistory;
self.layeredNavigationItem.titleView = titleView;
} else {
self.navigationItem.rightBarButtonItem = _buttonHistory;
self.navigationItem.titleView = titleView;
}
Reactions are currently unavailable