currentTitle的用法
生活随笔
收集整理的這篇文章主要介紹了
currentTitle的用法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
??? [but setTitle:@"測試一下" forState:UIControlStateNormal];
??? NSLog(@"****%@",[button currentTitle]);//button.currentTitle NSLog(@"******%@",button.titleLabel.text); 兩者輸出的結果是一樣的,currentTitle是快速的訪問方法,[button curenttitle]和button.curremtTitle是一樣的,一個是調用currentTitle方法,一個是點方法 同理,currentImage,currentBackgroundImage等都是一個快速訪問的方法
??? [but setTitle:@"測試一下" forState:UIControlStateNormal];
??? NSLog(@"****%@",[button currentTitle]);//button.currentTitle NSLog(@"******%@",button.titleLabel.text); 兩者輸出的結果是一樣的,currentTitle是快速的訪問方法,[button curenttitle]和button.curremtTitle是一樣的,一個是調用currentTitle方法,一個是點方法 同理,currentImage,currentBackgroundImage等都是一個快速訪問的方法
轉載于:https://www.cnblogs.com/banchuangshuying/p/4959611.html
總結
以上是生活随笔為你收集整理的currentTitle的用法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Appscan的下载安装
- 下一篇: spring的service不启动事务的