ios 方法实现
文章平均质量分 62
白小纯不单纯
我是一个在不断杀怪积累经验,练级的小强,我在成神的路上。
展开
-
文件存储
"font-size:24px;">UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); // 保存图片到指定的路径 NSData *data = UIImagePNGRepresentation(newImage); [data writeToFile:@"/Users/user转载 2016-10-25 15:28:50 · 257 阅读 · 0 评论 -
浅谈iOS开发中方法延迟执行的几种方式
Method1. performSelector方法Method2. NSTimer定时器Method3. NSThread线程的sleepMethod4. GCD公用延迟执行方法- (void)delayMethod{ NSLog(@"delayMethodEnd");}Method1:performSelector[self performSelec转载 2016-10-25 15:32:11 · 227 阅读 · 0 评论 -
iOS charts 的OC 使用
#iOS charts 的OC 使用及 ios 框架 文件夹是蓝色的和黄色区别 NSURLConnection finished with error - code -1100##NSURLConnection finished with error - code -1100在集成Charts的时候遇到code -1100的问题,原因是引入的js文件方式不对。错误提示如下❌以及文件格式:这...原创 2018-11-06 13:27:02 · 1402 阅读 · 1 评论 -
绘制表盘
// 表盘(void)drawWatchFaceWithRect:(CGRect)rect {CGContextRef ctx = UIGraphicsGetCurrentContext();CGPoint center = CGPointMake(rect.size.width * 0.5, rect.size.height * 0.5);CGFloat radius = rect....转载 2018-11-02 13:14:58 · 815 阅读 · 0 评论 -
UICollectionView代码块
UICollectionView代码块- (UICollectionView *)collectionView{ if (_collectionView == nil) { UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc] init]; _collectionVi...原创 2018-11-28 15:29:31 · 294 阅读 · 0 评论