摘要: + (UIImage *)accelerateBlurWithImage:(UIImage *)image{ if (image==nil) { NSLog(@"error:为图片添加模糊效果时,未能获取原始图片"); return nil; } //... 阅读全文
posted @ 2016-01-11 11:38 NHW 阅读(314) 评论(0) 推荐(0) 编辑
摘要: - (void)fullButtonAction:(UIButton *)sender{ UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; if ([sender.titleLabel.text isEqualT... 阅读全文
posted @ 2015-12-07 19:37 NHW 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 1.将cell坐标转换为Window中的坐标 CGRect inWindowFrame = [self.superView convertRect:self.frame toView:keyWindow]; 注意:一定是母体将cell的坐标转换为对应目标坐标系的坐标 阅读全文
posted @ 2015-12-07 19:33 NHW 阅读(267) 评论(0) 推荐(0) 编辑
摘要: NSURL *url = [NSURL URLWithString:@"http://www.baidu.com/search?id=1"];2NSLog(@"scheme:%@", [url scheme]);//协议 http3NSLog(@"host:%@", [url host]);//域名... 阅读全文
posted @ 2014-08-22 11:03 NHW 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1.给定圆心,围绕圆心来转动UIView *anmicationView = [[UIView alloc]initWithFrame:CGRectMake(100, 100, 4, 4)]; anmicationView.backgroundColor = [UIColor redColor];... 阅读全文
posted @ 2014-07-31 19:31 NHW 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 通过命令行,到当前目录下:git reflog 后显示如下:这次你发现了你最近提交的描述,然后拷贝你最近提交描述最前面的id号:(黄色的字符串)进入git工具中后新建分支,将你刚才拷贝的id填入specified commit 后面的输入框中 ,新建名叫:test分支这时候,奇迹出现了,test分支... 阅读全文
posted @ 2014-05-23 17:11 NHW 阅读(3594) 评论(0) 推荐(0) 编辑
摘要: 1.建立一个empty的工程2.建立一个xib取名叫“MainWindow”3.给新建的xib添加一个window(直接拖出来)4.再在window上拖出object控件5,将拖出来的object和window控件关联: a.将object选择为appDelegate类 b.将file's Owner选择为UIApplication 7.将file's Owner 和object连线 8.在plist文件中增加main nib file base name 9.将main nib file base name赋值为MainWindow10.在mainwindow中拖出一个tab 阅读全文
posted @ 2014-03-18 12:25 NHW 阅读(798) 评论(0) 推荐(0) 编辑
摘要: ios 扩大uibutton的响应区域博客分类:ios给UIButton 建立一个Category--UIButton+EnlargeEdge.h#import @interface UIButton (EnlargeEdge)- (void)setEnlargeEdge:(CGFloat) size;- (void)setEnlargeEdgeWithTop:(CGFloat) top right:(CGFloat) right bottom:(CGFloat) bottom left:(CGFloat) left;@end--UIButton+EnlargeEdge.m#import &q 阅读全文
posted @ 2014-03-10 21:18 NHW 阅读(405) 评论(0) 推荐(0) 编辑
摘要: UIScrollView 原理详解ScrollView UIScrollView UIScrollView为了显示多于一个屏幕的内容或者超过你能放在内存中的内容。 Scroll View为你处理缩小放大手势,UIScrollView实现了这些手势,并且替你处理对于它们的探测和回应。其中需要注意的子类是UITableView以及UITextView(用来显示大量的文字)。还有一个UIWebView,尽管那不是UIScrollView的直接子类,它适用UIScrollView去显示网页内容 contentsize是内容的宽和高,contentsize.width是内容的宽度,contentsize 阅读全文
posted @ 2014-03-07 13:45 NHW 阅读(80) 评论(0) 推荐(0) 编辑
摘要: UIApplication sharedApplication详细解释-IOS分类:iOS开发2012-07-27 10:2510287人阅读评论(2)收藏举报applicationuiviewios活动url工作iPhone应用程序是由主函数main启动,它负责调用UIApplicationMain函数,该函数的形式如下所示:int UIApplicationMain (int argc,char *argv[],NSString *principalClassName,NSString *delegateClassName);那么UIApplicationMain函数到底做了哪些事情呢?这 阅读全文
posted @ 2014-02-26 14:25 NHW 阅读(110) 评论(0) 推荐(1) 编辑