摘要: 一、获取文件属性的方法: 1> NSDictionary *folderAttr = [[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil]; 获取文件夹大小:[folderAttr objectForKey:NSFileSystemSize]; 剩余空间:[folderAttr objectForKey:NSFileSystemFreeSize]; 代替方法:fileSystemAttributesAtPath 2> NSDictionary * file 阅读全文
posted @ 2013-05-29 22:41 yshch 阅读(801) 评论(0) 推荐(1) 编辑
摘要: 一、旋转处理 第一步:注册通知 [[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 阅读(3594) 评论(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 阅读(330) 评论(0) 推荐(0) 编辑