摘要:#import "HMViewController.h"// 1.分别下载2张图片:大图片、LOGO// 2.合并2张图片// 3.显示到一个imageView身上@interface HMViewController ()@property (weak, nonatomic) IBOutlet U...
阅读全文
摘要:延时执行的方法:- (void)delay3{ // 3秒后回到主线程执行block中的代码// dispatch_queue_t queue = dispatch_get_main_queue();// dispatch_after(dispatch_time(DISPATCH_...
阅读全文
摘要:#define HMGlobalQueue dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)#define HMMainQueue dispatch_get_main_queue()#import "HMViewControl...
阅读全文
摘要:GCD的基本使用:- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ // dispatch_sync : 同步,不具备开启线程的能力 // dispatch_async : 异步,具备开启线程的能力 ...
阅读全文
摘要:#import "HMViewController.h"@interface HMViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation HMViewContro...
阅读全文
摘要:#import "CZNews.h"#import //**************一定要引入这个头文件*************@implementation CZNews+(instancetype)CZNewsWithDict:(NSDictionary *)dict{ CZNews *...
阅读全文
摘要:// oc 奇偶填充- (void)test11{ UIBezierPath* path = [UIBezierPath bezierPathWithRect:CGRectMake(100, 100, 200, 100)]; [path addArcWithCenter:CGPointM...
阅读全文
摘要:在开发过程中,我们很多时候要在两个控制器之间进行值的传递,那么究竟两个控制器之间怎么来传递值呢?下面就给大家简单的介绍一下:一.顺传也是就当A控制器跳到B控制,我们想把A控制器中的一些数据传递给B控制器,这就是顺传,也就是从A到B顺着传递.首先想了解顺传要先了解一个方法,这个方法就是在A控制器跳转...
阅读全文
摘要:- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return _array.count;}- (UITableViewCell *)tableView:(UIT...
阅读全文
摘要:@interface UIView : UIResponder/** * 通过一个frame来初始化一个UI控件 */- (id)initWithFrame:(CGRect)frame;// YES:能够跟用户进行交互@property(nonatomic,getter=isUserInterac...
阅读全文
摘要:UIApplication是一个应用程序的象征并且是一个单例对象方法:openURL(打电话,发短信)// NSURL 资源唯一路径的地址// 规范: 协议头://主机地址/资源路径// 网络资源: http://www.baidu.com/image/123.png// 本地资源: file://...
阅读全文
摘要:一.UIPickerView1.UIPickerView的常见属性// 数据源(用来告诉UIPickerView有多少列多少行)@property(nonatomic,assign) id dataSource;// 代理(用来告诉UIPickerView每1列的每1行显示什么内容,监听UIPick...
阅读全文