iOS中 UIActionSheet字體的修改
更新時(shí)間:2017年06月19日 11:05:45 作者:弦外雨
這篇文章主要介紹了iOS中 UIActionSheet字體的修改,需要的朋友可以參考下
一,效果圖。
二,代碼。
RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController : UIViewController <UIActionSheetDelegate> @end RootViewController.m -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UIActionSheet *actionSheet=[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"手機(jī)找回密碼", nil]; [actionSheet showInView:self.view]; } #pragma mark - UIActionSheetDelegate - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { switch (buttonIndex) { case 0: { NSLog(@"--0--"); } break; case 1: { NSLog(@"--1--"); } break; default: break; } } - (void)willPresentActionSheet:(UIActionSheet *)actionSheet { for (UIView *subViwe in actionSheet.subviews) { if ([subViwe isKindOfClass:[UIButton class]]) { UIButton *button = (UIButton*)subViwe; button.titleLabel.font=[UIFont systemFontOfSize:15]; [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; } } }
以上所述是小編給大家介紹的iOS中 UIActionSheet字體的修改,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
解決iOS調(diào)起微信支付顯示系統(tǒng)繁忙問(wèn)題
這篇文章主要介紹了解決iOS調(diào)起微信支付顯示系統(tǒng)繁忙問(wèn)題,需要的朋友可以參考下2016-12-12IOS開(kāi)發(fā)之JSON轉(zhuǎn)PLIST實(shí)例詳解
這篇文章主要介紹了IOS開(kāi)發(fā)之JSON轉(zhuǎn)PLIST實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下2016-11-11iOS中UILabel實(shí)現(xiàn)長(zhǎng)按復(fù)制功能實(shí)例代碼
在iOS開(kāi)發(fā)過(guò)程中,有時(shí)候會(huì)用到UILabel展示的內(nèi)容,那么就設(shè)計(jì)到點(diǎn)擊UILabel復(fù)制它上面展示的內(nèi)容的功能,也就是Label長(zhǎng)按復(fù)制功能,下面這篇文章主要給大家介紹了關(guān)于在iOS中UILabel實(shí)現(xiàn)長(zhǎng)按復(fù)制功能的相關(guān)資料,需要的朋友可以參考借鑒,下面來(lái)一起看看吧。2017-10-10iOS動(dòng)畫(huà)特效之立方體翻轉(zhuǎn)
今天起為大家?guī)?lái)iOS動(dòng)畫(huà)特效合集之立方體翻轉(zhuǎn),APP如美女,動(dòng)畫(huà)如衣裳,趕緊為她披上漂亮的衣裝吧!2016-08-08