almost 9 years ago
Allocate it itz memory as well as its frame & its diameter as-
myroundView = [[UIView alloc]initWithFrame:CGRectMake(40, 18, 15, 15)]; [self setRoundedView:myroundView toDiameter:16];
Create the following function--
(void)setRoundedView:(UIView *)roundedView toDiameter:(float)newSize { CGPoint saveCenter = roundedView.center; CGRect newFrame = CGRectMake(roundedView.frame.origin.x, roundedView.frame.origin.y, newSize, newSize); roundedView.frame = newFrame; roundedView.layer.cornerRadius = newSize / 2.0; roundedView.center = saveCenter; }
myroundView.backgroundColor = [UIColor lightGrayColor];
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)