如何在IOS 8中使用UIActionSheet样式更改UIAlertController按钮标题的字体大小。
我尝试过以下功能,但这对IOS8无效。
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet {
for (UIView *_currentView in actionSheet.subviews) {
if ([_currentView isKindOfClass:[UILabel class]]) {
UILabel *l = [[UILabel alloc] initWithFrame:_currentView.frame];
l.text = [(UILabel *)_currentView text];
[l setFont:[UIFont fontWithName:@"Arial-BoldMT" size:20]];
[actionSheet addSubview:l];
_currentView.hidden = YES;
break;
}
}
}