【发布时间】:2013-07-16 07:22:53
【问题描述】:
我在 IOS7 中将背景图像设置为 UIView 时遇到问题。我没有得到在 IOS7 中所做的所有缩放更改。在 IOS6 中它运行良好但在 IOS7 中没有。这里是代码我想做什么
UIGraphicsBeginImageContext(self.view.bounds.size);
[[UIImage imageNamed:@"loginframe.png"] drawInRect:self.view.bounds];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
mloginview=[[UIView alloc]initWithFrame:CGRectMake(30,70,260,320)];
mloginview.backgroundColor=[UIColor colorWithPatternImage:image];
[self.view addSubview:mloginview];
这是试图适应 mloginView 的图像
进入模拟器的屏幕截图[输出]
【问题讨论】:
-
这个问题刷入了基于 NDA 的 SDK。不允许 OP 讨论 iOS 7。