Customise UIImageView with circular shape and borders ?

C

UIImageView *customImage = [[UIImageView alloc] initWithFrame:CGRectMake(10, 100, 50, 50)];
customImage.backgroundColor = [UIColor blackColor];
customImage.layer.cornerRadius = 25.0f;
customImage.layer.masksToBounds = YES;
[[customImage layer] setBorderWidth:3.0f];
[[customImage layer] setBorderColor:[UIColor whiteColor].CGColor];
[self.view addSubview:customImage];

About the author

abdulgafar.nurbash
By abdulgafar.nurbash

Category