5月笔记



NSArray * varr = [self subviews];

for (int i = 0; i < [varr count]; i++)

{

NSLog(@"*********** i = %d, tag = %d class = %@", i, [[varr objectAtIndex:i] tag],

  [[varr objectAtIndex:i] class]);

}



//run the function after the delay time

 [self performSelector:@selector(func) withObject:nil afterDelay:0.2];



响应消息的原理:由消息中心类再监控到消息的时候去分别调用,其本质还是指针调用,和信号响应不一样

[[NSNotificationCenter defaultCenter] addObserver:self 

selector:@selector(theFunc

name:a_name_NOTIFY

  object:nil];



{

m_date = [NSDate date];

}


{

 m_str = [NSString stringwithFormat: ];

}


is like 


{

char arr[9];

m_p = arr;

}


and that is wrong and dangerous 


当错误日志为 0x0099  没有**方法的时候

但是看起来这个类有这样的方法,这个时候,就需要考虑是不是这个指针已经被释放了,成了野指针,所以调方法会出错



<key>aStr</key>

<string>find %@ request</string>


[NSString stringwithFormat: @"", ]


[NSString stringwithFormat: aStr, ]  可以这样去设置组装格式



没有更多推荐了,返回首页