私は次のコードを持っています:
UIImageView *photo = [[[UIImageView alloc] initWithFrame:CGRectMake(title_bar.titleView.frame.origin.x+130, title_bar.titleView.frame.origin.y-12, 22.0, 22.0)] autorelease];
UIImage *theImage = [UIImage imageNamed:@"question mark icon"];
photo.image = theImage;
UIView *new_view = [[UIView alloc] init];
[new_view addSubview:photo];
UILabel *new_label = [[UILabel alloc] initWithFrame:CGRectMake(title_bar.titleView.frame.origin.x-145, title_bar.titleView.frame.origin.y-12, 268.0, 22.0)];
[new_label setText:@"gregrgtg"];
[new_label setBackgroundColor:[UIColor clearColor]]; //COMMENTING THIS LINE OUT MAKES IT WORK
[new_view addSubview:new_label];
title_bar.titleView = new_view;
背景色がクリアに設定されている場合、プログラムSIGABRTs。その行をコメントアウトすると、正常に機能します(ラベルの背景が白だけであることを除いて)。また、ラベルをinitWithFrameで初期化するのではなく、単に初期化すると、プログラムはクラッシュしませんが、ラベルが表示されません。