欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

IOS 獲取APP 版本號(hào)的實(shí)例詳解

 更新時(shí)間:2017年07月15日 10:02:32   作者:Hi_Aaron  
這篇文章主要介紹了IOS 獲取APP 版本號(hào)的實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下

IOS 獲取APP 版本號(hào)的實(shí)例詳解

看代碼的時(shí)候看到一句,用于獲取.plist文件的版本號(hào)

labelVersion.text = [NSString stringWithFormat:@"v%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]]; 

比較感興趣的是后面的參數(shù) kcFBundleVersionKey ,竟然是CFBundle.h已經(jīng)定于好的屬性,下面有這個(gè)屬性的注釋

const CFStringRef kCFBundleVersionKey;
  /* The version number of the bundle. For Mac OS 9 style version numbers (for example "2.5.3d5"), */
  /* clients can use CFBundleGetVersionNumber() instead of accessing this key directly since that */
  /* function will properly convert the version string into its compact integer representation. */

還有好多是kcFXXX開(kāi)頭的Standard Info.plist keys 屬性,有興趣可以自己看一下CFBundle.h,研究一下它們的用法,

以上就是IOS 獲取APP 版本號(hào)的簡(jiǎn)單實(shí)例,關(guān)于IOS 開(kāi)發(fā)的文章本站還有很多,大家可以參考,感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論