简体   繁体   中英

Changing CGRectMake to draw a circle around animation

I am using that code to put an circle-animation with touch functions, but the result is that my animation is a circle and its 'closed' by black rectangle with black borders.

Anim1 *anim1 = [[Anim1 alloc] initWithFrame:CGRectMake(15,45, 282, 282)];

how can i change it so it will be in a circle by the animation size?

Well i found the answer... it's:

 [anim1.layer setBorderColor: [[UIColor brownColor] CGColor]];
 [anim1 setOpaque:NO];

The [anim1 setOpaque:NO] ; do all the work without it you get only colored background.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM