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

Added subtitlecolor to SCLApearance class

Open dreampowder opened this issue 7 years ago • 0 comments

Hi there, when i check the code, i've seen that you are settings both title and subtitle to the same color. I've added subtitle color value to the struct. thanks for sharing this wonderful library

public struct SCLAppearance {
        let kDefaultShadowOpacity: CGFloat
        let kCircleTopPosition: CGFloat
        let kCircleBackgroundTopPosition: CGFloat
        let kCircleHeight: CGFloat
        let kCircleIconHeight: CGFloat
        let kTitleTop:CGFloat
        let kTitleHeight:CGFloat
	let kTitleMinimumScaleFactor: CGFloat
        let kWindowWidth: CGFloat
        var kWindowHeight: CGFloat
        var kTextHeight: CGFloat
        let kTextFieldHeight: CGFloat
        let kTextViewdHeight: CGFloat
        let kButtonHeight: CGFloat
		let circleBackgroundColor: UIColor
        let contentViewColor: UIColor
        let contentViewBorderColor: UIColor
        let titleColor: UIColor
        let subTitleColor: UIColor //This One
        // Fonts
        let kTitleFont: UIFont
        let kTextFont: UIFont
        let kButtonFont: UIFont
        
        // UI Options
        var disableTapGesture: Bool
        var showCloseButton: Bool
        var showCircularIcon: Bool
        var shouldAutoDismiss: Bool // Set this false to 'Disable' Auto hideView when SCLButton is tapped
        var contentViewCornerRadius : CGFloat
        var fieldCornerRadius : CGFloat
        var buttonCornerRadius : CGFloat
        var dynamicAnimatorActive : Bool
        var buttonsLayout: SCLAlertButtonLayout
        
        // Actions
        var hideWhenBackgroundViewIsTapped: Bool
        
        // Activity indicator
        var activityIndicatorStyle: UIActivityIndicatorViewStyle
        
        public init(kDefaultShadowOpacity: CGFloat = 0.7,
                    kCircleTopPosition: CGFloat = 0.0,
                    kCircleBackgroundTopPosition: CGFloat = 6.0,
                    kCircleHeight: CGFloat = 56.0,
                    kCircleIconHeight: CGFloat = 20.0,
                    kTitleTop:CGFloat = 30.0,
                    kTitleHeight:CGFloat = 25.0,
                    kWindowWidth: CGFloat = 240.0,
                    kWindowHeight: CGFloat = 178.0,
                    kTextHeight: CGFloat = 90.0,
                    kTextFieldHeight: CGFloat = 45.0,
                    kTextViewdHeight: CGFloat = 80.0,
                    kButtonHeight: CGFloat = 45.0,
                    kTitleFont: UIFont = UIFont.systemFont(ofSize: 20),
                    kTitleMinimumScaleFactor: CGFloat = 1.0,
                    kTextFont: UIFont = UIFont.systemFont(ofSize: 14),
                    kButtonFont: UIFont = UIFont.boldSystemFont(ofSize: 14),
                    showCloseButton: Bool = true,
                    showCircularIcon: Bool = true,
                    shouldAutoDismiss: Bool = true,
                    contentViewCornerRadius: CGFloat = 5.0,
                    fieldCornerRadius: CGFloat = 3.0,
                    buttonCornerRadius: CGFloat = 3.0,
                    hideWhenBackgroundViewIsTapped: Bool = false,
                    circleBackgroundColor: UIColor = UIColor.white,
                    contentViewColor: UIColor = UIColorFromRGB(0xFFFFFF),
                    contentViewBorderColor: UIColor = UIColorFromRGB(0xCCCCCC),
                    titleColor: UIColor = UIColorFromRGB(0x4D4D4D),
                    subTitleColor: UIColor = UIColorFromRGB(0x4D4D4D), //This One
                    dynamicAnimatorActive: Bool = false,
                    disableTapGesture: Bool = false,
                    buttonsLayout: SCLAlertButtonLayout = .vertical,
                    activityIndicatorStyle: UIActivityIndicatorViewStyle = .white) {
            
            self.kDefaultShadowOpacity = kDefaultShadowOpacity
            self.kCircleTopPosition = kCircleTopPosition
            self.kCircleBackgroundTopPosition = kCircleBackgroundTopPosition
            self.kCircleHeight = kCircleHeight
            self.kCircleIconHeight = kCircleIconHeight
            self.kTitleTop = kTitleTop
            self.kTitleHeight = kTitleHeight
            self.kWindowWidth = kWindowWidth
            self.kWindowHeight = kWindowHeight
            self.kTextHeight = kTextHeight
            self.kTextFieldHeight = kTextFieldHeight
            self.kTextViewdHeight = kTextViewdHeight
            self.kButtonHeight = kButtonHeight
			self.circleBackgroundColor = circleBackgroundColor
            self.contentViewColor = contentViewColor
            self.contentViewBorderColor = contentViewBorderColor
            self.titleColor = titleColor
            
            self.kTitleFont = kTitleFont
            self.kTitleMinimumScaleFactor = kTitleMinimumScaleFactor
            self.kTextFont = kTextFont
            self.kButtonFont = kButtonFont
            
            self.disableTapGesture = disableTapGesture
            self.showCloseButton = showCloseButton
            self.showCircularIcon = showCircularIcon
            self.shouldAutoDismiss = shouldAutoDismiss
            self.contentViewCornerRadius = contentViewCornerRadius
            self.fieldCornerRadius = fieldCornerRadius
            self.buttonCornerRadius = buttonCornerRadius
            
            self.hideWhenBackgroundViewIsTapped = hideWhenBackgroundViewIsTapped
            self.dynamicAnimatorActive = dynamicAnimatorActive
            self.buttonsLayout = buttonsLayout
            
            self.activityIndicatorStyle = activityIndicatorStyle
            
            self.subTitleColor = subTitleColor  //This One
        }
    }

dreampowder avatar Jan 26 '18 13:01 dreampowder