IOS
文章平均质量分 80
ms2146
这个作者很懒,什么都没留下…
展开
-
NSString 使用小结
#import int main(int argc, const char * argv[]){ @autoreleasepool { //字符串常量(常量区) NSString *string1 = @"字符串常量"; NSLog(@"string1 : %@", string1); //空字符串原创 2013-03-09 16:58:46 · 5246 阅读 · 0 评论 -
NSArray使用小结
#import int main(int argc, const char * argv[]){ @autoreleasepool { //类方法数组创建 NSArray *array1 = [NSArray arrayWithObject:@"obj"]; NSArray *array2 = [NSArray arr原创 2013-03-09 17:48:36 · 36926 阅读 · 1 评论 -
NSDictionary使用小结
#import int main(int argc, const char * argv[]){ @autoreleasepool { //创建字典 NSDictionary *dic1 = [NSDictionary dictionaryWithObject:@"value" forKey:@"key"]; NSLog(@"di原创 2013-03-10 20:21:23 · 58389 阅读 · 0 评论 -
NSSet使用小结
#import int main(int argc, const char * argv[]){ @autoreleasepool { NSSet *set1 = [NSSet setWithObjects:@"a", @"b", @"c", @"d", nil]; NSSet *set2 = [[NSSet alloc] ini原创 2013-03-10 21:29:29 · 16198 阅读 · 0 评论 -
利用NSKeyedArchiver归档对象
单个对象归档: NSArray *array = @[@"111", @"aaa", @333, @"asdf3111"]; NSString *homePath = NSHomeDirectory(); NSString *filePath = [homePath stringByAppendingPathComponent:@"test.t原创 2013-03-16 22:11:04 · 2287 阅读 · 1 评论 -
IOS KVC使用小结
Person.h#import #import "Father.h"#import "Book.h"@interface Person : NSObject {@public NSString *_fullName;@private NSString *_name; Father *_father; NSArray *_books;}@end原创 2013-03-17 13:14:05 · 2882 阅读 · 0 评论 -
IOS KVO使用小结
Book#import "Book.h"@implementation Book@synthesize price = _price;- (id) init { self = [super init]; if (self) { self.price = 100.0; [NSTimer scheduledTimerWithTimeInte原创 2013-03-17 14:41:33 · 2870 阅读 · 0 评论 -
NSPredicate使用小结
Person#import @interface Person : NSObject { NSString *_name; NSNumber *_age;}@property(nonatomic, retain) NSString *name;@property(nonatomic, retain) NSNumber *age;@end使用:#impo原创 2013-03-17 19:24:03 · 1077 阅读 · 0 评论