SCLAlertView-Swift icon indicating copy to clipboard operation
SCLAlertView-Swift copied to clipboard

custom subview bottom spacing between first button

Open tommyyoon opened this issue 6 years ago • 0 comments

I am adding a custom view and setting the textViewBottom isn't doing anything. That property only works on text textfields added by addTextField method. What am I doing wrong?

            let margin = SCLAlertView.SCLAppearance.Margin(
                textViewBottom: 30
            )
            let appearance = SCLAlertView.SCLAppearance(
                kButtonHeight: 40,
                kTitleFont: UIFont.boldSystemFont(ofSize: 19),
                kTextFont: UIFont.systemFont(ofSize: 19),
                kButtonFont: UIFont.systemFont(ofSize: 19),
                showCloseButton: false,
                circleBackgroundColor: theme.cellBackgroundColor,
                contentViewColor: theme.cellBackgroundColor,
                margin: margin
            )
            
            let alert = SCLAlertView(appearance: appearance)
            
            let pickerView = UIPickerView(frame: CGRect(x: 8, y: 0, width: 200, height: 150))
            pickerView.delegate = self as UIPickerViewDelegate
            pickerView.dataSource = self as UIPickerViewDataSource
            pickerView.tag = 100
            pickerView.backgroundColor = theme.cellBackgroundColor
            pickerView.layer.borderColor = theme.textColor.cgColor
            pickerView.layer.cornerRadius = 5
            pickerView.layer.borderWidth = 0.7
            
            alert.customSubview = pickerView

tommyyoon avatar Mar 14 '19 12:03 tommyyoon