【发布时间】:2011-10-02 05:05:24
【问题描述】:
我有
UIView *topPart = [[UIView alloc] initWithFrame:CGRectMake(9, 0, 302, 318)];
topPart.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"pattern.png"]];
[someScroller addSubview:topPart];
[topPart release];
当我使用 3gs 或 iphone 模拟器时,我可以很好地看到图案,但是当我在实际的 iPhone 4 上测试时,我看到了图案图像,但每个图案之间都有黑线,所以它看起来像一个网格。我检查了图案图像,没有黑色边框或任何东西。
有人遇到不同的问题,但可能是相同的解决方案 colorWithPatternImage with iPhone 4 Retina Display (image@2x.png)
但他们建议使用 -(void)drawRect: 方法,唯一的问题是我不知道该怎么做。
谢谢
【问题讨论】: