根据plist文件来加载页面

摘要: 以下给大家代码以及相应的plist文件的截图如下:#import "SZMSettingsController.h"@interface SZMSettingsController ()@property (nonatomic,strong)NSArray *groups;@end@implemen... 阅读全文
posted @ 2015-12-05 14:32 ZMIOS 阅读(1001) 评论(0) 推荐(1) 编辑

在每一个即将被push的控制器push之前,设置viewController.hidesBottomBarWhenPushed = YES,表示这个控制器在被push的时候会隐藏底部的tabbar

摘要: #import "SZMNavBaseController.h"@interface SZMNavBaseController ()@end@implementation SZMNavBaseController- (void)viewDidLoad { [super viewDidLoad]... 阅读全文
posted @ 2015-12-04 21:41 ZMIOS 阅读(601) 评论(0) 推荐(0) 编辑

利用layer设置背景图片以及NSForegroundColorAttributeName设置颜色

摘要: @property (weak, nonatomic) IBOutlet UISegmentedControl *Sgment;@end@implementation ArenaViewController- (void)viewDidLoad { [super viewDidLoad]; ... 阅读全文
posted @ 2015-12-04 11:44 ZMIOS 阅读(3072) 评论(0) 推荐(0) 编辑

设置圆角代码

摘要: //设置图片框为圆角 ImgView.layer.cornerRadius = 7; ImgView.layer.masksToBounds = YES;//设置图片框为圆角 ImgView.layer.cornerRadius = 7; ImgView.layer.masksToBounds = ... 阅读全文
posted @ 2015-11-28 23:23 ZMIOS 阅读(261) 评论(0) 推荐(0) 编辑

队列组的简单使用

摘要: #import "HMViewController.h"// 1.分别下载2张图片:大图片、LOGO// 2.合并2张图片// 3.显示到一个imageView身上@interface HMViewController ()@property (weak, nonatomic) IBOutlet U... 阅读全文
posted @ 2015-10-30 19:51 ZMIOS 阅读(944) 评论(0) 推荐(0) 编辑

多线程的延时执行和一次性代码

摘要: 延时执行的方法:- (void)delay3{ // 3秒后回到主线程执行block中的代码// dispatch_queue_t queue = dispatch_get_main_queue();// dispatch_after(dispatch_time(DISPATCH_... 阅读全文
posted @ 2015-10-30 19:50 ZMIOS 阅读(331) 评论(0) 推荐(0) 编辑

GCD线程间的通信

摘要: #define HMGlobalQueue dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)#define HMMainQueue dispatch_get_main_queue()#import "HMViewControl... 阅读全文
posted @ 2015-10-30 19:39 ZMIOS 阅读(157) 评论(0) 推荐(0) 编辑

GCD"牛逼的中枢调度器"

摘要: GCD的基本使用:- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ // dispatch_sync : 同步,不具备开启线程的能力 // dispatch_async : 异步,具备开启线程的能力 ... 阅读全文
posted @ 2015-10-30 19:29 ZMIOS 阅读(260) 评论(0) 推荐(0) 编辑

线程间的通信

摘要: #import "HMViewController.h"@interface HMViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation HMViewContro... 阅读全文
posted @ 2015-10-30 19:19 ZMIOS 阅读(142) 评论(0) 推荐(0) 编辑

KVO运行时

摘要: #import "CZNews.h"#import //**************一定要引入这个头文件*************@implementation CZNews+(instancetype)CZNewsWithDict:(NSDictionary *)dict{ CZNews *... 阅读全文
posted @ 2015-10-27 09:50 ZMIOS 阅读(129) 评论(0) 推荐(0) 编辑