From f8393ab46e71e2b2178855e955fd5580a86064be Mon Sep 17 00:00:00 2001 From: angunnnnnn Date: Thu, 27 Oct 2022 10:18:18 +0700 Subject: [PATCH 1/5] Add textViewContainerInset as new parameter use textViewContainerInset to custom textContainerInset --- SCLAlertView/SCLAlertView.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.swift b/SCLAlertView/SCLAlertView.swift index bf85de5..20ee571 100644 --- a/SCLAlertView/SCLAlertView.swift +++ b/SCLAlertView/SCLAlertView.swift @@ -211,6 +211,7 @@ open class SCLAlertView: UIViewController { var dynamicAnimatorActive : Bool var buttonsLayout: SCLAlertButtonLayout var textViewAlignment: NSTextAlignment = .center + var textViewContainerInset: UIEdgeInsets = .zero // Actions var hideWhenBackgroundViewIsTapped: Bool @@ -218,7 +219,7 @@ open class SCLAlertView: UIViewController { // Activity indicator var activityIndicatorStyle: UIActivityIndicatorView.Style - public init(kDefaultShadowOpacity: CGFloat = 0.7, kCircleTopPosition: CGFloat = 0.0, kCircleBackgroundTopPosition: CGFloat = 6.0, kCircleHeight: CGFloat = 56.0, kCircleIconHeight: CGFloat = 20.0, kTitleHeight:CGFloat = 25.0, kWindowWidth: CGFloat = 240.0, kWindowHeight: CGFloat = 178.0, kTextHeight: CGFloat = 90.0, kTextFieldHeight: CGFloat = 30.0, kTextViewdHeight: CGFloat = 80.0, kButtonHeight: CGFloat = 35.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), margin: Margin = Margin(), dynamicAnimatorActive: Bool = false, disableTapGesture: Bool = false, buttonsLayout: SCLAlertButtonLayout = .vertical, activityIndicatorStyle: UIActivityIndicatorView.Style = .white, textViewAlignment: NSTextAlignment = .center) { + public init(kDefaultShadowOpacity: CGFloat = 0.7, kCircleTopPosition: CGFloat = 0.0, kCircleBackgroundTopPosition: CGFloat = 6.0, kCircleHeight: CGFloat = 56.0, kCircleIconHeight: CGFloat = 20.0, kTitleHeight:CGFloat = 25.0, kWindowWidth: CGFloat = 240.0, kWindowHeight: CGFloat = 178.0, kTextHeight: CGFloat = 90.0, kTextFieldHeight: CGFloat = 30.0, kTextViewdHeight: CGFloat = 80.0, kButtonHeight: CGFloat = 35.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), margin: Margin = Margin(), dynamicAnimatorActive: Bool = false, disableTapGesture: Bool = false, buttonsLayout: SCLAlertButtonLayout = .vertical, activityIndicatorStyle: UIActivityIndicatorView.Style = .white, textViewAlignment: NSTextAlignment = .center, textViewContainerInset: UIEdgeInsets = .zero) { self.kDefaultShadowOpacity = kDefaultShadowOpacity self.kCircleTopPosition = kCircleTopPosition @@ -260,6 +261,7 @@ open class SCLAlertView: UIViewController { self.activityIndicatorStyle = activityIndicatorStyle self.textViewAlignment = textViewAlignment + self.textViewContainerInset = textViewContainerInset } mutating func setkWindowHeight(_ kWindowHeight:CGFloat) { @@ -375,7 +377,7 @@ open class SCLAlertView: UIViewController { viewText.isEditable = false viewText.isSelectable = false viewText.textAlignment = appearance.textViewAlignment - viewText.textContainerInset = UIEdgeInsets.zero + viewText.textContainerInset = appearance.textViewContainerInset viewText.textContainer.lineFragmentPadding = 0; viewText.font = appearance.kTextFont // Colours From bf3845a452aeeb6dcad07fc272e6b08ef979708f Mon Sep 17 00:00:00 2001 From: angunnnnnn Date: Mon, 31 Oct 2022 16:36:34 +0700 Subject: [PATCH 2/5] Update SCLAlertView.podspec --- SCLAlertView.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SCLAlertView.podspec b/SCLAlertView.podspec index 2cb094b..9997045 100644 --- a/SCLAlertView.podspec +++ b/SCLAlertView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SCLAlertView" - s.version = "0.8.1" + s.version = "0.8.2" s.summary = "Beautiful Alert View. Written in Swift" s.homepage = "https://github.com/vikmeup/SCLAlertView-Swift" s.screenshots = "https://raw.githubusercontent.com/vikmeup/SCPopUpView/master/errorScreenshot.png", "https://raw.githubusercontent.com/vikmeup/SCPopUpView/master/successScreenshot.png" @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.social_media_url = "http://twitter.com/vikmeup" s.platform = :ios s.ios.deployment_target = '8.0' - s.source = { :git => "https://github.com/vikmeup/SCLAlertView-Swift.git", :tag => s.version } + s.source = { :git => "https://github.com/ngunngun/SCLAlertView-Swift.git", :tag => s.version } s.source_files = "SCLAlertView/*.{swift}" s.swift_version = '5.0' #s.framework = "QuartzCore" From 4a7f38b16955b464ecc96d3e2d2c28434a7a925c Mon Sep 17 00:00:00 2001 From: angunnnnnn Date: Mon, 31 Oct 2022 16:47:33 +0700 Subject: [PATCH 3/5] Revert "Add textViewContainerInset as new parameter" This reverts commit f8393ab46e71e2b2178855e955fd5580a86064be. --- SCLAlertView/SCLAlertView.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.swift b/SCLAlertView/SCLAlertView.swift index 20ee571..bf85de5 100644 --- a/SCLAlertView/SCLAlertView.swift +++ b/SCLAlertView/SCLAlertView.swift @@ -211,7 +211,6 @@ open class SCLAlertView: UIViewController { var dynamicAnimatorActive : Bool var buttonsLayout: SCLAlertButtonLayout var textViewAlignment: NSTextAlignment = .center - var textViewContainerInset: UIEdgeInsets = .zero // Actions var hideWhenBackgroundViewIsTapped: Bool @@ -219,7 +218,7 @@ open class SCLAlertView: UIViewController { // Activity indicator var activityIndicatorStyle: UIActivityIndicatorView.Style - public init(kDefaultShadowOpacity: CGFloat = 0.7, kCircleTopPosition: CGFloat = 0.0, kCircleBackgroundTopPosition: CGFloat = 6.0, kCircleHeight: CGFloat = 56.0, kCircleIconHeight: CGFloat = 20.0, kTitleHeight:CGFloat = 25.0, kWindowWidth: CGFloat = 240.0, kWindowHeight: CGFloat = 178.0, kTextHeight: CGFloat = 90.0, kTextFieldHeight: CGFloat = 30.0, kTextViewdHeight: CGFloat = 80.0, kButtonHeight: CGFloat = 35.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), margin: Margin = Margin(), dynamicAnimatorActive: Bool = false, disableTapGesture: Bool = false, buttonsLayout: SCLAlertButtonLayout = .vertical, activityIndicatorStyle: UIActivityIndicatorView.Style = .white, textViewAlignment: NSTextAlignment = .center, textViewContainerInset: UIEdgeInsets = .zero) { + public init(kDefaultShadowOpacity: CGFloat = 0.7, kCircleTopPosition: CGFloat = 0.0, kCircleBackgroundTopPosition: CGFloat = 6.0, kCircleHeight: CGFloat = 56.0, kCircleIconHeight: CGFloat = 20.0, kTitleHeight:CGFloat = 25.0, kWindowWidth: CGFloat = 240.0, kWindowHeight: CGFloat = 178.0, kTextHeight: CGFloat = 90.0, kTextFieldHeight: CGFloat = 30.0, kTextViewdHeight: CGFloat = 80.0, kButtonHeight: CGFloat = 35.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), margin: Margin = Margin(), dynamicAnimatorActive: Bool = false, disableTapGesture: Bool = false, buttonsLayout: SCLAlertButtonLayout = .vertical, activityIndicatorStyle: UIActivityIndicatorView.Style = .white, textViewAlignment: NSTextAlignment = .center) { self.kDefaultShadowOpacity = kDefaultShadowOpacity self.kCircleTopPosition = kCircleTopPosition @@ -261,7 +260,6 @@ open class SCLAlertView: UIViewController { self.activityIndicatorStyle = activityIndicatorStyle self.textViewAlignment = textViewAlignment - self.textViewContainerInset = textViewContainerInset } mutating func setkWindowHeight(_ kWindowHeight:CGFloat) { @@ -377,7 +375,7 @@ open class SCLAlertView: UIViewController { viewText.isEditable = false viewText.isSelectable = false viewText.textAlignment = appearance.textViewAlignment - viewText.textContainerInset = appearance.textViewContainerInset + viewText.textContainerInset = UIEdgeInsets.zero viewText.textContainer.lineFragmentPadding = 0; viewText.font = appearance.kTextFont // Colours From 5b0e140d94e4fb4fb0be9300449ba3c5a2662bcb Mon Sep 17 00:00:00 2001 From: angunnnnnn Date: Mon, 31 Oct 2022 16:55:16 +0700 Subject: [PATCH 4/5] Revert "Revert "Add textViewContainerInset as new parameter"" This reverts commit 4a7f38b16955b464ecc96d3e2d2c28434a7a925c. --- SCLAlertView/SCLAlertView.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.swift b/SCLAlertView/SCLAlertView.swift index bf85de5..20ee571 100644 --- a/SCLAlertView/SCLAlertView.swift +++ b/SCLAlertView/SCLAlertView.swift @@ -211,6 +211,7 @@ open class SCLAlertView: UIViewController { var dynamicAnimatorActive : Bool var buttonsLayout: SCLAlertButtonLayout var textViewAlignment: NSTextAlignment = .center + var textViewContainerInset: UIEdgeInsets = .zero // Actions var hideWhenBackgroundViewIsTapped: Bool @@ -218,7 +219,7 @@ open class SCLAlertView: UIViewController { // Activity indicator var activityIndicatorStyle: UIActivityIndicatorView.Style - public init(kDefaultShadowOpacity: CGFloat = 0.7, kCircleTopPosition: CGFloat = 0.0, kCircleBackgroundTopPosition: CGFloat = 6.0, kCircleHeight: CGFloat = 56.0, kCircleIconHeight: CGFloat = 20.0, kTitleHeight:CGFloat = 25.0, kWindowWidth: CGFloat = 240.0, kWindowHeight: CGFloat = 178.0, kTextHeight: CGFloat = 90.0, kTextFieldHeight: CGFloat = 30.0, kTextViewdHeight: CGFloat = 80.0, kButtonHeight: CGFloat = 35.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), margin: Margin = Margin(), dynamicAnimatorActive: Bool = false, disableTapGesture: Bool = false, buttonsLayout: SCLAlertButtonLayout = .vertical, activityIndicatorStyle: UIActivityIndicatorView.Style = .white, textViewAlignment: NSTextAlignment = .center) { + public init(kDefaultShadowOpacity: CGFloat = 0.7, kCircleTopPosition: CGFloat = 0.0, kCircleBackgroundTopPosition: CGFloat = 6.0, kCircleHeight: CGFloat = 56.0, kCircleIconHeight: CGFloat = 20.0, kTitleHeight:CGFloat = 25.0, kWindowWidth: CGFloat = 240.0, kWindowHeight: CGFloat = 178.0, kTextHeight: CGFloat = 90.0, kTextFieldHeight: CGFloat = 30.0, kTextViewdHeight: CGFloat = 80.0, kButtonHeight: CGFloat = 35.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), margin: Margin = Margin(), dynamicAnimatorActive: Bool = false, disableTapGesture: Bool = false, buttonsLayout: SCLAlertButtonLayout = .vertical, activityIndicatorStyle: UIActivityIndicatorView.Style = .white, textViewAlignment: NSTextAlignment = .center, textViewContainerInset: UIEdgeInsets = .zero) { self.kDefaultShadowOpacity = kDefaultShadowOpacity self.kCircleTopPosition = kCircleTopPosition @@ -260,6 +261,7 @@ open class SCLAlertView: UIViewController { self.activityIndicatorStyle = activityIndicatorStyle self.textViewAlignment = textViewAlignment + self.textViewContainerInset = textViewContainerInset } mutating func setkWindowHeight(_ kWindowHeight:CGFloat) { @@ -375,7 +377,7 @@ open class SCLAlertView: UIViewController { viewText.isEditable = false viewText.isSelectable = false viewText.textAlignment = appearance.textViewAlignment - viewText.textContainerInset = UIEdgeInsets.zero + viewText.textContainerInset = appearance.textViewContainerInset viewText.textContainer.lineFragmentPadding = 0; viewText.font = appearance.kTextFont // Colours From 5fe8b6a580fa6acc67ea379f73ddb1c3c922b39d Mon Sep 17 00:00:00 2001 From: angunnnnnn Date: Mon, 31 Oct 2022 16:56:13 +0700 Subject: [PATCH 5/5] Revert "Update SCLAlertView.podspec" This reverts commit bf3845a452aeeb6dcad07fc272e6b08ef979708f. --- SCLAlertView.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SCLAlertView.podspec b/SCLAlertView.podspec index 9997045..2cb094b 100644 --- a/SCLAlertView.podspec +++ b/SCLAlertView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SCLAlertView" - s.version = "0.8.2" + s.version = "0.8.1" s.summary = "Beautiful Alert View. Written in Swift" s.homepage = "https://github.com/vikmeup/SCLAlertView-Swift" s.screenshots = "https://raw.githubusercontent.com/vikmeup/SCPopUpView/master/errorScreenshot.png", "https://raw.githubusercontent.com/vikmeup/SCPopUpView/master/successScreenshot.png" @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.social_media_url = "http://twitter.com/vikmeup" s.platform = :ios s.ios.deployment_target = '8.0' - s.source = { :git => "https://github.com/ngunngun/SCLAlertView-Swift.git", :tag => s.version } + s.source = { :git => "https://github.com/vikmeup/SCLAlertView-Swift.git", :tag => s.version } s.source_files = "SCLAlertView/*.{swift}" s.swift_version = '5.0' #s.framework = "QuartzCore"