1、iOS weak 关键字漫谈 :
http://mrpeak.cn/blog/ios-weak/
2、加载gif图片用到的框架:推荐使用这个框架 FLAnimatedImage
3、判断两个rect是否有交叉
if (CGRectIntersectsRect(rect1, rect2)) {}
4、判断某一行的cell是否已经显示
CGRect cellRect= [tableView rectForRowAtIndexPath:indexPath];
BOOL completelyVisible= CGRectContainsRect(tableView.bounds, cellRect);
5、动画修改label上的文字
// 方法一CATransition*animation = [CATransitionanimation]; animation.timingFunction = [CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseInEaseOut]; animation.type = kCATransitionFade; animation.duration =0.75; [self.label.layer addAnimation:animation forKey:@"kCATransitionFade"];self.label.text =@"New";// 方法二[UIViewtransitionWithView:self.label duration:0.25f options:UIViewAnimationOptionTransitionCrossDissolveanimations:^{self.label.text =@"Well done!"; } completion:nil];// 方法三[UIViewanimateWithDuration:1.0animations:^{self.label.alpha =0.0f;self.label.text =@"newText";self.label.alpha =1.0f; }];
作者:杂雾无尘
链接:http://www.jianshu.com/p/9fcd37c0ea05
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。