I do not know if this is of any value, but I just needed to do this same thing in Swift
and here is what I found
let newWidth : CGFloat = 400-270 // NEW Width is 400 (270 is old width)
// update width constraint value for main view
if let viewWidthConstraint = alertController.view.constraints.filter({ return $0.firstAttribute == .width }).first{
viewWidthConstraint.constant = newWidth
}
// update width constraint value for container view
if let containerViewWidthConstraint = alertController.view.subviews.first?.constraints.filter({ return $0.firstAttribute == .width }).first {
containerViewWidthConstraint.constant = newWidth
}
perhaps someone can make a custom subclass using this information for BS