我有一個iPad應用程序,其已經適用於iOS 7.我用於減少在動作片按鈕上的文本大小與此代碼:目標C - 在動作表變更文字尺寸爲iOS 8
- (void) willPresentActionSheet:(UIActionSheet *)actionSheet {
for (UIView *subview in actionSheet.subviews) {
if ([subview isKindOfClass:[UIButton class]]) {
UIButton *button = (UIButton *)subview;
button.titleLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:17.0];
}
}
}
我正在尋找一種在iOS 8上使用UIAlertController
和UIAlertAction
的方法。儘管UIAlertController
具有子視圖的視圖,但其中似乎沒有任何UIButton
或UILabel
。
你不能在iOS 8中做到這一點。它是完全不同的。更好地糾正你自己的錯誤或者找到允許定製的第三方'UIActionSheet'替代品。 – rmaddy 2014-10-16 23:30:35
是的,我最終創建了一個視圖控制器,其中包含一個彈出控制器中的單個按鈕。謝謝。 – calvillo 2014-10-17 14:09:22
這個答案也可以幫助你:http://stackoverflow.com/a/26463892/3219089 – Ivan 2014-10-20 12:26:51