Star Rating Control in UIAlertController subview is clipped when centred - Swift
<p>I am using <a href="https://github.com/marketplacer/Cosmos" rel="nofollow noreferrer">Cosmos Star Rating Control</a> and I am embedding it as a subview of a UIAlertController. I struggled to get this to look correctly, however I managed to get the look I was going for with it being centred and all, but now I believe the view for the Star Control is being clipped, as it does not allow selection of certain areas on certain stars, also when turning on <code>clipToBounds = true</code> you can blatantly see that it's being clipped. I am just not sure why or how to solve this. The code and some screenshots are below. I also tried using a custom alert controller that allows you to add a custom content view, but still suffered the same issue. </p>

<pre><code>@IBAction func rateButtonClicked(sender: AnyObject?) {

    //Alert for the rating
    let alert = UIAlertController(title: "\n\n", message: "", preferredStyle: UIAlertControllerStyle.ActionSheet)

    let customView = UIView(frame: CGRect(x: 0, y: 0, width: alert.view.frame.width, height: alert.view.frame.height))

    //The x/y coordinate of the rating view
    let xCoord = alert.view.frame.width/2 - 95 //(5 starts multiplied by 30 each, plus a 5 margin each / 2)
    let yCoord = CGFloat(25.0)

    ratingView.rating = 0.0
    ratingView.settings.starSize = 30
    ratingView.settings.emptyBorderColor = UIColor.blackColor()
    ratingView.settings.updateOnTouch = true
    ratingView.frame.origin.x = xCoord
    ratingView.frame.origin.y = yCoord

    customView.addSubview(ratingView)

    alert.addAction(UIAlertAction(title: "Save Rating", style: UIAlertActionStyle.Default, handler: ratingCompletionHandler))

    alert.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Destructive, handler: nil))
    alert.view.addSubview(customView)

    dispatch_async(dispatch_get_main_queue(), {
        self.presentViewController(alert, animated: true, completion: nil)
    })
}
</code></pre>

<p>Image with clipToBounds Turned on:</p>

<p><a href="https://i.stack.imgur.com/kELem.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kELem.png" alt="enter image description here"></a></p>

<p>Image with clipToBounds Turned off:</p>

<p><a href="https://i.stack.imgur.com/DL85p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DL85p.png" alt="enter image description here"></a></p>