摘要:
最普通动画:1 //开始动画2 [UIView beginAnimations:nil context:nil];3 //设定动画持续时间4 [UIView setAnimationDuration:2];5 //动画的内容6 frame.origin.x += 150;7 [img setFram... 阅读全文
摘要:
1 //行的高度。 2 -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 3 NewNotificationCell *cell = (NewNotif... 阅读全文
摘要:
NSString类中提供了这样三个方法用于获取子字符串:–substringFromIndex:–substringWithRange:–substringToIndex:具体的使用见下面代码即可知道。NSString *str = @"12345";// NSString *subString0 ... 阅读全文
摘要:
1、明确函数要做什么 在给函数命名前,明确函数到底要做什么。这有利于给函数命名。2、以动词开头 函数总是做些什么,所以当然要以动词开头。3、尽量不要以 do 开头 do 并不能给我们提供任何函数的信息。相比之下,search, compute, handle 之类的动词暗示着函数大概做了什么。... 阅读全文