现在iOS8已弃用UIActionsheet
和UIAlertview
iOS7上的自定义功能不再生效。到目前为止,我知道的唯一定制是色调。而我所需要的是改变标题的字体大小和样式,我还没有找到任何方式与新的UIAlertAction
。是否可以编辑UIAlertAction标题字体大小和样式?
Already referred to this但我仍然希望有一种方法来改变至少标题大小和字体。
提供你一些我的代码为UIAlertAction
UIAlertController * alertActionSheetController = [UIAlertController alertControllerWithTitle:@"Settings"
message:@""
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction * aboutTheAppAction = [UIAlertAction actionWithTitle:@"About the App"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action){
NSLog(@"About the app");
[self openAbout];
}];
[alertActionSheetController addAction:aboutTheAppAction];
[self presentViewController:alertActionSheetController animated:YES completion:nil];
看看这个https://github.com/ianb821/IBActionSheet – 2014-09-23 11:25:24
那么这会工作都因为它是由UIView的一个新的子类,但我正在寻找的是如何编辑造型alertaction。 – Teffi 2014-09-24 02:39:55