码迷,mamicode.com
首页 >  
搜索关键字:nsbundle    ( 385个结果
iOS开发之XML解析代码
iOS开发之XML解析代码 //1.加载和解析XML文件 NSString *path = [[NSBundle mainBundle] pathForResource:@"xml.txt" ofType:nil]; NSData *data = [[NSData alloc] i...
分类:移动开发   时间:2015-04-05 14:35:06    阅读次数:117
常用宏定义
#define kVersionId? ? ? [[[NSBundle mainBundle] infoDictionary]objectForKey:@"CFBundleVersion"]? ? ? ? ? // 版本ID #define kVersionNumber? [[[NSBundle mainBundle] infoDictionary]objectFor...
分类:其他好文   时间:2015-04-04 13:45:53    阅读次数:158
iOS 文件操作:沙盒(SandBox)、程序包(NSBundle)
iOS 文件操作:沙盒(SandBox)、程序包(NSBundle)...
分类:移动开发   时间:2015-04-02 10:24:51    阅读次数:272
IOS开发基础知识--碎片9
1:两种方法删除NSUserDefaults所有记录//方法一NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];[[NSUserDefaults standardUserDefaults] removePersistentD...
分类:移动开发   时间:2015-04-01 19:54:38    阅读次数:225
ios 震动
声音可以工作在模拟器,然后一些声音(如循环的)已被证明不能工作,设置在模拟器中成功与否取决于音频格式.注:必须使用.wav格式在这个例子中.SystemSoundID pmph;id sndpath = [[NSBundle mainBundle] pathForResource:@"mySound...
分类:移动开发   时间:2015-04-01 14:59:58    阅读次数:163
iOS开发技巧-版本比较
1、获取App当前的版本信息 #define?XcodeAppVersion?[[[NSBundle?mainBundle]?infoDictionary]?objectForKey:@"CFBundleShortVersionString"] 这是Umeng统计提供的宏定义,在使用Umeng的时候,需要设置App版...
分类:移动开发   时间:2015-03-30 19:17:37    阅读次数:133
沙盒路径
沙盒路径查找沙盒路径 显示沙盒路径 po NSHomeDirectory() 显示 Bundle 路径 po [[NSBundle mainBundle] bundlePath] po = print object 是 lldb 的指令,是非常重要的调试指令 不用在开发时,写大量的 NSLog沙盒的主要路径 Documents 需要保存由应用程序本身产生的文件或者数据,例如:游戏进度、涂鸦软件的...
分类:其他好文   时间:2015-03-18 10:35:17    阅读次数:138
获取当前应用版本号
NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary];     NSString *appVersion = [infoDic objectForKey:@"CFBundleShortVersionString"];...
分类:其他好文   时间:2015-03-16 12:57:51    阅读次数:120
判断APP是否是最新版本 和 获取 APP 版本号
- (void)VersionUpdate{ NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; CFShow(infoDictionary); NSString *app_Version = [inf...
分类:移动开发   时间:2015-03-11 22:55:15    阅读次数:221
NSBundle 的理解和 mainBundle 类方法详解
常看到类似的 NSString *file = [[NSBundle mainBundle] pathForResource:name ofType:nil];这样的代码,来产生 file 的完全路径。那么它是什么东西呢:先看 NSBundle 类,直接继承NSObject类。这个类的对象,代表了 ...
分类:其他好文   时间:2015-03-08 14:14:04    阅读次数:91
385条   上一页 1 ... 25 26 27 28 29 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!