随笔分类 -  iOS开发实用技巧

熟能生巧,熟练掌握某种技术后自然会产生很多技巧。代码技巧、配置技巧、功能技巧等。
摘要:iOS程序中调用系统自带应用(短信,邮件,浏览器,地图,appstore,拨打电话) iPhone URL Schemes 阅读全文
posted @ 2013-06-28 11:05 yshch 阅读(393) 评论(0) 推荐(0)
摘要:使用方法:1. 声明一个C函数extern "C" CGImageRef UIGetScreenImage();2. CGImageRef img = UIGetScreenImage(); UIImage* scImage=[UIImage imageWithCGImage:img]; UIImageWriteToSavedPhotosAlbum(scImage, nil, nil, nil); 阅读全文
posted @ 2013-06-28 10:25 yshch 阅读(1000) 评论(0) 推荐(0)
摘要:一、旋转处理 第一步:注册通知 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeFrames:) name:UIDeviceOrientationDidChangeNotification object:nil]; 第二把:处理接收事件-(void)changeFrames:(NSNotification *)notification{ NSLog(@"change notification: %@", notification.userInfo); float 阅读全文
posted @ 2013-05-29 22:37 yshch 阅读(3620) 评论(2) 推荐(2)
摘要:一般设置UIImage的方法有: UIImage *image = [UIImage imageNamed:fileName];//不释放内存,要缓存 UIImage *image = [UIImage imageWithContentsOfFile:path];//会释放内存本文分析对比了各种更改UIView背景的方法。当然,背景是根据一个图片来的(非纯色)。原文地址:http://www.cnblogs.com/v2m_/archive/2012/07/11/2585547.html一.加一个uiimageview在uiview上面(可以) UIImageView* imageView = 阅读全文
posted @ 2013-05-29 22:32 yshch 阅读(339) 评论(0) 推荐(0)