2
我有一个绘制位置图标的UIView的子类。当我将视图旋转几度时,界限(使用CGContextAddRect
以绿色突出显示)似乎会发生剧烈变化,导致我的绘图看起来失真。旋转的UIView和核心图形的边界
http://bytolution.com/Screenshot%202013.04.09%2016.41.00.png http://bytolution.com/Screenshot%202013.04.09%2016.41.43.png
这里是我的代码:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.locationTagView.frame = CGRectMake(40, 80, 240, 240);
CGAffineTransform transform = CGAffineTransformMakeRotation(DegreesToRadians(30));
self.locationTagView.transform = transform;
[self.view addSubview:self.locationTagView];
}
我试过'self.locationTagView.autoresizingMask = UIViewAutoresizingNone;'但它不起作用。看到我的答案在下面! – Dario 2013-04-09 19:05:39