1、相关知识点: 可以利用NSKeyedArchiver 进行归档和恢复的对象类型:NSString
、NSDictionary、NSArray、NSData、 NSNumber等 使用是必须遵循NSCoding协议对象,实现两个方法: encode...
分类:
移动开发 时间:
2014-05-10 06:55:44
阅读次数:
400
tableView 实现的方法 无分组的cell
#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.contacts.count;
}
- (UITable...
分类:
移动开发 时间:
2014-05-09 21:03:32
阅读次数:
424
类别.h@interface
NSString(XXXXXX)-(NSInteger)getLen;@end.m@implementation
NSString(XXXXXX) -(NSInteger)getLen{ return
0;}@end//////////////////////////....
分类:
移动开发 时间:
2014-05-08 20:20:28
阅读次数:
365
当使用Objective-C的时候,你总会遇到Foundation 框架中的一些类,这些类包括NSString,NSNumber,NSArray和NSDictionary,这些数据结构都是自解释的。
Objective-C以简明详细的语法而著名,自从oc1.0有一个简单的方式定义一个NSString变量,我们可以这样声明一个字符串变量
NSString *someString...
分类:
其他好文 时间:
2014-05-04 18:21:11
阅读次数:
351
系统字体NSArray *familyNames = [[NSArray alloc]
initWithArray:[UIFont familyNames]];NSArray *fontNames;NSInteger indFamily,
indFont;for (indFamily=0; indF...
分类:
移动开发 时间:
2014-05-01 09:25:36
阅读次数:
572
归档也叫序列化,是将文件存在硬盘,解码是从硬盘还原一、使用属性列表进行归档
如果对象是NSString,NSDictionary,NSArray,NSData,NSNumber,NSDate,可以是使用writeToFile:atomically方法将数据写到文件,注意这种方式是明文。
NS...
分类:
其他好文 时间:
2014-04-30 15:34:09
阅读次数:
396
//1.创建一个数组对象 int、float、char等等C语言的类型无法直接放到OC的数组里面
NSMutableArray*array = [NSMutableArrayarrayWithObjects:@"1",@"2",nil];
//2.使用NSNumber对NSInte...
分类:
其他好文 时间:
2014-04-30 00:53:19
阅读次数:
519
希望这个从UITableViewDelegate协议里得到的方法可以对你有所帮助:- (UIView
*) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{ UIView *headerVi....
分类:
移动开发 时间:
2014-04-29 23:10:47
阅读次数:
809