Closed LukeSmith16 closed 12 months ago
This works for me:
let icon = UIImage(named:"custom_icon.png")
let color = UIColor.orange
let datePicker = UIDatePicker()
let appearance = SCLAlertView.SCLAppearance(kWindowWidth: datePicker.frame.size.width + 28.0)
let alert = SCLAlertView(appearance: appearance)
alert.customSubview = datePicker
_ = alert.showCustom("Some title", subTitle: "", color: color, icon: icon!)
I'm trying to implement a UIDatePicker into my custom alert but failing to do so. This is the code i'm using to try and accomplish it:
let appearance = SCLAlertView.SCLAppearance(kCircleIconHeight: 60.0, kTitleFont: UIFont(name: "HelveticaNeue", size: 20)!, kTextFont: UIFont(name: "HelveticaNeue-Light", size: 14)!, kButtonFont: UIFont(name: "HelveticaNeue-Light", size: 14)!, showCloseButton: false, showCircularIcon: true) let alert = SCLAlertView(appearance: appearance)
When the alert comes up the date picker is way out of frame on the alert, i can still however interact with it. Could this be a problem with how i have set up the positioning? Also i do not have any constraints implemented, i'm not sure if this would affect it. Thanks.