I use the third party SwiftAlertView class(https://github.com/dinhquan/SwiftAlertView) and update Swift from 2.3 to 3.
When I complied, the app and I found the error message as following.
Binary operator '+' cannot be applied to operands of type 'Double' and 'Double!'
The code is following.
The titleTopMargin and titleToMessageSpacing are Double!
That can't add Double(titleLabel.frame.size.height).
let topPartHeight = (contentView == nil) ? (titleTopMargin + Double(titleLabel.frame.size.height) + titleToMessageSpacing + Double(messageLabel.frame.size.height) + messageBottomMargin) : Double(contentView!.frame.size.height)
The definition is following.
// customize the margin & spacing of title & message
open var titleSideMargin: Double! // default is 20 px
open var messageSideMargin: Double! // default is 20 px
open var titleTopMargin: Double! // default is 20 px
open var messageBottomMargin: Double! // default is 20 px
open var titleToMessageSpacing: Double! // default is 10 px
How do I fix the problem?
Thanks.