iOS开发之有用的文章

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

來源:简书

著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容