//NSString .... NSString *str1 = @"str1"; NSLog(@"str %@",str1); //NSArray NSArray *arr1 = @[@"one",@"two",@"three",@"four",@YES,@...
分类:
移动开发 时间:
2014-11-20 01:29:01
阅读次数:
259
//文件路径 //1.Home主目录:里面有Document, library,tem,和一个应用程序 NSLog(@"%@",NSHomeDirectory()); //2.Document路径 NSString *docuPath=NSSearchPathForDirectoriesIn...
分类:
其他好文 时间:
2014-11-20 00:03:23
阅读次数:
227
//将“?文艺?青年”改成“213?青年”。 NSString *str = @"文艺青年"; NSString *str1 = [str stringByReplacingOccurrencesOfString:@"文艺" withString:@"213"]; NSLog(@"%@",str1....
分类:
其他好文 时间:
2014-11-19 20:17:45
阅读次数:
203
NSEnumerator用法小结 NSLog(@"Hello, World!"); NSDictionary *myDic=[[NSDictionary alloc]initWithObjectsAndKeys:@"张三",@"name",@"李四",@"name", nil]; ...
分类:
编程语言 时间:
2014-11-19 20:16:52
阅读次数:
259
LLDB调试命令初探MAR 17TH, 2014如果你在平时的开发中从未使用过调试器,那你恐怕不知道一个调试器的作用有多大。你可能只满足于通过printf或者NSLog输出信息用于调试。但你只要试着尝试在调试中开始使用调试器LLDB,你会马上感受到调试器给你带来的便利。LLDB是LLVM下的调试器。...
分类:
移动开发 时间:
2014-11-19 12:13:45
阅读次数:
374
一、NSRangeNSRange的定义:typedef struct _NSRange {
NSUInteger location;
NSUInteger length;
} NSRange;NSRanage的使用: NSRange range = NSMakeRange(8, 10);
NSLog(@"location:%zi", range.locati...
分类:
其他好文 时间:
2014-11-17 22:50:43
阅读次数:
243
代码:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. NSLog(@"---isUrl--%i--",[self isUrl:@"htt...
分类:
Web程序 时间:
2014-11-17 15:49:35
阅读次数:
161
在开发过程中,我们经常需要用到NSLog输出一些信息,甚至有的开发过程,必须在控制台查看输出,有经验的程序员通过控制台输出就能知道整个数据交互的一个流程。但是一个发布的程序,里面带有太多的NSLog输出,肯定对于App性能有所影响,这时候我们可以使用一个宏定义来处理,在开发的时候使用DEBUG模式,...
分类:
其他好文 时间:
2014-11-17 12:20:42
阅读次数:
140
1.检测不到reduce方法,因为Complex类中没有定义;2.合法。因为id类型可以用来存储属于任何类的对象(不能为id变量使用点运算符)3. 1 //XYPoint类print方法 2 3 4 - (void) print 5 { 6 NSLog(@" (%g , %g) ", x...
分类:
其他好文 时间:
2014-11-13 18:48:42
阅读次数:
225
一、NSString创建字符串。NSString*astring=@"ThisisaString!";创建空字符串,给予赋值。NSString*astring=[[NSStringalloc]init];astring=@"ThisisaString!";NSLog(@"astring:%@",as...
分类:
移动开发 时间:
2014-11-13 14:36:53
阅读次数:
265