1.NSBundle1> 一个NSBundle代表一个文件夹,利用NSBundle能访问对应的文件夹2> 利用mainBundle就可以访问软件资源包中的任何资源3> 模拟器应用程序的安装路径/Users/aplle/资源库/Application Support/iPhone Simulator/...
分类:
移动开发 时间:
2014-11-13 12:32:07
阅读次数:
203
//1 可读取,不可写入工程下的plist文件;// NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"OfficialDoc" ofType:@"plist"]; //2 Document 沙盒中的文件(没有文件可自...
分类:
移动开发 时间:
2014-11-09 12:32:47
阅读次数:
180
方法1NSArray *objs = [[NSBundle mainBundle] loadNibNamed:@"WNHAppView" owner:nil options:nil];这个方法会创建xib中的所有对象,并且将对象按顺序放到objs数组里方法2UINib *nib = [UINib n...
分类:
其他好文 时间:
2014-11-02 22:19:46
阅读次数:
124
1、NSBundle一个NSBundle代表一个文件 夹,利用NSBundle能访问对应的文件 夹利用mainBunle就可以访问软件资源包中的任何资源模拟器应用程序的安装路径/user/aplle/资源库/application support/iphone simulator/7.1/appli...
分类:
其他好文 时间:
2014-11-01 19:02:19
阅读次数:
159
1.在Xcode5下,获取程序名字(app name)的方法为:NSString *proName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];NSLog(@"dicName ==== ...
分类:
移动开发 时间:
2014-11-01 14:40:34
阅读次数:
231
对于是否为首次安装的App可以使用如下方法来判断[[NSUserDefaults standardUserDefaults] boolForKey:@"firstLaunch"];如果App是通过App Store升级的话可以通过版本号来判断[[[NSBundle mainBundle] infoD...
分类:
移动开发 时间:
2014-10-29 19:18:14
阅读次数:
373
RootViewController.m
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
...
分类:
其他好文 时间:
2014-10-29 14:57:16
阅读次数:
123
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/newmac/Library/Developer/CoreSimulator/Devices/6BCFEB99-13E5-4550-9623-D009C0AC7637/data/Containers/Bundle/Application/1E...
分类:
移动开发 时间:
2014-10-29 14:54:46
阅读次数:
219
Main.m
/*
创建单例类
*/
int main(int argc, const char * argv[])
{
// NSBundle *bundle = [NSBundle mainBundle];
// NSFileManager *fileManager = [NSFileManager defaultManager];
SingletonC...
分类:
其他好文 时间:
2014-10-28 20:03:47
阅读次数:
183
- (IBAction)testLoadHTMLSting:(id)sender {
// 设定主页文件的基本路径
// 文件名为“index.html”
// [NSBundle mainBundle]是为了获取当前项目地址
NSString *htmlPath = [[NSBundle mainBundle]pathForResource:
...
分类:
Web程序 时间:
2014-10-20 10:04:32
阅读次数:
251