摘要: UIViewController *controller = self.view.window.rootViewController; controller.modalPresentationStyle = UIModalPresentationCurrentContext; ... 阅读全文
posted @ 2015-06-26 17:37 swu_luo 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 【转载自 http://www.cocoachina.com/ios/20141223/10731.html】虽然iOS很早就支持使用模糊效果对图片等进行处理,但尤其在iOS7以后,半透明模糊效果得到大范围广泛使用。包括今年最新发布的iOS8也沿袭了这一设计,甚至在OS X 10.10版Yosemi... 阅读全文
posted @ 2015-06-26 17:33 swu_luo 阅读(208) 评论(0) 推荐(0) 编辑
摘要: // 高斯模糊 CIContext *context = [CIContext contextWithOptions:nil]; CIImage *inputImage = [[CIImage alloc] initWithImage:image]; CIFilter *f... 阅读全文
posted @ 2015-06-26 17:27 swu_luo 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1. strcat 拼接 【注意:拼接后的字符串长度不能超过字符串申请的内存空间长度,否则会报错】char s1[30] = {'L', 'm', 'j', '\0', 'L', 'o', 'v', 'e', '\0'};strcat(s1, "OC");printf("%s", s1); 阅读全文
posted @ 2015-05-08 23:35 swu_luo 阅读(136) 评论(0) 推荐(0) 编辑
摘要: sizeof一共有3种形式(以64位编译器为例)如何查看编译器是多少位? sizeof(void *);sizeof( 变量\常量 )sizeof(10); // 长度为4char c = 'a'; sizeof(c); // 长度为1sizeof ('a') // 长度为4,字... 阅读全文
posted @ 2015-05-08 11:41 swu_luo 阅读(1013) 评论(0) 推荐(0) 编辑
摘要: 话不多说,拿来主义,直接上代码!PS:打印最短路径我还不晓得怎么加,如有哪位大神知道,还请mark一下! 1 /*********************************************************************** 2 * File: Fibonacci... 阅读全文
posted @ 2014-05-25 23:39 swu_luo 阅读(1868) 评论(0) 推荐(0) 编辑
摘要: 最近项目中需要用到,查了两天资料,还是选择了“拿来主义”,以下是我最满意的几篇:PS:不得不赞一下老外,我再次“崇洋媚外”了,开玩笑了!知识无国界,不过老外的编程习惯真的很好,看着规规矩矩的注释,在做一些适合自己项目的改动时,有点“自惭形秽”的赶脚。慢慢改变自己的编程习惯,Fighting!!!ht... 阅读全文
posted @ 2014-05-25 18:37 swu_luo 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://www.cnblogs.com/maxfong/p/3375167.htmliOS7之前的UI为:而在iOS7中,由于设计方面的原因,使得UI变为:修改的方法重写UINavigationItem的setLeftBarButtonItem和setRightBarButtonIte... 阅读全文
posted @ 2014-05-17 18:24 swu_luo 阅读(420) 评论(0) 推荐(0) 编辑
摘要: UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];//button的类型 button.frame = CGRectMake(100, 100,90, 90);//button的frame button.backgro... 阅读全文
posted @ 2014-05-08 11:47 swu_luo 阅读(19778) 评论(0) 推荐(0) 编辑
摘要: iPhone 屏幕适配判断 和 iOS系统版本判断if([[[UIDevicecurrentDevice]systemVersion]floatValue]>=7.0) { // iOS7.0及以上版本系统适配}if([UIScreen mainScreen].bounds.size.heig... 阅读全文
posted @ 2014-05-08 10:35 swu_luo 阅读(372) 评论(0) 推荐(0) 编辑