如何摆脱UIImage周围的黑色? (如下面的链接所示)
UIView *myView = [[[UIView alloc] init] autorelease];
[myView setBackgroundColor:[UIColor clearColor]];
CCUIViewWrapper *wrapper = [CCUIViewWrapper wrapperForUIView:myView];
UIColor *background = [UIColor colorWithPatternImage:[UIImage imageNamed:@"alert_background.png"]];
myView.backgroundColor = background;
wrapper.contentSize = CGSizeMake(293,180);
wrapper.position = ccp(-90,190);
[wrapper setRotation:90.0];
[self addChild:wrapper];
答案 0 :(得分:0)
尝试将视图的不透明值设置为NO
myView.opaque = NO;
这意味着视图不会填满其边界。
NONONO