vikmeup / SCLAlertView-Swift

Beautiful animated Alert View. Written in Swift
MIT License
5.33k stars 766 forks source link

Method signature changed. #314

Open the-freshlord opened 7 years ago

the-freshlord commented 7 years ago

I noticed that the method addButton changed to this:

addButton(_ title:String, backgroundColor:UIColor? = nil, textColor:UIColor? = nil, showTimeout:SCLButton.ShowTimeoutConfiguration? = nil, target:AnyObject, selector:Selector)->SCLButton

But when doing a pod install, an older version gets pulled and the method is this:

addButton(_ title:String, backgroundColor:UIColor? = nil, textColor:UIColor? = nil, showDurationStatus:Bool=false, action:@escaping ()->Void)->SCLButton 

Not sure why this happens.

jorojas commented 7 years ago

Having the same issue, any clues?

jorojas commented 7 years ago

Hi guys, I got this while compiling my code: /Users/user/Documents/GitHub/mobile-visa-mlc-ios-master/BaseApp/Views/VisaViews/VisaAlertView/VisaAlertViewController.swift:87:132: Cannot convert value of type 'Bool' to expected argument type 'SCLButton.ShowTimeoutConfiguration?'

In this method: func addActionButton(_ title: String, buttonTapped: @escaping () -> Void) { let textColor = ThemeManager.sharedManager.isUsingDefaultTheme ? ThemeManager.sharedManager.currentPrimaryColor : ThemeManager.sharedManager.currentTertiaryColor _ = addButton(title, backgroundColor: ThemeManager.sharedManager.currentSecondaryColor, textColor: textColor, showTimeout: false, action: buttonTapped) }

Could you guys help me?