码迷,mamicode.com
首页 >  
搜索关键字:nsbundle    ( 385个结果
NSBundle,UIImage,UIButton的使用
1.NSBundle1> 一个NSBundle代表一个文件夹,利用NSBundle能访问对应的文件夹2> 利用mainBundle就可以访问软件资源包中的任何资源3> 案例: // File : 全路径 // NSBundle : 一个NSBundle代表一个文件夹 ...
分类:其他好文   时间:2015-03-05 23:44:21    阅读次数:140
iOS获取应用程序信息,版本号,程序名等
转载▼ iOS获取应用程序信息NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];其中的信息示范:版本号:[infoDictionary objectForKey:@"CFBundleVersion"];应用程序...
分类:移动开发   时间:2015-03-04 18:24:25    阅读次数:162
iOS一些常用的小知识点
//获取全局的Delegate对象,这样我们可以调用这个对象里的方法和变量 [[UIApplication sharedApplication] delegate]; //获得程序的主Bundle NSBundle *bundle = [NSBundle mainBundle]; /* 在...
分类:移动开发   时间:2015-03-02 09:26:14    阅读次数:151
viewDidLoad、viewWillAppear、viewWillDisappear
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNilviewDidLoadviewWillAppearviewWillDisapppear《iOS编程》P137关于视图的初...
分类:移动开发   时间:2015-02-24 23:20:59    阅读次数:171
reason: 'Could not load NIB in bundle: "XXXXXXX" with name 'xxCell'
错误信息:reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'collectViewCell'' 查找原因:UICollectionView注册的是时候出错; 如下: [self.collectionView registerNib:[UINib nibWithNibName:@"sch...
分类:其他好文   时间:2015-02-14 16:18:40    阅读次数:834
Gif图片的解析
//加载gif 02 03 NSString *filePath = [[NSBundle mainBundle]pathForResource:@"bai3" ofType:@"gif"]; 04 05 NSData *data = [NSData da...
分类:其他好文   时间:2015-02-13 19:50:48    阅读次数:187
iOS:获取当前app版本
//软件版本 - (void)softwareVersion { NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary]; NSString *currentVersion = [NSString stringWithFormat:@"当前软件版本为:%@",infoDic[@"CFBundleShortVers...
分类:移动开发   时间:2015-02-09 20:21:32    阅读次数:148
【旧事重提】iOS中文件读写
---恢复内容开始---1. 读取文件 (本地 UTF-8编码的文本文件) NSString *filePath = [[NSBundle mainBundle] pathForResource:@"song" ofType:@"json"]; NSString *str =[NSString s....
分类:移动开发   时间:2015-02-07 18:47:21    阅读次数:153
iOS xib的使用详解
1.File’s Owner为nil UIView *demo1 = [[[NSBundle mainBundle] loadNibNamed:@"demo1" owner:nil options:nil] lastObject]; CGRect rect = demo1.frame; rec...
分类:移动开发   时间:2015-02-03 20:59:18    阅读次数:565
版本号的获取以及新特性
NSString * key = (__bridge NSString *) kCFBundleVersionKey; /// 当前软件的版本号 NSString * currentVersion = [NSBundle mainBundle].infoDictionary[key]; ...
分类:其他好文   时间:2015-02-03 18:50:21    阅读次数:155
385条   上一页 1 ... 26 27 28 29 30 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!