give corner radius to view in xcode code example Example: give corner radius to view in xcode view.layer.cornerRadius = 5; view.layer.masksToBounds = true;