摘要: 基础回顾:get方法和set方法定义类成员变量时,可以在@interface中定义,也可以在@implementation中定义:在@interface中声明,成员变量的状态是受保护的,即“@protected”;在@implementation中声明,成员变量的状态是私有的,即“@private”... 阅读全文
posted @ 2016-01-13 20:44 零点五 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 代码:#import int main(int argc, const char * argv[]) { @autoreleasepool { //初始化NSSet NSSet *set1=[NSSet set]; NSSet *set2=[NSSet... 阅读全文
posted @ 2016-01-11 13:31 零点五 阅读(1243) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-01-10 21:55 零点五 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 代码:#import int main(int argc, const char * argv[]) { @autoreleasepool { NSMutableArray *array = [NSMutableArray arrayWithObjects:@"3",@"2",@... 阅读全文
posted @ 2016-01-10 21:48 零点五 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 代码:#import int main(int argc, const char * argv[]) { @autoreleasepool { /* 简述:Cocoa框架中的NSPredicate用于查询,原理和用法都类似于SQL中的where,作用相当于数据库的... 阅读全文
posted @ 2016-01-10 21:44 零点五 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 代码:main:#import #import "Student.h"int main(int argc, const char * argv[]) { @autoreleasepool { Student *stu1=[[Student alloc]initWithName:@... 阅读全文
posted @ 2016-01-10 13:56 零点五 阅读(1285) 评论(0) 推荐(0) 编辑
摘要: 代码:#import static NSString * const kName = @"name";static NSString * const kAge = @"age";static NSString * const kGender = @"gender";inline static NSM... 阅读全文
posted @ 2016-01-09 09:39 零点五 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 代码:#import int main(int argc, const char * argv[]) { @autoreleasepool { //将字典的key从Z->A排序,按排序后的key的顺序,输出value,将value按字符串输出 NSDictionar... 阅读全文
posted @ 2016-01-09 09:39 零点五 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 代码?#import int main(int argc, const char * argv[]) { @autoreleasepool { /** * 第1题 请将如下数据存储成字典,并将字典内容以字符串形式输出,输出:"XXX,年龄XXX岁,职业XXX"(将... 阅读全文
posted @ 2016-01-09 09:38 零点五 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 代码:#import int main(int argc, const char * argv[]) { @autoreleasepool { //1.对字符串“2015-09-01 08:19:10”操作,输出"08:19:10"。要求使用两种截取方式。 NSSt... 阅读全文
posted @ 2016-01-09 09:36 零点五 阅读(189) 评论(0) 推荐(0) 编辑