最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Xcode开发加载图片到app实例
时间:2022-06-25 23:51:53 编辑:袖梨 来源:一聚教程网
本文图片针对xcode版本为4.2
其他版本源码应该一致,可以参考。
代码如下 | 复制代码 |
DidLoad { [super viewDidLoad]; UIImageView *subview = [[UIImageView alloc] initWithFrame: CGRectMake(10.0f, 10.0f, 268.0f, 307.0f)]; [subview setImage:[UIImage imageNamed:@"22.png"]]; [self.view addSubview:subview]; // Do any additional setup after loading the view, typically from a nib. } |
5.执行一下
效果如下
Xcode一直没找到比较好的教程,一路摸索,到处搜索资料,特此分享,摸到这里的朋友希望能少走弯路。
相关文章
- 神宠降临冒险解密工具作用及获取方法 10-14
- 洛伊的移动要塞力量殿堂玩法规则说明 10-14
- 华夏千秋邬月朗打法攻略分享 10-14
- 《高达钢铁之诗》卡碧尼参战!一人成军,女王之威再临! 10-14
- 长生天机降世逃离地窟任务攻略 10-14
- 弹弹星球宠物作用及获取方法分享 10-14