Objective c 如何在IOS 8中自定义UIAlertController按钮标题的字体大小

Objective c 如何在IOS 8中自定义UIAlertController按钮标题的字体大小,objective-c,ios8,uialertcontroller,Objective C,Ios8,Uialertcontroller,如何使用IOS 8中的UIActionSheet样式更改UIAlertController按钮标题的字体大小 我已经尝试了以下功能,但这对IOS8不起作用 - (void)willPresentActionSheet:(UIActionSheet *)actionSheet { for (UIView *_currentView in actionSheet.subviews) { if ([_currentView isKindOfClass:[UILabel clas

如何使用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;
        }
    }
}

是哪一个?代码中所示的UIActionSheet或问题中所述的UIAlertController?我将UIAlertController与UIActionSheetStyle一起使用…UIAlertController不使用任何UIActionSheet委托方法,因此您发布的代码将永远不会被调用。是的,您是对的,但我如何解决此问题?没有自定义UIAlertController的API。使用第三方实现或编写自己的支持自定义的实现。