自写类目
valueTuan
尊严不是别人给的,是靠自己争取的。
展开
-
通过nextResponder查找控制器(类目)
#import "UIView+ViewController.h" @implementation UIView (ViewController) - (UIViewController *)viewController { UIResponder *next = self.nextResponder; do {原创 2015-04-01 22:50:34 · 358 阅读 · 3 评论 -
图片上绘制水印文字(类目)
#import "UIImage+Watermark.h" @implementation UIImage (Watermark) - (UIImage *)watermarkImageWithText:(NSString *)text { //1.取到上下文 UIGraphicsBeginImageContext(self.size);原创 2015-04-01 13:23:42 · 670 阅读 · 0 评论 -
封装数据加载方法
+ (void)requestWithURL:(NSString *)url methdod:(NSString *)method params:(NSDictionary *)params completion:(Completion)com { //url: body key=valu原创 2015-04-03 22:22:50 · 601 阅读 · 1 评论 -
用单例封装Core Data中的MO
#import "DataBaseManager.h" static DataBaseManager *instance = nil; @implementation DataBaseManager + (DataBaseManager *)sharedManager { static dispatch_once_t onceToken;原创 2015-04-03 22:31:32 · 1361 阅读 · 1 评论