2016年1月9日
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { /* 第1题 字符串中的world替换为i bookan wisdom */ // NSString *str1=@"hello worl... 阅读全文
posted @ 2016-01-09 16:57 暂停 阅读(186) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSString* str = @"abc123.xyz789"; NSInteger len = [str length]; NSMutab... 阅读全文
posted @ 2016-01-09 15:16 暂停 阅读(1226) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSString *string=@"2013 年 05 月 05 日"; NSRange strc=NSMakeRange(0, 4); N... 阅读全文
posted @ 2016-01-09 15:05 暂停 阅读(263) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSNumber *num=[NSNumber numberWithInt:123456789]; NSString *string=[NSStri... 阅读全文
posted @ 2016-01-09 15:03 暂停 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 和果子博客园::首页::新随笔::联系::订阅::管理 9 Posts:: 0 Stories :: 1 Comments :: 0 Trackbacks公告昵称:和果子园龄:1年6个月粉丝:6关注:3+加关注搜索常用链接我的随笔我的评论我的参与最新评论我的标签我的标签oc零基础(4)面向对象(4)... 阅读全文
posted @ 2016-01-09 14:03 暂停 阅读(254) 评论(0) 推荐(0) 编辑
摘要: #import #define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])int main(int argc, const char * argv[... 阅读全文
posted @ 2016-01-09 13:56 暂停 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSDictionary *dic=@{@"1":@"02", @"2":@"30", @"3":@"... 阅读全文
posted @ 2016-01-09 13:30 暂停 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSMutableArray* array = [NSMutableArray arrayWithObjects:@"6",@"34",@"56",@"7... 阅读全文
posted @ 2016-01-09 13:26 暂停 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //nsstring父类 NSMutableString可变字符串子类 NSMutableString *mustr=[[NSMutableSt... 阅读全文
posted @ 2016-01-09 13:18 暂停 阅读(287) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSString *str=@"180-234-140-22"; NSString *newStr=[str stringByReplacingOc... 阅读全文
posted @ 2016-01-09 13:16 暂停 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool {NSString *str=[[NSString alloc]initWithString:@"a"];NSString *str1=[[NSString all... 阅读全文
posted @ 2016-01-09 13:12 暂停 阅读(220) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSDictionary *dic=@{@"name":@"小明", @"class":@"IOS6", ... 阅读全文
posted @ 2016-01-09 13:03 暂停 阅读(402) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //1.以下是身份证号,输出身份证人的性别,名字 // NSString *idCard=@210423198809040427; //身份证倒数#... 阅读全文
posted @ 2016-01-09 13:00 暂停 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //数组 //快速创建数组 NSArray *week=@[@"MON",@"TUE",@"WED",@"THU",@"FRI",@"SAT"... 阅读全文
posted @ 2016-01-09 11:27 暂停 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //数组内排序 NSArray *week=@[@"MON",@"TUE",@"WED",@"THU",@"FRI",@"SAT",@"SUN" ]... 阅读全文
posted @ 2016-01-09 11:23 暂停 阅读(217) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //可变字典 NSMutableDictionary *nud=[[NSMutableDictionary alloc]initWithObject... 阅读全文
posted @ 2016-01-09 11:21 暂停 阅读(233) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { /*字典:NSDictionary 存储数据用的 和数组的区别:字典使用键值方式、无序的 2 相当于我们使用字典通过目录来查找具体字的解释 ... 阅读全文
posted @ 2016-01-09 11:17 暂停 阅读(280) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //可变数组继承不可变数组 //1创建 设定元素个数进行创建 NSMutableArray *str=[NSMutableArray array... 阅读全文
posted @ 2016-01-09 11:08 暂停 阅读(245) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSArray *arr=@[@"MON",@"TUE",@"WED"]; //下标遍历 1 for (int i=0; i<[arr ... 阅读全文
posted @ 2016-01-09 11:06 暂停 阅读(2303) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //@"6",@"34",@"56","78"存入数组,并进行排序降序输出结果 NSArray*arr=@[@"6",@"34",@"56",@"78"... 阅读全文
posted @ 2016-01-09 11:04 暂停 阅读(226) 评论(0) 推荐(0) 编辑