【发布时间】:2011-10-19 05:36:33
【问题描述】:
谁能告诉我如何直接在 UIView 上设置 Image ?
这是我的代码:
UIView *view=[[UIView alloc]init];
[view setImage:[UIImage imageNamed:@"image.png"]];
【问题讨论】:
-
你不想使用 UIImageView 吗?
-
你需要使用 UIImageView
-
可以设置为背景 aView.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"yourimage.png"]];
标签: iphone uiimageview addsubview