首先,我在我的视图控制器中显示这样的 UIAlertView(真的没有什么花哨的):
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Thank you"
message:@"Successfully saved bookmark"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
但正如您在屏幕截图中看到的那样,标题标签将我的视图的背景作为其背景颜色:
我什至不知道这可能来自哪里,这是我在视图控制器出现时的样式:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
self.title = @"Details";
[self.view styleBackgroundColor];
[self.saveToBookmarks configureButtonStyle];
[self.getDirections configureButtonStyle];
self.name.text = [simoItem name];
self.relativeLocation.text = [self relativeLocationStringForLocation:[simoItem location]];
self.address.text = [simoItem address];
self.type.text = [self buildTypesString];
[self.name styleMainLabel];
[self.address styleSubLabel];
[self.type styleSubLabel];
[self.relativeLocation styleSubLabel];
}
尝试清理项目,从 sim 中卸载应用程序并摇动我的电脑,但到目前为止还没有完成...
styleMainLabel
编辑:应要求添加代码
-(void) styleMainLabel {
//colors
UIColor *backgroundColor = [Utilities getBackgoundColorPreference];
UIColor *textColor = [Utilities getTextColorPreference];
[self setBackgroundColor:backgroundColor];
[self setTextColor:textColor];
//text size styling
self.font = [UIFont fontWithName:@"Tiresias PCfont" size:35.0];
self.adjustsFontSizeToFitWidth = YES;
}