防微信alertSheet彈框(別問(wèn)我為什么不用系統(tǒng)的)

產(chǎn)品提出的需求有時(shí)候是很扯淡的,這個(gè)按鈕的字體,顏色。。。我去,所以系統(tǒng)的部分控件可以改變字體大小、顏色嗎?(搜了一下alertSheet還是可以的,不過(guò)我沒(méi)親測(cè),http://www.cnblogs.com/destiLaugh/p/5973218.html)

![ ![01.png](http://upload-images.jianshu.io/upload_images/1776659-44fb574f6c5d1727.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)](http://upload-images.jianshu.io/upload_images/1776659-92f7fa4b0da0ecce.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

05.png

使用方法 資源文件在JasonAcitonSheetViewUtil文件夾內(nèi),導(dǎo)入頭文件 #import "XXYActionSheetView.h" 1.若使用代理方式 導(dǎo)入代理 XXYActionSheetViewDelegate

XXYActionSheetView *alertSheetView = [[XXYActionSheetView alloc] initWithTitle:@"您確定要?jiǎng)h除此消息" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"確定" otherButtonTitles:nil]; //彈出視圖 [alertSheetView xxy_show];

調(diào)用代理方法

pragma mark - XXYActionSheetViewDelegate

(void)actionSheet:(XXYActionSheetView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{ NSLog(@"delegate點(diǎn)擊的是:%zd", buttonIndex); if (0 == buttonIndex) {//

} }

2.使用block方式

XXYActionSheetView *alertSheetView = [[XXYActionSheetView alloc] initWithTitle:nil cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@[@"打開相冊(cè)", @"相機(jī)", @"微信支付", @"支付寶支付"] actionSheetBlock:^(NSInteger index) { NSLog(@"block點(diǎn)擊的是:%zd", index); if (0 == index) {

    }
}];

//彈出視圖 [alertSheetView xxy_show];

demo下載地址: ( 如果你需要的話) https://github.com/JasonDraem/JasonActionSheetView.git

或者cocoachina搜索 JasonActionSheetView

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容