(IOS)過濾所有Emoji標(biāo)簽符號

+(void)changeVerifyButtonState:(UIButton*)sender

{

? ? __blockintcountDown =120;

? ? dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);

? ? dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue);

? ? dispatch_source_set_timer(timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0);

? ? dispatch_source_set_event_handler(timer, ^{

? ? ? ? if(countDown <=0)

? ? ? ? {

? ? ? ? ? ? //倒計(jì)時(shí)結(jié)束,關(guān)閉

? ? ? ? ? ? dispatch_source_cancel(timer);

? ? ? ? ? ? dispatch_async(dispatch_get_main_queue(), ^{

? ? ? ? ? ? ? ? //設(shè)置界面的按鈕顯示

? ? ? ? ? ? ? ? sender.enabled=YES;

? ? ? ? ? ? ? ? sender.backgroundColor = Main_Color;

? ? ? ? ? ? ? ? [sendersetTitle:@"重新獲取驗(yàn)證碼"forState:UIControlStateNormal];

? ? ? ? ? ? });

? ? ? ? }

? ? ? ? else

? ? ? ? {

? ? ? ? ? ? NSString*TimeString = [NSStringstringWithFormat:@"%.2d", countDown];

? ? ? ? ? ? dispatch_async(dispatch_get_main_queue(), ^{

? ? ? ? ? ? ? ? [sendersetTitle:[NSStringstringWithFormat:@"%@秒再次獲取",TimeString] forState:UIControlStateNormal];

? ? ? ? ? ? ? ? sender.backgroundColor = MainTwoText_Color;

? ? ? ? ? ? ? ? sender.enabled=NO;

? ? ? ? ? ? });

? ? ? ? ? ? countDown--;

? ? ? ? }

? ? });

? ? dispatch_resume(timer);

}

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

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

  • 1. 打印View所有子視圖 po [[self view]recursiveDescription] 2. la...
    Hurricane_4283閱讀 1,070評論 0 2
  • 目錄(GCD): 關(guān)鍵詞 混淆點(diǎn) 場景應(yīng)用 總結(jié) 1. 關(guān)鍵詞 線程概念: 獨(dú)立執(zhí)行的代碼段,一個(gè)線程同時(shí)間只能執(zhí)...
    Ryan___閱讀 1,374評論 0 3
  • 1.NSString過濾特殊字符串定義一個(gè)特殊字符的集合NSCharacterSet set = [NSChara...
    奮拓達(dá)閱讀 939評論 0 0
  • 1.NSTimer不準(zhǔn)時(shí)的原因:(1).RunLoop循環(huán)處理時(shí)間,每次循環(huán)是固定時(shí)間,只有在這段時(shí)間才會去查看N...
    稻春閱讀 1,368評論 0 3
  • 蘋果產(chǎn)品的中文文案一直引人討論。正是好奇,我把官網(wǎng)現(xiàn)有產(chǎn)品的所有大標(biāo)題截了圖。然后一個(gè)個(gè)進(jìn)行分析,嘗試提煉出蘋果的...
    lei__閱讀 3,491評論 0 4

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