In Objective-C such line
self.mainImageView.layer.cornerRadius = CGRectGetWidth(self.mainImageView.frame)/4.0f;
does its job, I tried it in
in swift 3 'CGRectGetWidth' has been replaced by property 'CGRect.width'
view.layer.cornerRadius = view.frame.width/4.0 view.clipsToBounds = true