所以我有一个奇怪的问题,可能是错误或我很愚蠢。
我在一个单元格中有一个按钮。该单元格显示登录用户的 Facebook 好友。如果他们已经是该应用程序的用户,它将显示按钮为播放,否则显示邀请我...
UIButton *playButton = (UIButton *)[cell.contentView viewWithTag:30];
playButton.backgroundColor = [UIColor clearColor];
[playButton setBackgroundImage:[[UIImage imageNamed:@"fbCell_Invite_30h"] resizableImageWithCapInsets:UIEdgeInsetsMake(15, 5, 15, 5)] forState:UIControlStateNormal];
playButton.titleLabel.text = @"Invite me";
if ([self.fbFriendsUsingApp containsObject:[friend valueForKey:@"id"]]) {
playButton.titleLabel.text = @"Play";
}
这一切都很好,不是问题。但是,当按钮文本是邀请我时,它显示如下:
在故事板界面构建器中,按钮设置如下:
奇怪的是,如果我单击中间箭头 <------> 使宽度拉伸,标题文本停止工作,它们都显示“播放”???