iOS中 UIActionSheet字體的修改
更新時間: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字體的修改,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
解決iOS調(diào)起微信支付顯示系統(tǒng)繁忙問題
這篇文章主要介紹了解決iOS調(diào)起微信支付顯示系統(tǒng)繁忙問題,需要的朋友可以參考下2016-12-12IOS開發(fā)之JSON轉(zhuǎn)PLIST實(shí)例詳解
這篇文章主要介紹了IOS開發(fā)之JSON轉(zhuǎn)PLIST實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下2016-11-11iOS中UILabel實(shí)現(xiàn)長按復(fù)制功能實(shí)例代碼
在iOS開發(fā)過程中,有時候會用到UILabel展示的內(nèi)容,那么就設(shè)計(jì)到點(diǎn)擊UILabel復(fù)制它上面展示的內(nèi)容的功能,也就是Label長按復(fù)制功能,下面這篇文章主要給大家介紹了關(guān)于在iOS中UILabel實(shí)現(xiàn)長按復(fù)制功能的相關(guān)資料,需要的朋友可以參考借鑒,下面來一起看看吧。2017-10-10