I am currently doing it the following:
self.userProfileButton.layer.borderColor=[UIColor whiteColor].CGColor;
self.userProfileButton.layer.borderWidth=1.5f;
self.userProfileButton.layer.cornerRadius = 25;
size of the button is 50, so this makes it as a perfect circle. However, when I profile this using instrument, it seems that it's dropping the FPS down a bit. Any other idea on how to do this performance wise?
Rasterize it!
self.userProfileButton.layer.shouldRasterize = YES;
//For retina screens:
self.userProfileButton.layer.rasterizationScale = [[UIScreen mainScreen] scale];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With