[英]how to increase the UIAlertView size dynamically in ipad?
Alertview代碼:
UIAlertView *customAlert = [[UIAlertView alloc]initWithTitle:@"hi" message:nil delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[customAlert show];
您無法自定義UIAlertView
,例如調整大小,更改字體屬性等,因為Apple不允許任何人更改其UI控件。
一種解決方案是檢查UIAlertView
的子視圖並更改警報的框架,但這與Apple的NDA背道而馳 ,您的應用可能會被Apple拒絕,並且沒有保證解決方案可在不同的iOS
版本中使用。
其他解決方案是使用UIView
, UILabel
和UIButton
對象創建自己的自定義警報。 但是不建議這樣做,因為極不可能提供UIAlertView
提供的完整功能,控件和功能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.