摘要: 1> 一个NSBundle代表一个文件夹,利用NSBundle能访问对应的文件夹2> 利用mainBundle就可以访问软件资源包中的任何资源 // 利用mainBundle就可以访问软件资源包中的任何资源 NSBundle *bundle = [NSBundle mainBundle]; // 获得某文件的全路径 NSString *path = [bundle pathForResource:filename ofType:nil]; UIImage *image = [UIImage imageWithContentsOfFile:path]; 阅读全文
posted @ 2014-03-26 23:29 lanchong910 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1> 使用场合* UIImageView: 如果仅仅是显示图片,不需要监听图片的点击* UIButton: 既要显示图片,又要监听图片的点击2> 相同点:能显示图片3> 不同点* UIButton能处理点击事件, UIImageView不能处理点击事件* UIButton既能显示图片, 又能显示文字* UIButton能同时显示两张图片* UIButton继承自UIControl, 因此默认就能处理事件* UIImageView继承自UIView, 因此默认就不能处理事件 阅读全文
posted @ 2014-03-26 23:18 lanchong910 阅读(95) 评论(0) 推荐(0) 编辑