【发布时间】:2011-12-26 00:54:42
【问题描述】:
我有一个UIView,我用这种方式设置了背景图片:
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"sfond-appz.png"]];
我的问题是背景图像不在视图内居中,但它会重放几次以填充所有视图。有没有办法让 uiview 中的图像居中并显示屏幕尺寸?
注意:我不能使用 UIImageView 作为背景,因为我有一个 scrollview。
【问题讨论】:
-
为什么不先手动调整图像大小?
标签: iphone objective-c uiview background