From e0c2e5a04b8b3a83a4913ac0c2668e92b64775a3 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 11 Nov 2014 15:36:11 -0200 Subject: [PATCH 1/3] Fix text being cropped --- SCLAlertView/SCLAlertView.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index feaadad..c0247ce 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -126,6 +126,8 @@ - (instancetype)init // View text _viewText.editable = NO; _viewText.allowsEditingTextAttributes = YES; + _viewText.textContainerInset = UIEdgeInsetsZero; + _viewText.textContainer.lineFragmentPadding = 0; _viewText.textAlignment = NSTextAlignmentCenter; _viewText.font = [UIFont fontWithName:kDefaultFont size:14.0f]; @@ -517,7 +519,7 @@ -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)imag { NSString *str = subTitle; CGRect r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin attributes:attr context:nil]; - CGFloat ht = ceil(r.size.height) + 10; + CGFloat ht = ceil(r.size.height); if (ht < kTextHeight) { kWindowHeight -= (kTextHeight - ht); @@ -528,7 +530,7 @@ -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)imag { NSAttributedString *str =[[NSAttributedString alloc] initWithString:subTitle attributes:attr]; CGRect r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin context:nil]; - CGFloat ht = ceil(r.size.height) + 10; + CGFloat ht = ceil(r.size.height); if (ht < kTextHeight) { kWindowHeight -= (kTextHeight - ht); From 6521625f6aec7bee0fafd50ae8cef21fef000f63 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 11 Nov 2014 15:36:51 -0200 Subject: [PATCH 2/3] Bump version --- SCLAlertView-Objective-C.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index eb8f28c..984ec9c 100644 --- a/SCLAlertView-Objective-C.podspec +++ b/SCLAlertView-Objective-C.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "SCLAlertView-Objective-C" - spec.version = "0.3.2" + spec.version = "0.3.3" spec.summary = "Beautiful animated Alert View. Written in Swift but ported to Objective-C" spec.homepage = "https://github.com/dogo/SCLAlertView" spec.screenshots = "https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot.png", "https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot2.png" @@ -10,7 +10,7 @@ Pod::Spec.new do |spec| spec.social_media_url = "http://twitter.com/di_autilio" spec.platform = :ios spec.ios.deployment_target = '7.0' - spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => "0.3.2" } + spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => "0.3.3" } spec.source_files = "SCLAlertView/*" spec.requires_arc = true end From 5d4df4ee0cfd0e6002f67ea929fed4d638a49680 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 11 Nov 2014 15:49:53 -0200 Subject: [PATCH 3/3] Small improvement --- SCLAlertView-Objective-C.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index 984ec9c..9098592 100644 --- a/SCLAlertView-Objective-C.podspec +++ b/SCLAlertView-Objective-C.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |spec| spec.social_media_url = "http://twitter.com/di_autilio" spec.platform = :ios spec.ios.deployment_target = '7.0' - spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => "0.3.3" } + spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => spec.version.to_s } spec.source_files = "SCLAlertView/*" spec.requires_arc = true end