【发布时间】:2010-10-05 23:18:49
【问题描述】:
我有一个带有标准 UIViewController/UIView 设置的 iPad 应用程序 - 允许所有旋转。 UIView 绘制一些平铺图像作为背景(平铺为 256*256 像素):
- (void)drawRect:(CGRect)rect
{
[[UIImage imageNamed: @"Background.png"] drawAsPatternInRect: rect];
}
当我转动我的 iPad 时,我可以看到在旋转过程中,原始方向的图像图案被 缩放 以适应新的方向。然后 - 动画完成后 - 视图重绘其背景图案,最终配置未缩放。从缩放模式切换到非缩放模式看起来有点难看。
有没有办法绕过(或隐藏)背景图案的这种拉伸?
【问题讨论】:
标签: uiview background rotation design-patterns tile