From 8b6b7cb9a2a05bd7b6d93be53c229dd15d1489fc Mon Sep 17 00:00:00 2001 From: Kevin Xu Date: Sat, 18 Apr 2015 09:31:06 -0700 Subject: [PATCH 001/250] Fix crash for iOS 7 Commit https://github.com/dogo/SCLAlertView/commit/cb53c9404c6a2636dd4277bbd16738baf22cdc64 causes this to crash on iOS 7 because the `containsString` is only on iOS 8. This fixes that --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 8acdb93..218d570 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1012,7 +1012,7 @@ - (CGRect)mainScreenFrame - (BOOL)isAppExtension { - return [[[NSBundle mainBundle] executablePath] containsString:@".appex/"]; + return [[[NSBundle mainBundle] executablePath] rangeOfString:@".appex/"].location != NSNotFound; } #pragma mark - Background Effects From 14c316fadd249903fa47f7384609a4dcfbfc3acf Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 3 May 2015 21:01:38 -0300 Subject: [PATCH 002/250] Bump version --- 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 46dc2ad..c1bbbe5 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.7.0" + spec.version = "0.7.1" 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" From a5f4ca844dc3870dbea7ec60a6ced860c3e003be Mon Sep 17 00:00:00 2001 From: alex1704 Date: Mon, 4 May 2015 06:09:40 +0300 Subject: [PATCH 003/250] If defaultBackgroundColor is preconfigured for button its not changed to default style color --- SCLAlertView/SCLAlertView.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 218d570..3b9d41a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -856,7 +856,10 @@ -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)imag { [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; } - btn.defaultBackgroundColor = viewColor; + + if (!btn.defaultBackgroundColor) { + btn.defaultBackgroundColor = viewColor; + } if (btn.completeButtonFormatBlock != nil) { From d12e1304565436361924e74962317f861e796d25 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 28 May 2015 23:56:15 -0300 Subject: [PATCH 004/250] Add NSStringDrawingUsesFontLeading to ensure the use of default line spacing specified by the font Use ceilf since it's a floating point math --- SCLAlertView/SCLAlertView.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 3b9d41a..47c90ac 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -751,10 +751,10 @@ -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)imag NSString *str = subTitle; r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin attributes:attr context:nil]; } else { - r = [_viewText.attributedText boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin context:nil]; + r = [_viewText.attributedText boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading context:nil]; } - CGFloat ht = ceil(r.size.height); + CGFloat ht = ceilf(r.size.height); if (ht < _subTitleHeight) { self.windowHeight -= (_subTitleHeight - ht); @@ -775,8 +775,8 @@ -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)imag else { NSAttributedString *str =[[NSAttributedString alloc] initWithString:subTitle attributes:attr]; - CGRect r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin context:nil]; - CGFloat ht = ceil(r.size.height) + 10.0f; + CGRect r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading context:nil]; + CGFloat ht = ceilf(r.size.height) + 10.0f; if (ht < _subTitleHeight) { self.windowHeight -= (_subTitleHeight - ht); From 7681dc01b5ba195c59cb63e4dcaa39f4da967f7b Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 29 May 2015 00:05:00 -0300 Subject: [PATCH 005/250] Add bounce animation to slideFromTop thanks to @javikr --- SCLAlertView/SCLAlertView.m | 50 ++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 47c90ac..25a46aa 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1266,25 +1266,47 @@ - (void)fadeIn - (void)slideInFromTop { - //From Frame - CGRect frame = self.backgroundView.frame; - frame.origin.y = -self.backgroundView.frame.size.height; - self.view.frame = frame; - - [UIView animateWithDuration:0.3f animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + if (SYSTEM_VERSION_LESS_THAN(@"7.0")) + { + //From Frame + CGRect frame = self.backgroundView.frame; + frame.origin.y = -self.backgroundView.frame.size.height; + self.view.frame = frame; - //To Frame + [UIView animateWithDuration:0.3f animations:^{ + self.backgroundView.alpha = _backgroundOpacity; + + //To Frame + CGRect frame = self.backgroundView.frame; + frame.origin.y = 0.0f; + self.view.frame = frame; + + self.view.alpha = 1.0f; + } completion:^(BOOL completed) { + [UIView animateWithDuration:0.2f animations:^{ + self.view.center = _backgroundView.center; + }]; + }]; + } + else { + //From Frame CGRect frame = self.backgroundView.frame; - frame.origin.y = 0.0f; + frame.origin.y = -self.backgroundView.frame.size.height; self.view.frame = frame; - self.view.alpha = 1.0f; - } completion:^(BOOL completed) { - [UIView animateWithDuration:0.2f animations:^{ - self.view.center = _backgroundView.center; + [UIView animateWithDuration:0.5f delay:0.0f usingSpringWithDamping:0.6f initialSpringVelocity:0.5f options:0 animations:^{ + self.backgroundView.alpha = _backgroundOpacity; + + //To Frame + CGRect frame = self.backgroundView.frame; + frame.origin.y = 0.0f; + self.view.frame = frame; + + self.view.alpha = 1.0f; + } completion:^(BOOL finished) { + // nothing }]; - }]; + } } - (void)slideInFromBottom From 4805f8a29da028f672f84144c7dbec72959e8cf7 Mon Sep 17 00:00:00 2001 From: crowriot Date: Fri, 29 May 2015 20:08:56 +0200 Subject: [PATCH 006/250] restore interactivePopGesture to previous state --- SCLAlertView/SCLAlertView.m | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 25a46aa..977c49c 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -34,9 +34,11 @@ @interface SCLAlertView () @property (nonatomic, strong) UIWindow *previousWindow; @property (nonatomic, strong) UIWindow *SCLAlertWindow; @property (nonatomic, copy) DismissBlock dismissBlock; +@property (nonatomic, weak) id restoreInteractivePopGestureDelegate; @property (nonatomic) BOOL canAddObservers; @property (nonatomic) BOOL keyboardIsVisible; @property (nonatomic) BOOL usingNewWindow; +@property (nonatomic) BOOL restoreInteractivePopGestureEnabled; @property (nonatomic) CGFloat backgroundOpacity; @property (nonatomic) CGFloat titleFontSize; @property (nonatomic) CGFloat bodyFontSize; @@ -192,7 +194,7 @@ - (instancetype)initWithNewWindow - (void)dealloc { [self removeObservers]; - [self enableInteractivePopGesture]; + [self restoreInteractivePopGesture]; } - (void)addObservers @@ -349,12 +351,14 @@ - (void)disableInteractivePopGesture // Disable iOS 7 back gesture if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + _restoreInteractivePopGestureEnabled = navigationController.interactivePopGestureRecognizer.enabled; + _restoreInteractivePopGestureDelegate = navigationController.interactivePopGestureRecognizer.delegate; navigationController.interactivePopGestureRecognizer.enabled = NO; navigationController.interactivePopGestureRecognizer.delegate = self; } } -- (void)enableInteractivePopGesture +- (void)restoreInteractivePopGesture { UINavigationController *navigationController; @@ -367,11 +371,11 @@ - (void)enableInteractivePopGesture navigationController = _rootViewController.navigationController; } - // Disable iOS 7 back gesture + // Restore iOS 7 back gesture if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { - navigationController.interactivePopGestureRecognizer.enabled = YES; - navigationController.interactivePopGestureRecognizer.delegate = nil; + navigationController.interactivePopGestureRecognizer.enabled = _restoreInteractivePopGestureEnabled; + navigationController.interactivePopGestureRecognizer.delegate = _restoreInteractivePopGestureDelegate; } } From b5d169b7e61cdfec3bdc946eea81243483622856 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 29 May 2015 20:44:30 -0300 Subject: [PATCH 007/250] Bump version --- 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 c1bbbe5..2eece13 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.7.1" + spec.version = "0.7.2" 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" From 9fd14b08037b086140108c723ccec4b3b74625a9 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 2 Jun 2015 09:38:16 -0300 Subject: [PATCH 008/250] Check for modules feature --- SCLAlertView/SCLAlertView.h | 4 ++++ SCLAlertView/SCLAlertView.m | 5 +++++ SCLAlertView/SCLAlertViewResponder.h | 4 ++++ SCLAlertView/SCLAlertViewStyleKit.h | 6 ++++++ SCLAlertView/SCLButton.h | 4 ++++ SCLAlertView/UIImage+ImageEffects.h | 4 ++++ SCLAlertView/UIImage+ImageEffects.m | 4 ++++ 7 files changed, 31 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 74f2d1c..d273dba 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -6,7 +6,11 @@ // Copyright (c) 2014 AnyKey Entertainment. All rights reserved. // +#if defined(__has_feature) && __has_feature(modules) @import UIKit; +#else +#import +#endif #import "SCLButton.h" typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 977c49c..518e984 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -11,7 +11,12 @@ #import "SCLAlertViewStyleKit.h" #import "UIImage+ImageEffects.h" #import "SCLMacros.h" + +#if defined(__has_feature) && __has_feature(modules) @import AVFoundation; +#else +#import +#endif #define KEYBOARD_HEIGHT 80 #define PREDICTION_BAR_HEIGHT 40 diff --git a/SCLAlertView/SCLAlertViewResponder.h b/SCLAlertView/SCLAlertViewResponder.h index 81a11f3..eecaddf 100644 --- a/SCLAlertView/SCLAlertViewResponder.h +++ b/SCLAlertView/SCLAlertViewResponder.h @@ -6,7 +6,11 @@ // Copyright (c) 2014 AnyKey Entertainment. All rights reserved. // +#if defined(__has_feature) && __has_feature(modules) @import Foundation; +#else +#import +#endif #import "SCLAlertView.h" @interface SCLAlertViewResponder : NSObject diff --git a/SCLAlertView/SCLAlertViewStyleKit.h b/SCLAlertView/SCLAlertViewStyleKit.h index cac9f13..8c0209e 100644 --- a/SCLAlertView/SCLAlertViewStyleKit.h +++ b/SCLAlertView/SCLAlertViewStyleKit.h @@ -6,8 +6,14 @@ // Copyright (c) 2014 AnyKey Entertainment. All rights reserved. // +#if defined(__has_feature) && __has_feature(modules) @import Foundation; @import UIKit; +#else +#import +#import +#endif +#import "SCLButton.h" @interface SCLAlertViewStyleKit : NSObject diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index 29ca55c..f4253c6 100644 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -6,7 +6,11 @@ // Copyright (c) 2014 AnyKey Entertainment. All rights reserved. // +#if defined(__has_feature) && __has_feature(modules) @import UIKit; +#else +#import +#endif @interface SCLButton : UIButton diff --git a/SCLAlertView/UIImage+ImageEffects.h b/SCLAlertView/UIImage+ImageEffects.h index 85aba44..e5fd509 100755 --- a/SCLAlertView/UIImage+ImageEffects.h +++ b/SCLAlertView/UIImage+ImageEffects.h @@ -93,7 +93,11 @@ 5/3/2013 */ +#if defined(__has_feature) && __has_feature(modules) @import UIKit; +#else +#import +#endif @interface UIImage (ImageEffects) diff --git a/SCLAlertView/UIImage+ImageEffects.m b/SCLAlertView/UIImage+ImageEffects.m index e4df3aa..280560e 100755 --- a/SCLAlertView/UIImage+ImageEffects.m +++ b/SCLAlertView/UIImage+ImageEffects.m @@ -96,7 +96,11 @@ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF #import "UIImage+ImageEffects.h" #import "SCLMacros.h" +#if defined(__has_feature) && __has_feature(modules) @import Accelerate; +#else +#import +#endif #import From ab6968448f918215352e5186aecfde1f8c06e1ff Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 9 Jun 2015 12:33:50 -0300 Subject: [PATCH 009/250] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6ccba95..9aa6e79 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,9 @@ alert.iconTintColor = [UIColor purpleColor]; //Overwrite SCLAlertView background color alert.backgroundViewColor = [UIColor cyanColor]; +//Returns if the alert is visible or not. +alert.isVisible; + //Using sound alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_answer.mp3", [[NSBundle mainBundle] resourcePath]]]; ``` From f4794f1302337be4a69ec1ded9e9fa98f4c67a80 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 10 Jun 2015 15:58:36 -0300 Subject: [PATCH 010/250] Bump version --- 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 2eece13..c69b45a 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.7.2" + spec.version = "0.7.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" From 5736f20164cbc19e4a708317719b35501a191187 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 15 Jul 2015 19:50:01 -0300 Subject: [PATCH 011/250] Fix subtitles not showing properly as it is cutting some characters at bottom. #131 --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 518e984..85dbdfe 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -758,7 +758,7 @@ -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)imag CGRect r = CGRectNull; if(_attributedFormatBlock == nil) { NSString *str = subTitle; - r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin attributes:attr context:nil]; + r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attr context:nil]; } else { r = [_viewText.attributedText boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading context:nil]; } From 957cc588e71ab1cb6357b2356e3542946639e266 Mon Sep 17 00:00:00 2001 From: HuylensHu <260907583@qq.com> Date: Mon, 27 Jul 2015 14:46:37 +0800 Subject: [PATCH 012/250] fix bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix bug:when show an UIAlertView in SCLButton’s target selector, it willl be blocked --- SCLAlertView/SCLAlertView.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 85dbdfe..8e2df19 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -617,6 +617,11 @@ - (void)buttonTapped:(SCLButton *)btn if (btn.validationBlock && !btn.validationBlock()) { return; } + if([self isVisible]) + { + [self hideView]; + } + if (btn.actionType == Block) { if (btn.actionBlock) @@ -631,10 +636,6 @@ - (void)buttonTapped:(SCLButton *)btn { NSLog(@"Unknown action type for button"); } - if([self isVisible]) - { - [self hideView]; - } } #pragma mark - Show Alert From db83ae80701833128215fd9facad443f7edcf226 Mon Sep 17 00:00:00 2001 From: HuylensHu <260907583@qq.com> Date: Tue, 28 Jul 2015 10:10:42 +0800 Subject: [PATCH 013/250] fix bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when show an UIAlertView in SCLButton’s target selector, it willl be blocked on iOS7 --- SCLAlertView/SCLAlertView.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 8e2df19..4fcfd92 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1179,7 +1179,8 @@ - (void)fadeOut [self.backgroundView removeFromSuperview]; if(_usingNewWindow) { - self.SCLAlertWindow = nil; + [self.SCLAlertWindow resignKeyWindow]; + [self.SCLAlertWindow setHidden:YES]; } else { From a68886fad3e19c7dfae9574b427bfdca6030ebfd Mon Sep 17 00:00:00 2001 From: HuylensHu <260907583@qq.com> Date: Wed, 29 Jul 2015 09:54:48 +0800 Subject: [PATCH 014/250] Streamline unnecessary code if set self.SCLAlertWindow to nil, it wil l block UI, when show a UIAlertView after click a SCLButton on SCLAlertView --- SCLAlertView/SCLAlertView.m | 1 - 1 file changed, 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 4fcfd92..64e8de6 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1179,7 +1179,6 @@ - (void)fadeOut [self.backgroundView removeFromSuperview]; if(_usingNewWindow) { - [self.SCLAlertWindow resignKeyWindow]; [self.SCLAlertWindow setHidden:YES]; } else From 5d674d723a77fb30e552c1316fde6ea6472a96d3 Mon Sep 17 00:00:00 2001 From: HuylensHu <260907583@qq.com> Date: Wed, 29 Jul 2015 09:55:00 +0800 Subject: [PATCH 015/250] Revert "Streamline unnecessary code" This reverts commit a68886fad3e19c7dfae9574b427bfdca6030ebfd. --- SCLAlertView/SCLAlertView.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 64e8de6..4fcfd92 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1179,6 +1179,7 @@ - (void)fadeOut [self.backgroundView removeFromSuperview]; if(_usingNewWindow) { + [self.SCLAlertWindow resignKeyWindow]; [self.SCLAlertWindow setHidden:YES]; } else From 2215a1041e0c1aafba777acabdbe9d991305c33f Mon Sep 17 00:00:00 2001 From: HuylensHu <260907583@qq.com> Date: Wed, 29 Jul 2015 09:57:42 +0800 Subject: [PATCH 016/250] Streamline unnecessary code if set self.SCLAlertWindow to nil, it will block UI, when show a UIAlertView after click a SCLButton on SCLAlertView --- SCLAlertView/SCLAlertView.m | 1 - 1 file changed, 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 4fcfd92..64e8de6 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1179,7 +1179,6 @@ - (void)fadeOut [self.backgroundView removeFromSuperview]; if(_usingNewWindow) { - [self.SCLAlertWindow resignKeyWindow]; [self.SCLAlertWindow setHidden:YES]; } else From 982b80b616047f51d22ef03faf3aaaffedf1b3dd Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 29 Jul 2015 08:57:56 -0300 Subject: [PATCH 017/250] Bump version --- 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 c69b45a..c5f82ed 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.7.3" + spec.version = "0.7.4" 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" From b41aa4883750b914bae8a1bf11bf77936305c28b Mon Sep 17 00:00:00 2001 From: Taylor Ryan Date: Fri, 14 Aug 2015 09:51:39 -0400 Subject: [PATCH 018/250] Dynamically set button height to allow for multiple lines of text. --- SCLAlertView/SCLAlertView.m | 7 ++++--- SCLAlertView/SCLButton.m | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 64e8de6..8b82711 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -20,6 +20,7 @@ #define KEYBOARD_HEIGHT 80 #define PREDICTION_BAR_HEIGHT 40 +#define ADD_BUTTON_PADDING 10.0f @interface SCLAlertView () @@ -546,15 +547,15 @@ -(void)keyboardWillHide:(NSNotification *)notification - (SCLButton *)addButton:(NSString *)title { - // Update view height - self.windowHeight += 45.0f; - // Add button SCLButton *btn = [[SCLButton alloc] init]; btn.layer.masksToBounds = YES; [btn setTitle:title forState:UIControlStateNormal]; btn.titleLabel.font = [UIFont fontWithName:_buttonsFontFamily size:_buttonsFontSize]; + // Update view height + self.windowHeight += (btn.frame.size.height + ADD_BUTTON_PADDING); + [_contentView addSubview:btn]; [_buttons addObject:btn]; diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 3bbada0..1df01ca 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -8,6 +8,8 @@ #import "SCLButton.h" +#define MIN_HEIGHT 35.0f + @implementation SCLButton - (instancetype)init @@ -43,6 +45,20 @@ - (instancetype)initWithFrame:(CGRect)frame - (void)setup { self.frame = CGRectMake(0.0f, 0.0f, 216.0f, 35.0f); + self.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; + self.titleLabel.textAlignment = NSTextAlignmentCenter; +} + +-(void)setTitle:(NSString *)title forState:(UIControlState)state +{ + [super setTitle:title forState:state]; + self.titleLabel.numberOfLines = 0; + // Update title frame. + [self.titleLabel sizeToFit]; + // Get height needed to display title label completely + CGFloat buttonHeight = MAX(self.titleLabel.frame.size.height, MIN_HEIGHT); + // Update button frame + self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, buttonHeight); } - (void)setHighlighted:(BOOL)highlighted From 8964fbf13b64639064dd4085954dab8e4f46777a Mon Sep 17 00:00:00 2001 From: Taylor Ryan Date: Tue, 18 Aug 2015 15:25:13 -0400 Subject: [PATCH 019/250] Implement a timer on a single button to display how much time is left before that button is triggered. --- SCLAlertView.xcodeproj/project.pbxproj | 6 ++ SCLAlertView/SCLAlertView.h | 6 ++ SCLAlertView/SCLAlertView.m | 38 ++++++- SCLAlertView/SCLButton.h | 8 ++ SCLAlertView/SCLButton.m | 9 ++ SCLAlertView/SCLTimerDisplay.h | 34 ++++++ SCLAlertView/SCLTimerDisplay.m | 102 ++++++++++++++++++ .../Base.lproj/Storyboard.storyboard | 18 +++- SCLAlertViewExample/ViewController.m | 13 ++- 9 files changed, 225 insertions(+), 9 deletions(-) create mode 100644 SCLAlertView/SCLTimerDisplay.h create mode 100644 SCLAlertView/SCLTimerDisplay.m diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index 693ab00..37b51a5 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */; }; DD2E172A19FA84B800CBAEC3 /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */; }; DD4BA9C119DED8EF008D73EB /* right_answer.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */; }; DD7282B919D6087C00077F54 /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD7282B719D6087C00077F54 /* Storyboard.storyboard */; }; @@ -32,6 +33,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTimerDisplay.h; sourceTree = ""; }; + 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTimerDisplay.m; sourceTree = ""; }; DD0D295B19D902DA00881F53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = SCLAlertViewExample/Info.plist; sourceTree = SOURCE_ROOT; }; DD2E172819FA84B800CBAEC3 /* UIImage+ImageEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ImageEffects.h"; sourceTree = ""; }; DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ImageEffects.m"; sourceTree = ""; }; @@ -162,6 +165,8 @@ DDB15FDF19D5D85B00173158 /* SCLAlertViewStyleKit.h */, DDB15FE019D5D85B00173158 /* SCLAlertViewStyleKit.m */, DD2F03171AAFA4E0007BC507 /* SCLMacros.h */, + 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */, + 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */, ); path = SCLAlertView; sourceTree = ""; @@ -270,6 +275,7 @@ DDB15FCB19D5B88A00173158 /* ViewController.m in Sources */, DDB15FD419D5B8DB00173158 /* main.m in Sources */, DDB15FE119D5D85B00173158 /* SCLAlertViewStyleKit.m in Sources */, + 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */, DDB15FD719D5B96500173158 /* SCLAlertView.m in Sources */, DDB15FDB19D5BAA000173158 /* SCLButton.m in Sources */, DDB15FCA19D5B88A00173158 /* AppDelegate.m in Sources */, diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index d273dba..2510b42 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -220,6 +220,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ - (void)addCustomTextField:(UITextField *)textField; +/** Add Timer Display + * + * @param buttonIndex The index of the button to add the timer display to. + */ +- (void)addTimerToButton:(NSInteger)buttonIndex; + /** Set SubTitle Height * * @deprecated Deprecated since 0.5.2+ . diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 8b82711..0201986 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -10,6 +10,7 @@ #import "SCLAlertViewResponder.h" #import "SCLAlertViewStyleKit.h" #import "UIImage+ImageEffects.h" +#import "SCLTimerDisplay.h" #import "SCLMacros.h" #if defined(__has_feature) && __has_feature(modules) @@ -68,6 +69,7 @@ @implementation SCLAlertView // Timer NSTimer *durationTimer; +SCLTimerDisplay *buttonTimer; #pragma mark - Initialization @@ -613,6 +615,9 @@ - (SCLButton *)addButton:(NSString *)title target:(id)target selector:(SEL)selec - (void)buttonTapped:(SCLButton *)btn { + // Cancel Countdown timer + [buttonTimer cancelTimer]; + // If the button has a validation block, and the validation block returns NO, validation // failed, so we should bail. if (btn.validationBlock && !btn.validationBlock()) { @@ -639,6 +644,17 @@ - (void)buttonTapped:(SCLButton *)btn } } +#pragma mark - Button Timer + +- (void)addTimerToButton:(NSInteger)buttonIndex +{ + buttonIndex = MAX(buttonIndex, 0); + buttonIndex = MIN(buttonIndex, [_buttons count]); + + buttonTimer = [[SCLTimerDisplay alloc] initWithOrigin:CGPointMake(5, 5) radius:13 lineWidth:4]; + buttonTimer.buttonIndex = buttonIndex; +} + #pragma mark - Show Alert -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle duration:(NSTimeInterval)duration completeText:(NSString *)completeText style:(SCLAlertViewStyle)style @@ -886,11 +902,23 @@ -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)imag if (duration > 0) { [durationTimer invalidate]; - durationTimer = [NSTimer scheduledTimerWithTimeInterval:duration - target:self - selector:@selector(hideView) - userInfo:nil - repeats:NO]; + + if (buttonTimer && [_buttons count] > 0) { + + SCLButton *btn = [_buttons objectAtIndex:buttonTimer.buttonIndex]; + btn.timer = buttonTimer; + [buttonTimer startTimerWithTimeLimit:duration completed:^{ + [self buttonTapped:btn]; + }]; + } + else + { + durationTimer = [NSTimer scheduledTimerWithTimeInterval:duration + target:self + selector:@selector(hideView) + userInfo:nil + repeats:NO]; + } } if(_usingNewWindow) diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index f4253c6..7146fe9 100644 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -12,6 +12,8 @@ #import #endif +@class SCLTimerDisplay; + @interface SCLButton : UIButton typedef void (^SCLActionBlock)(void); @@ -85,4 +87,10 @@ typedef NS_ENUM(NSInteger, SCLActionType) */ - (void)parseConfig:(NSDictionary *)buttonConfig; +/** Set button timer. + * + * Holds the button timer, if present. + */ +@property (nonatomic) SCLTimerDisplay *timer; + @end diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 1df01ca..f37c8a8 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -7,6 +7,7 @@ // #import "SCLButton.h" +#import "SCLTimerDisplay.h" #define MIN_HEIGHT 35.0f @@ -72,6 +73,14 @@ - (void)setDefaultBackgroundColor:(UIColor *)defaultBackgroundColor self.backgroundColor = _defaultBackgroundColor = defaultBackgroundColor; } +- (void)setTimer:(SCLTimerDisplay *)timer +{ + _timer = timer; + [self addSubview:timer]; + [timer updateFrame:self.frame.size]; + timer.color = self.titleLabel.textColor; +} + #pragma mark - Button Apperance - (void)parseConfig:(NSDictionary *)buttonConfig diff --git a/SCLAlertView/SCLTimerDisplay.h b/SCLAlertView/SCLTimerDisplay.h new file mode 100644 index 0000000..d721b7d --- /dev/null +++ b/SCLAlertView/SCLTimerDisplay.h @@ -0,0 +1,34 @@ +// +// SCLTimerDisplay.h +// SCLAlertView +// +// Created by Taylor Ryan on 8/18/15. +// Copyright (c) 2015 AnyKey Entertainment. All rights reserved. +// +// Taken from https://stackoverflow.com/questions/11783439/uibutton-with-timer + +#import +#import "SCLButton.h" + +@interface SCLTimerDisplay : UIView{ + CGFloat currentAngle; + CGFloat currentTime; + CGFloat timerLimit; + CGFloat radius; + CGFloat lineWidth; + NSTimer *timer; + SCLActionBlock completedBlock; +} + +@property CGFloat currentAngle; +@property (nonatomic) UIColor *color; +@property NSInteger buttonIndex; + +- (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r; +- (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFloat)width; +- (void)updateFrame:(CGSize)size; +- (void)cancelTimer; +- (void)stopTimer; +- (void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed; + +@end diff --git a/SCLAlertView/SCLTimerDisplay.m b/SCLAlertView/SCLTimerDisplay.m new file mode 100644 index 0000000..274a228 --- /dev/null +++ b/SCLAlertView/SCLTimerDisplay.m @@ -0,0 +1,102 @@ +// +// SCLTimerDisplay.m +// SCLAlertView +// +// Created by Taylor Ryan on 8/18/15. +// Copyright (c) 2015 AnyKey Entertainment. All rights reserved. +// + +#import "SCLTimerDisplay.h" + +@implementation SCLTimerDisplay + +#define DEGREES_TO_RADIANS(degrees) ((M_PI * degrees)/ 180) +#define TIMER_STEP .01 +#define START_DEGREE_OFFSET -90 + +@synthesize currentAngle; + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) + { + self.backgroundColor = [UIColor clearColor]; + currentAngle = 0; + } + return self; +} + +- (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r +{ + return [self initWithOrigin:(CGPoint)origin radius:r lineWidth:5]; +} + +- (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFloat)width +{ + self = [super initWithFrame:CGRectMake(origin.x, origin.y, r*2, r*2)]; + if (self) { + self.backgroundColor = [UIColor clearColor]; + currentAngle = START_DEGREE_OFFSET; + radius = r-(width/2); + lineWidth = width; + self.color = [UIColor whiteColor]; + self.userInteractionEnabled = NO; + } + return self; +} + +- (void)updateFrame:(CGSize)size +{ + CGFloat r = radius+(lineWidth/2); + + CGFloat originX = size.width - (2*r) - 5; + CGFloat originY = (size.height - (2*r))/2; + + self.frame = CGRectMake(originX, originY, r*2, r*2); +} + +- (void)drawRect:(CGRect)rect +{ + UIBezierPath* aPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(radius+(lineWidth/2), radius+(lineWidth/2)) + radius:radius + startAngle:DEGREES_TO_RADIANS(START_DEGREE_OFFSET) + endAngle:DEGREES_TO_RADIANS(currentAngle) + clockwise:YES]; + [self.color setStroke]; + aPath.lineWidth = lineWidth; + [aPath stroke]; +} + +-(void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed +{ + timerLimit = tl; + timer = [NSTimer scheduledTimerWithTimeInterval:TIMER_STEP target:self selector:@selector(updateTimerButton:) userInfo:nil repeats:YES]; + completedBlock = completed; +} + +-(void)cancelTimer +{ + [timer invalidate]; +} + +-(void)stopTimer +{ + [timer invalidate]; + if (completedBlock != nil) { + completedBlock(); + } +} + +-(void)updateTimerButton:(NSTimer *)timer +{ + currentTime += TIMER_STEP; + currentAngle = (currentTime/timerLimit) * 360 + START_DEGREE_OFFSET; + + if(currentAngle >= (360+START_DEGREE_OFFSET)){ + [self stopTimer]; + } + [self setNeedsDisplay]; +} + +@end diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index f105cfb..d92c25d 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -1,8 +1,8 @@ - + - + @@ -128,6 +128,18 @@ + @@ -146,6 +158,7 @@ + @@ -154,6 +167,7 @@ + diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index f245cb0..36ab198 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -55,10 +55,10 @@ - (IBAction)showSuccess:(id)sender [alert addButton:@"Second Button" actionBlock:^(void) { NSLog(@"Second button tapped"); }]; - + [alert addTimerToButton:0]; alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_answer.mp3", [[NSBundle mainBundle] resourcePath]]]; - [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; + [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:10.0f]; } - (IBAction)showError:(id)sender @@ -246,6 +246,15 @@ - (IBAction)showWaiting:(id)sender closeButtonTitle:nil duration:5.0f]; } +- (IBAction)showCountdown:(id)sender +{ + SCLAlertView *alert = [[SCLAlertView alloc] init]; + [alert addTimerToButton:0]; + [alert showInfo:self title:@"Countdown Timer" + subTitle:@"This alert has a duration set, and a countdown timer on the Dismiss button to show how long is left." + closeButtonTitle:@"Dismiss" duration:10.0f]; +} + - (void)firstButton { NSLog(@"First button tapped"); From 119289a5a53cc37427cd9b01a35ad24089a04a20 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 19 Aug 2015 09:43:26 -0300 Subject: [PATCH 020/250] Revert showSuccess example Code formatting Rename method to make more clear --- SCLAlertView/SCLAlertView.h | 2 +- SCLAlertView/SCLAlertView.m | 6 +++--- SCLAlertView/SCLButton.m | 2 +- SCLAlertView/SCLTimerDisplay.m | 8 ++++---- SCLAlertViewExample/ViewController.m | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 2510b42..c510957 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -224,7 +224,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) * * @param buttonIndex The index of the button to add the timer display to. */ -- (void)addTimerToButton:(NSInteger)buttonIndex; +- (void)addTimerToButtonIndex:(NSInteger)buttonIndex; /** Set SubTitle Height * diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 0201986..8dbb21d 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -533,7 +533,7 @@ - (void)keyboardWillShow:(NSNotification *)notification _keyboardIsVisible = YES; } --(void)keyboardWillHide:(NSNotification *)notification +- (void)keyboardWillHide:(NSNotification *)notification { if(!_keyboardIsVisible) return; @@ -646,7 +646,7 @@ - (void)buttonTapped:(SCLButton *)btn #pragma mark - Button Timer -- (void)addTimerToButton:(NSInteger)buttonIndex +- (void)addTimerToButtonIndex:(NSInteger)buttonIndex { buttonIndex = MAX(buttonIndex, 0); buttonIndex = MIN(buttonIndex, [_buttons count]); @@ -657,7 +657,7 @@ - (void)addTimerToButton:(NSInteger)buttonIndex #pragma mark - Show Alert --(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle duration:(NSTimeInterval)duration completeText:(NSString *)completeText style:(SCLAlertViewStyle)style +- (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle duration:(NSTimeInterval)duration completeText:(NSString *)completeText style:(SCLAlertViewStyle)style { if(_usingNewWindow) { diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index f37c8a8..4063a41 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -50,7 +50,7 @@ - (void)setup self.titleLabel.textAlignment = NSTextAlignmentCenter; } --(void)setTitle:(NSString *)title forState:(UIControlState)state +- (void)setTitle:(NSString *)title forState:(UIControlState)state { [super setTitle:title forState:state]; self.titleLabel.numberOfLines = 0; diff --git a/SCLAlertView/SCLTimerDisplay.m b/SCLAlertView/SCLTimerDisplay.m index 274a228..3a3f290 100644 --- a/SCLAlertView/SCLTimerDisplay.m +++ b/SCLAlertView/SCLTimerDisplay.m @@ -68,19 +68,19 @@ - (void)drawRect:(CGRect)rect [aPath stroke]; } --(void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed +- (void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed { timerLimit = tl; timer = [NSTimer scheduledTimerWithTimeInterval:TIMER_STEP target:self selector:@selector(updateTimerButton:) userInfo:nil repeats:YES]; completedBlock = completed; } --(void)cancelTimer +- (void)cancelTimer { [timer invalidate]; } --(void)stopTimer +- (void)stopTimer { [timer invalidate]; if (completedBlock != nil) { @@ -88,7 +88,7 @@ -(void)stopTimer } } --(void)updateTimerButton:(NSTimer *)timer +- (void)updateTimerButton:(NSTimer *)timer { currentTime += TIMER_STEP; currentAngle = (currentTime/timerLimit) * 360 + START_DEGREE_OFFSET; diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 36ab198..92e0071 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -55,10 +55,10 @@ - (IBAction)showSuccess:(id)sender [alert addButton:@"Second Button" actionBlock:^(void) { NSLog(@"Second button tapped"); }]; - [alert addTimerToButton:0]; + alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_answer.mp3", [[NSBundle mainBundle] resourcePath]]]; - [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:10.0f]; + [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } - (IBAction)showError:(id)sender @@ -249,7 +249,7 @@ - (IBAction)showWaiting:(id)sender - (IBAction)showCountdown:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - [alert addTimerToButton:0]; + [alert addTimerToButtonIndex:0]; [alert showInfo:self title:@"Countdown Timer" subTitle:@"This alert has a duration set, and a countdown timer on the Dismiss button to show how long is left." closeButtonTitle:@"Dismiss" duration:10.0f]; From f147da51a438c110b28f7f6e8fe522fd65922f98 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 19 Aug 2015 09:52:31 -0300 Subject: [PATCH 021/250] Update doc --- README.md | 18 +++++++++++++++++- ScreenShots/ScreenShot6.png | Bin 0 -> 45754 bytes 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ScreenShots/ScreenShot6.png diff --git a/README.md b/README.md index 9aa6e79..c9988b7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ Animated Alert View written in Swift but ported to Objective-C, which can be use ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot2.png) ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot3.png)_ ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot4.png) -![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot5.png) +![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot5.png)_ +![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot6.png) ###Easy to use ```Objective-C @@ -75,6 +76,21 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert showSuccess:self title:@"Button View" subTitle:@"This alert view has buttons" closeButtonTitle:@"Done" duration:0.0f]; ``` +###Add button timer +```Objective-C +//The index of the button to add the timer display to. +[alert addTimerToButtonIndex:0]; +``` + +Example: + +```Objective-C +SCLAlertView *alert = [[SCLAlertView alloc] init]; +[alert addTimerToButtonIndex:0]; +[alert showInfo:self title:@"Countdown Timer" subTitle:@"This alert has a duration set, and a countdown timer on the Dismiss button to show how long is left." closeButtonTitle:@"Dismiss" duration:10.0f]; +``` + + ###Add Text Attributes ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; diff --git a/ScreenShots/ScreenShot6.png b/ScreenShots/ScreenShot6.png new file mode 100644 index 0000000000000000000000000000000000000000..814ada1c1eda3bc490848a49f013759f48470f48 GIT binary patch literal 45754 zcmcF~1yoeu_wS{L9?2nP$N>fz8jo;pS5Pq+&eeU*=L`$b1I_0D?yj^77i+_HN#8UiNP8OsewoOzxg;whqoV z0PuV%ThC5kZ=Xu?a_wABJt`x#nd4|6oAajIJsg#MhPP*JDpt*$i)WCN31Nj0Bs(?oa6PkX&@;3 zcZNR(V44D_#K=tqn8k@q@b>y2}MhDx+SamGyyQuqlMc1JB5amk}|p zO3h6nVu5LqDZ|_SB7;UCScr7vY!m=;6Dh&bp4~nlC#fDE7l~^kdB$_lf%}))(sJu= zXQIL#oVZQzz{xu#UjuE>L);*jyL`4|Z2PB#xjvV%w)LbkAAsEbC8IOzpw=sAYB6l|>dvnFS*Ovh^Hre4&E>_$=dY~60%pO=*uOWrN6$5i=qHl!!z@?6 z#Vg-56aKwnm}c%(wQM!!qS(?Q^N3T(M4t&1F-OZKarUuI{k8tOj=aW_S{DXt9i=e* z6M0I_tgwEmb3l!~JHK86z|S_ft{DUbE66@{bHeZMiS(^T)9myG@5Av<0 zqO@U3`GjArz4eMjf--a<$__!31;c~c(fGk?(lv@{rekRa^iiVx zhv~Z+q#14o##~KY0hEcu1aH;evcIL{;?plHFD_pzCp0)S7}1X}d#d-UTFF3AZ>tP{ zCbhz#JX`xvk5137>|tqSxm~H7zI0)r$!#>QNsmU)Bl$v|+`4C5?fp!IRx}OIk#HyC ziU^-z;a>K-vBdyiuD0}BhPGJA^0K@K@`7rDMh&`WDYnvhTj?IZ-+61{?;=Xl&H`iB zC{8%Pa?%wGX|(d&JaH;dO-nVdP^r+VP(J)5QhijCUHnP0&Ez_mM0P-p;|YhdUHmvs z_O9Nd-f9U!36-X#_(e5uxl<8cUYmknhil1kdd}ykK{*<3C2KD}?f#*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a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index c5f82ed..d638d84 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.7.4" + spec.version = "0.7.5" 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" From be60b1b4a2a53f581f73d3aecfa3e0ab900b05c9 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 4 Sep 2015 12:10:32 -0300 Subject: [PATCH 023/250] Add count label inside timer circle --- SCLAlertView/SCLTimerDisplay.m | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/SCLAlertView/SCLTimerDisplay.m b/SCLAlertView/SCLTimerDisplay.m index 3a3f290..a4abb4b 100644 --- a/SCLAlertView/SCLTimerDisplay.m +++ b/SCLAlertView/SCLTimerDisplay.m @@ -8,6 +8,12 @@ #import "SCLTimerDisplay.h" +@interface SCLTimerDisplay () + +@property (strong, nonatomic) UILabel *countLabel; + +@end + @implementation SCLTimerDisplay #define DEGREES_TO_RADIANS(degrees) ((M_PI * degrees)/ 180) @@ -42,6 +48,15 @@ - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFl lineWidth = width; self.color = [UIColor whiteColor]; self.userInteractionEnabled = NO; + + // Add count label + _countLabel = [[UILabel alloc] init]; + _countLabel.textColor = [UIColor whiteColor]; + _countLabel.backgroundColor = [UIColor clearColor]; + _countLabel.font = [UIFont fontWithName: @"HelveticaNeue-Bold" size:12.0f]; + _countLabel.textAlignment = NSTextAlignmentCenter; + _countLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + [self addSubview:_countLabel]; } return self; } @@ -54,6 +69,7 @@ - (void)updateFrame:(CGSize)size CGFloat originY = (size.height - (2*r))/2; self.frame = CGRectMake(originX, originY, r*2, r*2); + self.countLabel.frame = CGRectMake(0, 0, r*2, r*2); } - (void)drawRect:(CGRect)rect @@ -66,6 +82,8 @@ - (void)drawRect:(CGRect)rect [self.color setStroke]; aPath.lineWidth = lineWidth; [aPath stroke]; + + _countLabel.text = [NSString stringWithFormat:@"%d", (int)currentTime]; } - (void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed From 970c0bd00c2a075ada692418c9dbb53a38493760 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 9 Sep 2015 09:48:27 -0300 Subject: [PATCH 024/250] count label color should follow the button text color --- SCLAlertView/SCLTimerDisplay.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SCLAlertView/SCLTimerDisplay.m b/SCLAlertView/SCLTimerDisplay.m index a4abb4b..0159751 100644 --- a/SCLAlertView/SCLTimerDisplay.m +++ b/SCLAlertView/SCLTimerDisplay.m @@ -28,14 +28,14 @@ - (id)initWithFrame:(CGRect)frame if (self) { self.backgroundColor = [UIColor clearColor]; - currentAngle = 0; + currentAngle = 0.0f; } return self; } - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r { - return [self initWithOrigin:(CGPoint)origin radius:r lineWidth:5]; + return [self initWithOrigin:(CGPoint)origin radius:r lineWidth:5.0f]; } - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFloat)width @@ -91,6 +91,7 @@ - (void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed timerLimit = tl; timer = [NSTimer scheduledTimerWithTimeInterval:TIMER_STEP target:self selector:@selector(updateTimerButton:) userInfo:nil repeats:YES]; completedBlock = completed; + _countLabel.textColor = _color; } - (void)cancelTimer @@ -111,7 +112,7 @@ - (void)updateTimerButton:(NSTimer *)timer currentTime += TIMER_STEP; currentAngle = (currentTime/timerLimit) * 360 + START_DEGREE_OFFSET; - if(currentAngle >= (360+START_DEGREE_OFFSET)){ + if(currentAngle >= (360 + START_DEGREE_OFFSET)) { [self stopTimer]; } [self setNeedsDisplay]; From f12939010402874481396ba89e2b4a6d3726a920 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 9 Sep 2015 10:02:37 -0300 Subject: [PATCH 025/250] Remove current window --- SCLAlertView/SCLAlertView.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 8dbb21d..67048da 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1191,6 +1191,10 @@ - (void)hideView if(_usingNewWindow) { + // Remove current window + [_SCLAlertWindow setHidden:YES]; + _SCLAlertWindow = nil; + // Restore previous window [self.previousWindow makeKeyAndVisible]; self.previousWindow = nil; From 9b0ac2a319efa45107f47b059ba4fed5471c4fbf Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 9 Sep 2015 10:09:54 -0300 Subject: [PATCH 026/250] Remove dupe code to remove current window --- SCLAlertView/SCLAlertView.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 67048da..2c88e36 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1191,10 +1191,6 @@ - (void)hideView if(_usingNewWindow) { - // Remove current window - [_SCLAlertWindow setHidden:YES]; - _SCLAlertWindow = nil; - // Restore previous window [self.previousWindow makeKeyAndVisible]; self.previousWindow = nil; @@ -1212,7 +1208,9 @@ - (void)fadeOut [self.backgroundView removeFromSuperview]; if(_usingNewWindow) { + // Remove current window [self.SCLAlertWindow setHidden:YES]; + self.SCLAlertWindow = nil; } else { From 7817567e7a96f0284c2edb33a0b0505894324a4c Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 15 Sep 2015 12:15:31 -0300 Subject: [PATCH 027/250] Fix alertView created by initWithNewWindow does not dismiss when touch outside #143 --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 2c88e36..fdab437 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -339,7 +339,7 @@ - (void)setShouldDismissOnTapOutside:(BOOL)shouldDismissOnTapOutside if(_shouldDismissOnTapOutside) { self.gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)]; - [_backgroundView addGestureRecognizer:_gestureRecognizer]; + [_usingNewWindow ? _SCLAlertWindow: _backgroundView addGestureRecognizer:_gestureRecognizer]; } } From 63ab6b04c218e23b5dc6aee4a66c7cfbf22a7cd1 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 15 Sep 2015 12:17:18 -0300 Subject: [PATCH 028/250] Bump version --- 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 d638d84..be38d1d 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.7.5" + spec.version = "0.7.6" 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" From 9e524a7a75cde84df2f3f1fcf0102140508050c0 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 17 Sep 2015 09:18:27 -0300 Subject: [PATCH 029/250] Xcode upgrade check --- SCLAlertView.xcodeproj/project.pbxproj | 7 +++++- .../LaunchImage.launchimage/Contents.json | 25 +++++-------------- SCLAlertViewExample/Info.plist | 2 +- SCLAlertViewTests/Info.plist | 2 +- 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index 37b51a5..f58e458 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -215,7 +215,7 @@ DDB15F9519D5B7C600173158 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0700; ORGANIZATIONNAME = "AnyKey Entertainment"; TargetAttributes = { DDB15F9C19D5B7C600173158 = { @@ -333,6 +333,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -399,6 +400,7 @@ INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -411,6 +413,7 @@ INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -429,6 +432,7 @@ ); INFOPLIST_FILE = SCLAlertViewTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SCLAlertView.app/SCLAlertView"; }; @@ -444,6 +448,7 @@ ); INFOPLIST_FILE = SCLAlertViewTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SCLAlertView.app/SCLAlertView"; }; diff --git a/SCLAlertViewExample/Images.xcassets/LaunchImage.launchimage/Contents.json b/SCLAlertViewExample/Images.xcassets/LaunchImage.launchimage/Contents.json index 5a29666..a0ad363 100644 --- a/SCLAlertViewExample/Images.xcassets/LaunchImage.launchimage/Contents.json +++ b/SCLAlertViewExample/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -3,43 +3,30 @@ { "orientation" : "portrait", "idiom" : "ipad", - "minimum-system-version" : "7.0", "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", "minimum-system-version" : "7.0", - "extent" : "full-screen", "scale" : "1x" }, { "orientation" : "landscape", "idiom" : "ipad", - "minimum-system-version" : "7.0", "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", "minimum-system-version" : "7.0", - "scale" : "2x" + "scale" : "1x" }, { "orientation" : "portrait", - "idiom" : "iphone", + "idiom" : "ipad", + "extent" : "full-screen", "minimum-system-version" : "7.0", - "subtype" : "retina4", "scale" : "2x" }, { - "orientation" : "portrait", + "orientation" : "landscape", "idiom" : "ipad", - "minimum-system-version" : "7.0", "extent" : "full-screen", - "scale" : "1x" + "minimum-system-version" : "7.0", + "scale" : "2x" } ], "info" : { diff --git a/SCLAlertViewExample/Info.plist b/SCLAlertViewExample/Info.plist index ad44264..422cdf3 100644 --- a/SCLAlertViewExample/Info.plist +++ b/SCLAlertViewExample/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - br.com.anykey.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/SCLAlertViewTests/Info.plist b/SCLAlertViewTests/Info.plist index f8ba0c7..ba72822 100644 --- a/SCLAlertViewTests/Info.plist +++ b/SCLAlertViewTests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - br.com.anykey.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName From d15f5d390b8aa3c95196e330d82a01316dcd6b9e Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 17 Sep 2015 09:18:41 -0300 Subject: [PATCH 030/250] code formatting --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index fdab437..3ccff0d 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -339,7 +339,7 @@ - (void)setShouldDismissOnTapOutside:(BOOL)shouldDismissOnTapOutside if(_shouldDismissOnTapOutside) { self.gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)]; - [_usingNewWindow ? _SCLAlertWindow: _backgroundView addGestureRecognizer:_gestureRecognizer]; + [_usingNewWindow ? _SCLAlertWindow : _backgroundView addGestureRecognizer:_gestureRecognizer]; } } From 9478ccc7de290eacd97b4fc9f8c2df2eb3c5f13e Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 17 Sep 2015 09:45:03 -0300 Subject: [PATCH 031/250] Support countdown and timer --- SCLAlertView/SCLAlertView.h | 3 +- SCLAlertView/SCLAlertView.m | 3 +- SCLAlertView/SCLTimerDisplay.h | 3 +- SCLAlertView/SCLTimerDisplay.m | 25 ++++++++++++---- .../Base.lproj/Storyboard.storyboard | 30 +++++++++---------- SCLAlertViewExample/ViewController.m | 4 +-- 6 files changed, 43 insertions(+), 25 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index c510957..705567f 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -223,8 +223,9 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) /** Add Timer Display * * @param buttonIndex The index of the button to add the timer display to. + * @param reverse Convert timer to countdown. */ -- (void)addTimerToButtonIndex:(NSInteger)buttonIndex; +- (void)addTimerToButtonIndex:(NSInteger)buttonIndex reverse:(BOOL)reverse; /** Set SubTitle Height * diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 3ccff0d..24a0ff4 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -646,13 +646,14 @@ - (void)buttonTapped:(SCLButton *)btn #pragma mark - Button Timer -- (void)addTimerToButtonIndex:(NSInteger)buttonIndex +- (void)addTimerToButtonIndex:(NSInteger)buttonIndex reverse:(BOOL)reverse { buttonIndex = MAX(buttonIndex, 0); buttonIndex = MIN(buttonIndex, [_buttons count]); buttonTimer = [[SCLTimerDisplay alloc] initWithOrigin:CGPointMake(5, 5) radius:13 lineWidth:4]; buttonTimer.buttonIndex = buttonIndex; + buttonTimer.reverse = reverse; } #pragma mark - Show Alert diff --git a/SCLAlertView/SCLTimerDisplay.h b/SCLAlertView/SCLTimerDisplay.h index d721b7d..039c27a 100644 --- a/SCLAlertView/SCLTimerDisplay.h +++ b/SCLAlertView/SCLTimerDisplay.h @@ -21,8 +21,9 @@ } @property CGFloat currentAngle; -@property (nonatomic) UIColor *color; @property NSInteger buttonIndex; +@property (nonatomic) UIColor *color; +@property (nonatomic) BOOL reverse; - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r; - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFloat)width; diff --git a/SCLAlertView/SCLTimerDisplay.m b/SCLAlertView/SCLTimerDisplay.m index 0159751..bcec598 100644 --- a/SCLAlertView/SCLTimerDisplay.m +++ b/SCLAlertView/SCLTimerDisplay.m @@ -88,6 +88,10 @@ - (void)drawRect:(CGRect)rect - (void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed { + if (_reverse) + { + currentTime = tl; + } timerLimit = tl; timer = [NSTimer scheduledTimerWithTimeInterval:TIMER_STEP target:self selector:@selector(updateTimerButton:) userInfo:nil repeats:YES]; completedBlock = completed; @@ -109,11 +113,22 @@ - (void)stopTimer - (void)updateTimerButton:(NSTimer *)timer { - currentTime += TIMER_STEP; - currentAngle = (currentTime/timerLimit) * 360 + START_DEGREE_OFFSET; - - if(currentAngle >= (360 + START_DEGREE_OFFSET)) { - [self stopTimer]; + if (_reverse) + { + currentTime -= TIMER_STEP; + currentAngle = (currentTime/timerLimit) * 360 + START_DEGREE_OFFSET; + + if(currentTime <= 0) { + [self stopTimer]; + } + } + else { + currentTime += TIMER_STEP; + currentAngle = (currentTime/timerLimit) * 360 + START_DEGREE_OFFSET; + + if(currentAngle >= (360 + START_DEGREE_OFFSET)) { + [self stopTimer]; + } } [self setNeedsDisplay]; } diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index d92c25d..233babf 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -1,8 +1,8 @@ - + - + @@ -18,7 +18,7 @@ diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 92e0071..8fef625 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -246,10 +246,10 @@ - (IBAction)showWaiting:(id)sender closeButtonTitle:nil duration:5.0f]; } -- (IBAction)showCountdown:(id)sender +- (IBAction)showTimer:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - [alert addTimerToButtonIndex:0]; + [alert addTimerToButtonIndex:0 reverse:YES]; [alert showInfo:self title:@"Countdown Timer" subTitle:@"This alert has a duration set, and a countdown timer on the Dismiss button to show how long is left." closeButtonTitle:@"Dismiss" duration:10.0f]; From cee4ba21710362aa3c00daa9dcd773e272528cd7 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 17 Sep 2015 09:58:38 -0300 Subject: [PATCH 032/250] bump version --- 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 be38d1d..ddabbf2 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.7.6" + spec.version = "0.7.7" 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" From 77ec670b66d094573ea4f7bcf732122e800d797a Mon Sep 17 00:00:00 2001 From: Michael Belkin Date: Fri, 18 Sep 2015 12:12:39 -0700 Subject: [PATCH 033/250] Namespaced SCLActionTypes to avoid conflicts --- SCLAlertView/SCLAlertView.m | 8 ++++---- SCLAlertView/SCLButton.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 24a0ff4..51f548c 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -587,7 +587,7 @@ - (SCLButton *)addButton:(NSString *)title actionBlock:(SCLActionBlock)action btn.buttonFormatBlock = _buttonFormatBlock; } - btn.actionType = Block; + btn.actionType = SCLBlock; btn.actionBlock = action; [btn addTarget:self action:@selector(buttonTapped:) forControlEvents:UIControlEventTouchUpInside]; @@ -605,7 +605,7 @@ - (SCLButton *)addButton:(NSString *)title validationBlock:(SCLValidationBlock)v - (SCLButton *)addButton:(NSString *)title target:(id)target selector:(SEL)selector { SCLButton *btn = [self addButton:title]; - btn.actionType = Selector; + btn.actionType = SCLSelector; btn.target = target; btn.selector = selector; [btn addTarget:self action:@selector(buttonTapped:) forControlEvents:UIControlEventTouchUpInside]; @@ -628,12 +628,12 @@ - (void)buttonTapped:(SCLButton *)btn [self hideView]; } - if (btn.actionType == Block) + if (btn.actionType == SCLBlock) { if (btn.actionBlock) btn.actionBlock(); } - else if (btn.actionType == Selector) + else if (btn.actionType == SCLSelector) { UIControl *ctrl = [[UIControl alloc] init]; [ctrl sendAction:btn.selector to:btn.target forEvent:nil]; diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index 7146fe9..8996b78 100644 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -24,9 +24,9 @@ typedef NSDictionary* (^ButtonFormatBlock)(void); // Action Types typedef NS_ENUM(NSInteger, SCLActionType) { - None, - Selector, - Block + SCLNone, + SCLSelector, + SCLBlock }; /** Set button action type. From 069a1f0c8348b004acb1deccc88418d278bba7a1 Mon Sep 17 00:00:00 2001 From: Michael Belkin Date: Fri, 18 Sep 2015 12:35:43 -0700 Subject: [PATCH 034/250] Allow multi-line titles --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 51f548c..9fde4d5 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -155,7 +155,7 @@ - (instancetype)init [_circleView addSubview:_circleIconImageView]; // Title - _labelTitle.numberOfLines = 1; + _labelTitle.numberOfLines = 0; _labelTitle.textAlignment = NSTextAlignmentCenter; _labelTitle.font = [UIFont fontWithName:_titleFontFamily size:_titleFontSize]; _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); From ce29182945ec9a75060cd267d9e0505d41444103 Mon Sep 17 00:00:00 2001 From: Michael Belkin Date: Fri, 18 Sep 2015 13:01:35 -0700 Subject: [PATCH 035/250] Revert "Allow multi-line titles" This reverts commit 069a1f0c8348b004acb1deccc88418d278bba7a1. --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 9fde4d5..51f548c 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -155,7 +155,7 @@ - (instancetype)init [_circleView addSubview:_circleIconImageView]; // Title - _labelTitle.numberOfLines = 0; + _labelTitle.numberOfLines = 1; _labelTitle.textAlignment = NSTextAlignmentCenter; _labelTitle.font = [UIFont fontWithName:_titleFontFamily size:_titleFontSize]; _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); From 4ec382220e564fb55655dd0318e6b4a6424a21ab Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 17 Sep 2015 11:44:09 -0300 Subject: [PATCH 036/250] Use modern syntax --- SCLAlertView/SCLAlertView.m | 16 ++++++++-------- SCLAlertView/SCLTimerDisplay.m | 2 +- SCLAlertViewExample/ViewController.m | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 51f548c..72d1b69 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -245,7 +245,7 @@ - (void)viewWillLayoutSubviews if (SYSTEM_VERSION_LESS_THAN(@"8.0")) { // iOS versions before 7.0 did not switch the width and height on device roration - if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) + if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { CGSize ssz = sz; sz = CGSizeMake(ssz.height, ssz.width); @@ -322,7 +322,7 @@ - (void)handleTap:(UITapGestureRecognizer *)gesture for(UITextField *txt in _inputs) { // Check if there is any keyboard on screen and dismiss - if ([txt isEditing]) + if (txt.editing) { [txt resignFirstResponder]; hide = NO; @@ -508,7 +508,7 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField { // If this is the last object in the inputs array, resign first responder // as the form is at the end. - if (textField == [_inputs lastObject]) + if (textField == _inputs.lastObject) { [textField resignFirstResponder]; } @@ -663,7 +663,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima if(_usingNewWindow) { // Save previous window - self.previousWindow = [[UIApplication sharedApplication] keyWindow]; + self.previousWindow = [UIApplication sharedApplication].keyWindow; self.backgroundView.frame = _SCLAlertWindow.bounds; // Add window subview @@ -904,9 +904,9 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima { [durationTimer invalidate]; - if (buttonTimer && [_buttons count] > 0) { + if (buttonTimer && _buttons.count > 0) { - SCLButton *btn = [_buttons objectAtIndex:buttonTimer.buttonIndex]; + SCLButton *btn = _buttons[buttonTimer.buttonIndex]; btn.timer = buttonTimer; [buttonTimer startTimerWithTimeLimit:duration completed:^{ [self buttonTapped:btn]; @@ -1055,7 +1055,7 @@ - (CGRect)mainScreenFrame - (BOOL)isAppExtension { - return [[[NSBundle mainBundle] executablePath] rangeOfString:@".appex/"].location != NSNotFound; + return [[NSBundle mainBundle].executablePath rangeOfString:@".appex/"].location != NSNotFound; } #pragma mark - Background Effects @@ -1070,7 +1070,7 @@ - (void)makeShadowBackground - (void)makeBlurBackground { - UIView *appView = (_usingNewWindow) ? [[[[UIApplication sharedApplication] keyWindow] subviews] lastObject] : _rootViewController.view; + UIView *appView = (_usingNewWindow) ? [UIApplication sharedApplication].keyWindow.subviews.lastObject : _rootViewController.view; UIImage *image = [UIImage convertViewToImage:appView]; UIImage *blurSnapshotImage = [image applyBlurWithRadius:5.0f tintColor:[UIColor colorWithWhite:0.2f diff --git a/SCLAlertView/SCLTimerDisplay.m b/SCLAlertView/SCLTimerDisplay.m index bcec598..cb055e4 100644 --- a/SCLAlertView/SCLTimerDisplay.m +++ b/SCLAlertView/SCLTimerDisplay.m @@ -22,7 +22,7 @@ @implementation SCLTimerDisplay @synthesize currentAngle; -- (id)initWithFrame:(CGRect)frame +- (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 8fef625..5ab6d67 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -56,7 +56,7 @@ - (IBAction)showSuccess:(id)sender NSLog(@"Second button tapped"); }]; - alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_answer.mp3", [[NSBundle mainBundle] resourcePath]]]; + alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_answer.mp3", [NSBundle mainBundle].resourcePath]]; [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } @@ -205,7 +205,7 @@ - (IBAction)showValidation:(id)sender return NO; } - NSInteger evenFieldEntry = [evenField.text integerValue]; + NSInteger evenFieldEntry = (evenField.text).integerValue; BOOL evenFieldPassedValidation = evenFieldEntry % 2 == 0; if (!evenFieldPassedValidation) @@ -215,7 +215,7 @@ - (IBAction)showValidation:(id)sender return NO; } - NSInteger oddFieldEntry = [oddField.text integerValue]; + NSInteger oddFieldEntry = (oddField.text).integerValue; BOOL oddFieldPassedValidation = oddFieldEntry % 2 == 1; if (!oddFieldPassedValidation) @@ -236,8 +236,8 @@ - (IBAction)showWaiting:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - [alert setShowAnimationType:SlideInToCenter]; - [alert setHideAnimationType:SlideOutFromCenter]; + alert.showAnimationType = SlideInToCenter; + alert.hideAnimationType = SlideOutFromCenter; alert.backgroundType = Transparent; From f48e2c01d5f3a22f484679f61d7c1b07ddf0419f Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 18 Sep 2015 09:37:19 -0300 Subject: [PATCH 037/250] Add SCLTextView class Remove some hardcode values --- SCLAlertView.xcodeproj/project.pbxproj | 6 +++ SCLAlertView/SCLAlertView.h | 3 +- SCLAlertView/SCLAlertView.m | 32 ++++++--------- SCLAlertView/SCLButton.m | 2 +- SCLAlertView/SCLTextView.h | 17 ++++++++ SCLAlertView/SCLTextView.m | 56 ++++++++++++++++++++++++++ SCLAlertViewExample/ViewController.m | 8 ++-- 7 files changed, 99 insertions(+), 25 deletions(-) create mode 100644 SCLAlertView/SCLTextView.h create mode 100644 SCLAlertView/SCLTextView.m diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index f58e458..ba35bdf 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */; }; + DD24453C1BAC383600892117 /* SCLTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD24453B1BAC383600892117 /* SCLTextView.m */; settings = {ASSET_TAGS = (); }; }; DD2E172A19FA84B800CBAEC3 /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */; }; DD4BA9C119DED8EF008D73EB /* right_answer.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */; }; DD7282B919D6087C00077F54 /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD7282B719D6087C00077F54 /* Storyboard.storyboard */; }; @@ -36,6 +37,8 @@ 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTimerDisplay.h; sourceTree = ""; }; 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTimerDisplay.m; sourceTree = ""; }; DD0D295B19D902DA00881F53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = SCLAlertViewExample/Info.plist; sourceTree = SOURCE_ROOT; }; + DD24453A1BAC383600892117 /* SCLTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTextView.h; sourceTree = ""; }; + DD24453B1BAC383600892117 /* SCLTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTextView.m; sourceTree = ""; }; DD2E172819FA84B800CBAEC3 /* UIImage+ImageEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ImageEffects.h"; sourceTree = ""; }; DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ImageEffects.m"; sourceTree = ""; }; DD2F03171AAFA4E0007BC507 /* SCLMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCLMacros.h; sourceTree = ""; }; @@ -167,6 +170,8 @@ DD2F03171AAFA4E0007BC507 /* SCLMacros.h */, 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */, 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */, + DD24453A1BAC383600892117 /* SCLTextView.h */, + DD24453B1BAC383600892117 /* SCLTextView.m */, ); path = SCLAlertView; sourceTree = ""; @@ -275,6 +280,7 @@ DDB15FCB19D5B88A00173158 /* ViewController.m in Sources */, DDB15FD419D5B8DB00173158 /* main.m in Sources */, DDB15FE119D5D85B00173158 /* SCLAlertViewStyleKit.m in Sources */, + DD24453C1BAC383600892117 /* SCLTextView.m in Sources */, 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */, DDB15FD719D5B96500173158 /* SCLAlertView.m in Sources */, DDB15FDB19D5BAA000173158 /* SCLButton.m in Sources */, diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 705567f..72e2150 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -12,6 +12,7 @@ #import #endif #import "SCLButton.h" +#import "SCLTextView.h" typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); typedef void (^DismissBlock)(void); @@ -212,7 +213,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) * * @param title The text displayed on the textfield. */ -- (UITextField *)addTextField:(NSString *)title; +- (SCLTextView *)addTextField:(NSString *)title; /** Add a custom Text Field * diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 72d1b69..56cd8bf 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -294,11 +294,11 @@ - (void)viewWillLayoutSubviews // Text fields CGFloat y = (_labelTitle.text == nil) ? (kCircleHeight - 20.0f) : 74.0f; y += _subTitleHeight + 14.0f; - for (UITextField *textField in _inputs) + for (SCLTextView *textField in _inputs) { - textField.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, 30.0f); + textField.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, textField.frame.size.height); textField.layer.cornerRadius = 3.0f; - y += 40.0f; + y += textField.frame.size.height + 10.0f; } // Buttons @@ -319,7 +319,7 @@ - (void)handleTap:(UITapGestureRecognizer *)gesture { BOOL hide = _shouldDismissOnTapOutside; - for(UITextField *txt in _inputs) + for(SCLTextView *txt in _inputs) { // Check if there is any keyboard on screen and dismiss if (txt.editing) @@ -447,23 +447,17 @@ - (void)addActivityIndicatorView #pragma mark - TextField -- (UITextField *)addTextField:(NSString *)title +- (SCLTextView *)addTextField:(NSString *)title { [self addObservers]; - // Update view height - self.windowHeight += 40.0f; - // Add text field - UITextField *txt = [[UITextField alloc] init]; - txt.delegate = self; - txt.returnKeyType = UIReturnKeyDone; - txt.borderStyle = UITextBorderStyleRoundedRect; + SCLTextView *txt = [[SCLTextView alloc] init]; txt.font = [UIFont fontWithName:_bodyTextFontFamily size:_bodyFontSize]; - txt.autocapitalizationType = UITextAutocapitalizationTypeWords; - txt.clearButtonMode = UITextFieldViewModeWhileEditing; - txt.layer.masksToBounds = YES; - txt.layer.borderWidth = 1.0f; + txt.delegate = self; + + // Update view height + self.windowHeight += txt.bounds.size.height + 10.0f; if (title != nil) { @@ -478,7 +472,7 @@ - (UITextField *)addTextField:(NSString *)title if (_inputs.count > 1) { NSUInteger indexOfCurrentField = [_inputs indexOfObject:txt]; - UITextField *priorField = _inputs[indexOfCurrentField - 1]; + SCLTextView *priorField = _inputs[indexOfCurrentField - 1]; priorField.returnKeyType = UIReturnKeyNext; } return txt; @@ -487,7 +481,7 @@ - (UITextField *)addTextField:(NSString *)title - (void)addCustomTextField:(UITextField *)textField { // Update view height - self.windowHeight += 40.0f; + self.windowHeight += textField.bounds.size.height + 10.0f; [_contentView addSubview:textField]; [_inputs addObject:textField]; @@ -873,7 +867,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima self.circleIconImageView.image = iconImage; } - for (UITextField *textField in _inputs) + for (SCLTextView *textField in _inputs) { textField.layer.borderColor = viewColor.CGColor; } diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 4063a41..69667a0 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -45,7 +45,7 @@ - (instancetype)initWithFrame:(CGRect)frame - (void)setup { - self.frame = CGRectMake(0.0f, 0.0f, 216.0f, 35.0f); + self.frame = CGRectMake(0.0f, 0.0f, 216.0f, MIN_HEIGHT); self.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; self.titleLabel.textAlignment = NSTextAlignmentCenter; } diff --git a/SCLAlertView/SCLTextView.h b/SCLAlertView/SCLTextView.h new file mode 100644 index 0000000..4f91486 --- /dev/null +++ b/SCLAlertView/SCLTextView.h @@ -0,0 +1,17 @@ +// +// SCLTextView.h +// SCLAlertView +// +// Created by Diogo Autilio on 9/18/15. +// Copyright © 2015 AnyKey Entertainment. All rights reserved. +// + +#if defined(__has_feature) && __has_feature(modules) +@import UIKit; +#else +#import +#endif + +@interface SCLTextView : UITextField + +@end diff --git a/SCLAlertView/SCLTextView.m b/SCLAlertView/SCLTextView.m new file mode 100644 index 0000000..4d5ad69 --- /dev/null +++ b/SCLAlertView/SCLTextView.m @@ -0,0 +1,56 @@ +// +// SCLTextView.m +// SCLAlertView +// +// Created by Diogo Autilio on 9/18/15. +// Copyright © 2015 AnyKey Entertainment. All rights reserved. +// + +#import "SCLTextView.h" + +#define MIN_HEIGHT 30.0f + +@implementation SCLTextView + +- (instancetype)init +{ + self = [super init]; + if (self) + { + [self setup]; + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder +{ + self = [super initWithCoder:aDecoder]; + if(self) + { + [self setup]; + } + return self; +} + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) + { + [self setup]; + } + return self; +} + +- (void)setup +{ + self.frame = CGRectMake(0.0f, 0.0f, 0.0f, MIN_HEIGHT); + self.returnKeyType = UIReturnKeyDone; + self.borderStyle = UITextBorderStyleRoundedRect; + self.autocapitalizationType = UITextAutocapitalizationTypeWords; + self.clearButtonMode = UITextFieldViewModeWhileEditing; + self.layer.masksToBounds = YES; + self.layer.borderWidth = 1.0f; +} + +@end diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 5ab6d67..204eef1 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -103,7 +103,7 @@ - (IBAction)showEdit:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - UITextField *textField = [alert addTextField:@"Enter your name"]; + SCLTextView *textField = [alert addTextField:@"Enter your name"]; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); @@ -128,7 +128,7 @@ - (IBAction)showAdvanced:(id)sender NSLog(@"Second button tapped"); }]; - UITextField *textField = [alert addTextField:@"Enter your name"]; + SCLTextView *textField = [alert addTextField:@"Enter your name"]; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); @@ -184,10 +184,10 @@ - (IBAction)showValidation:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - UITextField *evenField = [alert addTextField:@"Enter an even number"]; + SCLTextView *evenField = [alert addTextField:@"Enter an even number"]; evenField.keyboardType = UIKeyboardTypeNumberPad; - UITextField *oddField = [alert addTextField:@"Enter an odd number"]; + SCLTextView *oddField = [alert addTextField:@"Enter an odd number"]; oddField.keyboardType = UIKeyboardTypeNumberPad; [alert addButton:@"Test Validation" validationBlock:^BOOL{ From 0f6814cd2fa09b8f2a3495c2b5a373c3851337aa Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 18 Sep 2015 17:16:03 -0300 Subject: [PATCH 038/250] update doc --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9988b7..5c31cb7 100644 --- a/README.md +++ b/README.md @@ -79,14 +79,14 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; ###Add button timer ```Objective-C //The index of the button to add the timer display to. -[alert addTimerToButtonIndex:0]; +[alert addTimerToButtonIndex:0 reverse:NO]; ``` Example: ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; -[alert addTimerToButtonIndex:0]; +[alert addTimerToButtonIndex:0 reverse:YES]; [alert showInfo:self title:@"Countdown Timer" subTitle:@"This alert has a duration set, and a countdown timer on the Dismiss button to show how long is left." closeButtonTitle:@"Dismiss" duration:10.0f]; ``` From 83ed2258dd4d27ca05c4002a18f5428ac9f442ab Mon Sep 17 00:00:00 2001 From: Dylan Marriott Date: Sun, 4 Oct 2015 22:07:12 +0200 Subject: [PATCH 039/250] Added status bar customization --- SCLAlertView/SCLAlertView.h | 12 ++++++++++++ SCLAlertView/SCLAlertView.m | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 72e2150..ccb3114 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -179,6 +179,18 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ @property (nonatomic) CGRect extensionBounds; +/** Set status bar hidden. + * + * Status bar hidden + */ +@property (nonatomic) BOOL statusBarHidden; + +/** Set status bar style. + * + * Status bar style + */ +@property (nonatomic) UIStatusBarStyle statusBarStyle; + /** Initialize SCLAlertView using a new window. * * Init with new window diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 56cd8bf..c79b3ab 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -311,6 +311,17 @@ - (void)viewWillLayoutSubviews } } +#pragma mark - UIViewController +- (BOOL)prefersStatusBarHidden +{ + return self.statusBarHidden; +} + +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return self.statusBarStyle; +} + #pragma mark - Handle gesture - (void)handleTap:(UITapGestureRecognizer *)gesture From 9ad3835d8b1b7106ff7bf65e6db3e201fb25ca93 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 10 Jun 2015 20:07:49 -0300 Subject: [PATCH 040/250] Custom width --- README.md | 6 + SCLAlertView/SCLAlertView.h | 6 + SCLAlertView/SCLAlertView.m | 239 ++++++++++++++++++++---------------- SCLAlertView/SCLButton.h | 5 + SCLAlertView/SCLButton.m | 25 +++- 5 files changed, 173 insertions(+), 108 deletions(-) diff --git a/README.md b/README.md index 5c31cb7..234035f 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,9 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert showEdit:self title:@"Hello Edit" subTitle:@"This is a more descriptive info text with a edit textbox" closeButtonTitle:@"Done" duration:0.0f]; // Edit [alert showCustom:self image:[UIImage imageNamed:@"git"] color:color title:@"Custom" subTitle:@"Add a custom icon and color for your own type of alert!" closeButtonTitle:@"OK" duration:0.0f]; // Custom [alert showWaiting:self title:@"Waiting..." subTitle:@"Blah de blah de blah, blah. Blah de blah de" closeButtonTitle:nil duration:5.0f]; + +// Using custom alert width +SCLAlertView *alert = [[SCLAlertView alloc] initWithWindowWidth:300.0f]; ``` ###SCLAlertview in a new window. (No UIViewController) @@ -46,6 +49,9 @@ SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; [alert showEdit:@"Hello Edit" subTitle:@"This is a more descriptive info text with a edit textbox" closeButtonTitle:@"Done" duration:0.0f]; // Edit [alert showCustom:[UIImage imageNamed:@"git"] color:color title:@"Custom" subTitle:@"Add a custom icon and color for your own type of alert!" closeButtonTitle:@"OK" duration:0.0f]; // Custom [alert showWaiting:@"Waiting..." subTitle:@"Blah de blah de blah, blah. Blah de blah de" closeButtonTitle:nil duration:5.0f]; + +// Using custom alert width +SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindowWidth:300.0f]; ``` ###New Window: Known issues diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index ccb3114..d2ade25 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -197,6 +197,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ - (instancetype)initWithNewWindow; +/** Initialize SCLAlertView using a new window. + * + * Init with new window + */ +- (instancetype)initWithNewWindowWidth:(CGFloat)windowWidth; + /** Warns that alerts is gone * * Warns that alerts is gone using block diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index c79b3ab..27cf841 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -22,6 +22,7 @@ #define KEYBOARD_HEIGHT 80 #define PREDICTION_BAR_HEIGHT 40 #define ADD_BUTTON_PADDING 10.0f +#define DEFAULT_WINDOW_WIDTH 240 @interface SCLAlertView () @@ -85,116 +86,37 @@ - (instancetype)init self = [super init]; if (self) { - // Default values - kCircleTopPosition = -12.0f; - kCircleBackgroundTopPosition = -15.0f; - kCircleHeight = 56.0f; - kCircleHeightBackground = 62.0f; - kActivityIndicatorHeight = 40.0f; - kTitleTop = 24.0f; - kTitleHeight = 40.0f; - self.subTitleY = 70.0f; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - self.subTitleHeight = 90.0f; -#pragma clang diagnostic pop - self.circleIconHeight = 20.0f; - self.windowWidth = 240.0f; - self.windowHeight = 178.0f; - self.shouldDismissOnTapOutside = NO; - self.usingNewWindow = NO; - self.canAddObservers = YES; - self.keyboardIsVisible = NO; - self.hideAnimationType = FadeOut; - self.showAnimationType = SlideInFromTop; - self.backgroundType = Shadow; - - // Font - _titleFontFamily = @"HelveticaNeue"; - _bodyTextFontFamily = @"HelveticaNeue"; - _buttonsFontFamily = @"HelveticaNeue-Bold"; - _titleFontSize = 20.0f; - _bodyFontSize = 14.0f; - _buttonsFontSize = 14.0f; - - // Init - _labelTitle = [[UILabel alloc] init]; - _viewText = [[UITextView alloc] init]; - _contentView = [[UIView alloc] init]; - _circleView = [[UIView alloc] init]; - _circleViewBackground = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, kCircleHeightBackground, kCircleHeightBackground)]; - _circleIconImageView = [[UIImageView alloc] init]; - _backgroundView = [[UIImageView alloc]initWithFrame:[self mainScreenFrame]]; - _buttons = [[NSMutableArray alloc] init]; - _inputs = [[NSMutableArray alloc] init]; - - // Add Subviews - [self.view addSubview:_contentView]; - [self.view addSubview:_circleViewBackground]; - - // Background View - _backgroundView.userInteractionEnabled = YES; - - // Content View - _contentView.backgroundColor = [UIColor whiteColor]; - _contentView.layer.cornerRadius = 5.0f; - _contentView.layer.masksToBounds = YES; - _contentView.layer.borderWidth = 0.5f; - [_contentView addSubview:_labelTitle]; - [_contentView addSubview:_viewText]; - - // Circle View - _circleViewBackground.backgroundColor = [UIColor whiteColor]; - _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; - CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; - _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); - _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; - x = (kCircleHeight - _circleIconHeight) / 2; - _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); - [_circleViewBackground addSubview:_circleView]; - [_circleView addSubview:_circleIconImageView]; - - // Title - _labelTitle.numberOfLines = 1; - _labelTitle.textAlignment = NSTextAlignmentCenter; - _labelTitle.font = [UIFont fontWithName:_titleFontFamily size:_titleFontSize]; - _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); - - // View text - _viewText.editable = NO; - _viewText.allowsEditingTextAttributes = YES; - _viewText.textAlignment = NSTextAlignmentCenter; - _viewText.font = [UIFont fontWithName:_bodyTextFontFamily size:_bodyFontSize]; - _viewText.frame = CGRectMake(12.0f, _subTitleY, _windowWidth - 24.0f, _subTitleHeight); - - if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) - { - _viewText.textContainerInset = UIEdgeInsetsZero; - _viewText.textContainer.lineFragmentPadding = 0; - } - - // Colors - self.backgroundViewColor = [UIColor whiteColor]; - _labelTitle.textColor = UIColorFromHEX(0x4D4D4D); //Dark Grey - _viewText.textColor = UIColorFromHEX(0x4D4D4D); //Dark Grey - _contentView.layer.borderColor = UIColorFromHEX(0xCCCCCC).CGColor; //Light Grey + [self setupViewWindowWidth:DEFAULT_WINDOW_WIDTH]; + } + return self; +} + +- (instancetype)initWithWindowWidth:(CGFloat)windowWidth +{ + self = [super init]; + if (self) + { + [self setupViewWindowWidth:windowWidth]; } return self; } - (instancetype)initWithNewWindow { - self = [self init]; + self = [self initWithWindowWidth:DEFAULT_WINDOW_WIDTH]; if(self) { - // Create a new one to show the alert - UIWindow *alertWindow = [[UIWindow alloc] initWithFrame:[self mainScreenFrame]]; - alertWindow.windowLevel = UIWindowLevelAlert; - alertWindow.backgroundColor = [UIColor clearColor]; - alertWindow.rootViewController = self; - self.SCLAlertWindow = alertWindow; - - self.usingNewWindow = YES; + [self setupNewWindow]; + } + return self; +} + +- (instancetype)initWithNewWindowWidth:(CGFloat)windowWidth +{ + self = [self initWithWindowWidth:windowWidth]; + if(self) + { + [self setupNewWindow]; } return self; } @@ -221,6 +143,117 @@ - (void)removeObservers [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil]; } +#pragma mark - Setup view + +- (void)setupViewWindowWidth:(CGFloat)windowWidth +{ + // Default values + kCircleTopPosition = -12.0f; + kCircleBackgroundTopPosition = -15.0f; + kCircleHeight = 56.0f; + kCircleHeightBackground = 62.0f; + kActivityIndicatorHeight = 40.0f; + kTitleTop = 24.0f; + kTitleHeight = 40.0f; + self.subTitleY = 70.0f; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + self.subTitleHeight = 90.0f; +#pragma clang diagnostic pop + self.circleIconHeight = 20.0f; + self.windowWidth = windowWidth; + self.windowHeight = 178.0f; + self.shouldDismissOnTapOutside = NO; + self.usingNewWindow = NO; + self.canAddObservers = YES; + self.keyboardIsVisible = NO; + self.hideAnimationType = FadeOut; + self.showAnimationType = SlideInFromTop; + self.backgroundType = Shadow; + + // Font + _titleFontFamily = @"HelveticaNeue"; + _bodyTextFontFamily = @"HelveticaNeue"; + _buttonsFontFamily = @"HelveticaNeue-Bold"; + _titleFontSize = 20.0f; + _bodyFontSize = 14.0f; + _buttonsFontSize = 14.0f; + + // Init + _labelTitle = [[UILabel alloc] init]; + _viewText = [[UITextView alloc] init]; + _contentView = [[UIView alloc] init]; + _circleView = [[UIView alloc] init]; + _circleViewBackground = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, kCircleHeightBackground, kCircleHeightBackground)]; + _circleIconImageView = [[UIImageView alloc] init]; + _backgroundView = [[UIImageView alloc]initWithFrame:[self mainScreenFrame]]; + _buttons = [[NSMutableArray alloc] init]; + _inputs = [[NSMutableArray alloc] init]; + + // Add Subviews + [self.view addSubview:_contentView]; + [self.view addSubview:_circleViewBackground]; + + // Background View + _backgroundView.userInteractionEnabled = YES; + + // Content View + _contentView.backgroundColor = [UIColor whiteColor]; + _contentView.layer.cornerRadius = 5.0f; + _contentView.layer.masksToBounds = YES; + _contentView.layer.borderWidth = 0.5f; + [_contentView addSubview:_labelTitle]; + [_contentView addSubview:_viewText]; + + // Circle View + _circleViewBackground.backgroundColor = [UIColor whiteColor]; + _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; + CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; + _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); + _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; + x = (kCircleHeight - _circleIconHeight) / 2; + _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); + [_circleViewBackground addSubview:_circleView]; + [_circleView addSubview:_circleIconImageView]; + + // Title + _labelTitle.numberOfLines = 1; + _labelTitle.textAlignment = NSTextAlignmentCenter; + _labelTitle.font = [UIFont fontWithName:_titleFontFamily size:_titleFontSize]; + _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); + + // View text + _viewText.editable = NO; + _viewText.allowsEditingTextAttributes = YES; + _viewText.textAlignment = NSTextAlignmentCenter; + _viewText.font = [UIFont fontWithName:_bodyTextFontFamily size:_bodyFontSize]; + _viewText.frame = CGRectMake(12.0f, _subTitleY, _windowWidth - 24.0f, _subTitleHeight); + + if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) + { + _viewText.textContainerInset = UIEdgeInsetsZero; + _viewText.textContainer.lineFragmentPadding = 0; + } + + // Colors + self.backgroundViewColor = [UIColor whiteColor]; + _labelTitle.textColor = UIColorFromHEX(0x4D4D4D); //Dark Grey + _viewText.textColor = UIColorFromHEX(0x4D4D4D); //Dark Grey + _contentView.layer.borderColor = UIColorFromHEX(0xCCCCCC).CGColor; //Light Grey +} + +- (void)setupNewWindow +{ + // Create a new one to show the alert + UIWindow *alertWindow = [[UIWindow alloc] initWithFrame:[self mainScreenFrame]]; + alertWindow.windowLevel = UIWindowLevelAlert; + alertWindow.backgroundColor = [UIColor clearColor]; + alertWindow.rootViewController = self; + self.SCLAlertWindow = alertWindow; + + self.usingNewWindow = YES; +} + #pragma mark - Modal Validation - (BOOL)isModal @@ -555,7 +588,7 @@ - (void)keyboardWillHide:(NSNotification *)notification - (SCLButton *)addButton:(NSString *)title { // Add button - SCLButton *btn = [[SCLButton alloc] init]; + SCLButton *btn = [[SCLButton alloc] initWithWindowWidth:self.windowWidth]; btn.layer.masksToBounds = YES; [btn setTitle:title forState:UIControlStateNormal]; btn.titleLabel.font = [UIFont fontWithName:_buttonsFontFamily size:_buttonsFontSize]; diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index 8996b78..1d4b496 100644 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -93,4 +93,9 @@ typedef NS_ENUM(NSInteger, SCLActionType) */ @property (nonatomic) SCLTimerDisplay *timer; +/** Init method + * + */ +- (instancetype)initWithWindowWidth:(CGFloat)windowWidth; + @end diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 69667a0..db84b75 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -9,6 +9,8 @@ #import "SCLButton.h" #import "SCLTimerDisplay.h" +#define MARGIN_BUTTON 12.0f +#define DEFAULT_WINDOW_WIDTH 240 #define MIN_HEIGHT 35.0f @implementation SCLButton @@ -18,7 +20,17 @@ - (instancetype)init self = [super init]; if (self) { - [self setup]; + [self setupWithWindowWidth:DEFAULT_WINDOW_WIDTH]; + } + return self; +} + +- (instancetype)initWithWindowWidth:(CGFloat)windowWidth +{ + self = [super init]; + if (self) + { + [self setupWithWindowWidth:windowWidth]; } return self; } @@ -28,7 +40,7 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder self = [super initWithCoder:aDecoder]; if(self) { - [self setup]; + [self setupWithWindowWidth:DEFAULT_WINDOW_WIDTH]; } return self; } @@ -38,14 +50,14 @@ - (instancetype)initWithFrame:(CGRect)frame self = [super initWithFrame:frame]; if (self) { - [self setup]; + [self setupWithWindowWidth:DEFAULT_WINDOW_WIDTH]; } return self; } -- (void)setup +- (void)setupWithWindowWidth:(CGFloat)windowWidth { - self.frame = CGRectMake(0.0f, 0.0f, 216.0f, MIN_HEIGHT); + self.frame = CGRectMake(0.0f, 0.0f, windowWidth - (MARGIN_BUTTON * 2), MIN_HEIGHT); self.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; self.titleLabel.textAlignment = NSTextAlignmentCenter; } @@ -54,10 +66,13 @@ - (void)setTitle:(NSString *)title forState:(UIControlState)state { [super setTitle:title forState:state]; self.titleLabel.numberOfLines = 0; + // Update title frame. [self.titleLabel sizeToFit]; + // Get height needed to display title label completely CGFloat buttonHeight = MAX(self.titleLabel.frame.size.height, MIN_HEIGHT); + // Update button frame self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, buttonHeight); } From 12739a7d5f83c710b1f9f00fdda868b5918642f2 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 10 Jun 2015 20:09:46 -0300 Subject: [PATCH 041/250] Remove deprecated method --- SCLAlertView/SCLAlertView.h | 7 ------- SCLAlertView/SCLAlertView.m | 18 ------------------ 2 files changed, 25 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index d2ade25..d9bd5ff 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -246,13 +246,6 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ - (void)addTimerToButtonIndex:(NSInteger)buttonIndex reverse:(BOOL)reverse; -/** Set SubTitle Height - * - * @deprecated Deprecated since 0.5.2+ . - * @param value Height of scrollable subtitle text field. - */ -- (void)setSubTitleHeight:(CGFloat)value __deprecated; - /** Set Title font family and size * * @param titleFontFamily The family name used to displayed the title. diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 27cf841..848c066 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -156,10 +156,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth kTitleTop = 24.0f; kTitleHeight = 40.0f; self.subTitleY = 70.0f; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" self.subTitleHeight = 90.0f; -#pragma clang diagnostic pop self.circleIconHeight = 20.0f; self.windowWidth = windowWidth; self.windowHeight = 178.0f; @@ -824,18 +821,12 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima if (ht < _subTitleHeight) { self.windowHeight -= (_subTitleHeight - ht); -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" self.subTitleHeight = ht; -#pragma clang diagnostic pop } else { self.windowHeight += (ht - _subTitleHeight); -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" self.subTitleHeight = ht; -#pragma clang diagnostic pop } } else @@ -846,18 +837,12 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima if (ht < _subTitleHeight) { self.windowHeight -= (_subTitleHeight - ht); -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" self.subTitleHeight = ht; -#pragma clang diagnostic pop } else { self.windowHeight += (ht - _subTitleHeight); -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" self.subTitleHeight = ht; -#pragma clang diagnostic pop } } _viewText.frame = CGRectMake(12.0f, _subTitleY, _windowWidth - 24.0f, _subTitleHeight); @@ -865,10 +850,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima else { // Subtitle is nil, we can move the title to center and remove it from superView -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" self.subTitleHeight = 0.0f; -#pragma clang diagnostic pop self.windowHeight -= _viewText.frame.size.height; [_viewText removeFromSuperview]; From 36aa233c69d4b72210e9c78402584d4bdd9e3482 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 20 Oct 2015 14:01:06 -0200 Subject: [PATCH 042/250] Code formatting update doc --- SCLAlertView/SCLAlertView.h | 2 +- SCLAlertView/SCLAlertView.m | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index d9bd5ff..9407c7d 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -199,7 +199,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) /** Initialize SCLAlertView using a new window. * - * Init with new window + * Init with new window with custom width */ - (instancetype)initWithNewWindowWidth:(CGFloat)windowWidth; diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 848c066..4a42583 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -342,6 +342,7 @@ - (void)viewWillLayoutSubviews } #pragma mark - UIViewController + - (BOOL)prefersStatusBarHidden { return self.statusBarHidden; From a06c4aa5fed673685cecc126edcb834cd4c2ef92 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 20 Oct 2015 18:59:45 -0200 Subject: [PATCH 043/250] Bump version --- 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 ddabbf2..1059cb7 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.7.7" + spec.version = "0.7.9" 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" From 21418fc1f95898502b19f8d0def6695b45be5392 Mon Sep 17 00:00:00 2001 From: Abbas Mousavi Date: Wed, 11 Nov 2015 11:03:55 +0330 Subject: [PATCH 044/250] Getting screen size from app key window so that the alert will be centered in ipad split view mode --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 4a42583..131ada4 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1071,7 +1071,7 @@ - (void)alertIsDismissed:(DismissBlock)dismissBlock - (CGRect)mainScreenFrame { - return [self isAppExtension] ? _extensionBounds : [UIScreen mainScreen].bounds; + return [self isAppExtension] ? _extensionBounds : [UIApplication sharedApplication].keyWindow.bounds; } - (BOOL)isAppExtension From 2ac1437dd7b79313eb3f4ad1ff2630c3cdaaf626 Mon Sep 17 00:00:00 2001 From: AzulesM Date: Sun, 8 Nov 2015 19:03:04 +0800 Subject: [PATCH 045/250] To get the correct subtitle height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If viewText is more than 3 lines, it gets an incorrect subtitle height so that height of contentSize is higher than the frame’s. In this case, the viewText becoming scrollable. --- SCLAlertView/SCLAlertView.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 131ada4..08f29fb 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -807,15 +807,16 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima // Adjust text view size, if necessary CGSize sz = CGSizeMake(_windowWidth - 24.0f, CGFLOAT_MAX); NSDictionary *attr = @{NSFontAttributeName:self.viewText.font}; + NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading | NSStringDrawingUsesDeviceMetrics; if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) { CGRect r = CGRectNull; if(_attributedFormatBlock == nil) { NSString *str = subTitle; - r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attr context:nil]; + r = [str boundingRectWithSize:sz options:options attributes:attr context:nil]; } else { - r = [_viewText.attributedText boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading context:nil]; + r = [_viewText.attributedText boundingRectWithSize:sz options:options context:nil]; } CGFloat ht = ceilf(r.size.height); @@ -833,7 +834,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima else { NSAttributedString *str =[[NSAttributedString alloc] initWithString:subTitle attributes:attr]; - CGRect r = [str boundingRectWithSize:sz options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading context:nil]; + CGRect r = [str boundingRectWithSize:sz options:options context:nil]; CGFloat ht = ceilf(r.size.height) + 10.0f; if (ht < _subTitleHeight) { From d8e3d10a74942d20c4f70fcfa4aa7aecc842fca1 Mon Sep 17 00:00:00 2001 From: AzulesM Date: Tue, 24 Nov 2015 02:14:49 +0800 Subject: [PATCH 046/250] Prevent viewText scrollable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When showEdit with a navigation controller and having an empty string title, the viewText’s insets were automatically adjusted so it becoming scrollable. --- SCLAlertView/SCLAlertView.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 08f29fb..4f161f3 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -230,6 +230,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth { _viewText.textContainerInset = UIEdgeInsetsZero; _viewText.textContainer.lineFragmentPadding = 0; + self.automaticallyAdjustsScrollViewInsets = NO; } // Colors From 52842db2c5ab8d733e24baaa01c4edc46b49438a Mon Sep 17 00:00:00 2001 From: jusefjames Date: Sat, 26 Dec 2015 18:48:07 +0100 Subject: [PATCH 047/250] Add new Style: Question --- SCLAlertView/SCLAlertView.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 9407c7d..2135ff2 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -32,6 +32,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewStyle) Info, Edit, Waiting, + Question, Custom }; @@ -392,5 +393,15 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) - (void)showWaiting:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - (void)showWaiting:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +/** Show Question SCLAlertView + * + * @param vc The view controller the alert view will be displayed in. + * @param title The text displayed on the button. + * @param subTitle The subtitle text of the alert view. + * @param closeButtonTitle The text for the close button. + * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. + */ +- (void)showQuestion:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showQuestion:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; @end From 2cdad1cfe12fc236820e6f67d853ba0cfe713b96 Mon Sep 17 00:00:00 2001 From: jusefjames Date: Sat, 26 Dec 2015 18:48:59 +0100 Subject: [PATCH 048/250] Add new Style: Question --- SCLAlertView/SCLAlertView.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 4f161f3..f4476d6 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -764,6 +764,11 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima viewColor = UIColorFromHEX(0x6c125d); break; + case Question: + viewColor = UIColorFromHEX(0x727375); + iconImage = SCLAlertViewStyleKit.imageOfQuestion; + break; + case Custom: viewColor = color; iconImage = image; @@ -1005,6 +1010,12 @@ - (void)showWaiting:(UIViewController *)vc title:(NSString *)title subTitle:(NSS [self showTitle:vc image:nil color:nil title:title subTitle:subTitle duration:duration completeText:closeButtonTitle style:Waiting]; } +- (void)showQuestion:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration +{ + [self showTitle:vc image:nil color:nil title:title subTitle:subTitle duration:duration completeText:closeButtonTitle style:Question]; +} + + #pragma mark - Show using new window - (void)showSuccess:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration @@ -1053,6 +1064,11 @@ - (void)showWaiting:(NSString *)title subTitle:(NSString *)subTitle closeButtonT [self showTitle:nil image:nil color:nil title:title subTitle:subTitle duration:duration completeText:closeButtonTitle style:Waiting]; } +- (void)showQuestion:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration +{ + [self showTitle:nil image:nil color:nil title:title subTitle:subTitle duration:duration completeText:closeButtonTitle style:Question]; +} + #pragma mark - Visibility - (void)removeTopCircle From 825b5fab42fda89db3b0df941b3f23e97b68e6d1 Mon Sep 17 00:00:00 2001 From: jusefjames Date: Sat, 26 Dec 2015 18:49:30 +0100 Subject: [PATCH 049/250] Add new Style: Question --- SCLAlertView/SCLAlertViewStyleKit.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SCLAlertView/SCLAlertViewStyleKit.h b/SCLAlertView/SCLAlertViewStyleKit.h index 8c0209e..ccdcaf7 100644 --- a/SCLAlertView/SCLAlertViewStyleKit.h +++ b/SCLAlertView/SCLAlertViewStyleKit.h @@ -54,6 +54,12 @@ */ + (UIImage*)imageOfEdit; +/** TODO + * + * TODO + */ ++ (UIImage*)imageOfQuestion; + /** TODO * * TODO @@ -90,4 +96,10 @@ */ + (void)drawEdit; +/** TODO + * + * TODO + */ ++ (void)drawQuestion; + @end From f75916f427bfe96467c7c367e5b31d65813d40d7 Mon Sep 17 00:00:00 2001 From: jusefjames Date: Sat, 26 Dec 2015 18:49:56 +0100 Subject: [PATCH 050/250] Add new Style: Question --- SCLAlertView/SCLAlertViewStyleKit.m | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/SCLAlertView/SCLAlertViewStyleKit.m b/SCLAlertView/SCLAlertViewStyleKit.m index 3e2e480..97a04a8 100644 --- a/SCLAlertView/SCLAlertViewStyleKit.m +++ b/SCLAlertView/SCLAlertViewStyleKit.m @@ -22,6 +22,7 @@ @implementation SCLAlertViewStyleKit static UIImage *imageOfWarning = nil; static UIImage *imageOfInfo = nil; static UIImage *imageOfEdit = nil; +static UIImage *imageOfQuestion = nil; #pragma mark - Initialization @@ -235,6 +236,39 @@ + (void)drawEdit [editPathPath fill]; } ++ (void)drawQuestion +{ + // Color Declarations + UIColor *color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; + + // Questionmark Shape Drawing + UIBezierPath *questionShapePath = [[UIBezierPath alloc] init]; + [questionShapePath moveToPoint: CGPointMake(33.75, 54.1)]; + [questionShapePath addLineToPoint: CGPointMake(44.15, 54.1)]; + [questionShapePath addLineToPoint: CGPointMake(44.15, 47.5)]; + [questionShapePath addCurveToPoint: CGPointMake(51.85, 37.2) controlPoint1: CGPointMake(44.15, 42.9) controlPoint2: CGPointMake(46.75, 41.2)]; + [questionShapePath addCurveToPoint: CGPointMake(61.95, 19.9) controlPoint1: CGPointMake(59.05, 31.6) controlPoint2: CGPointMake(61.95, 28.5)]; + [questionShapePath addCurveToPoint: CGPointMake(41.45, 2.8) controlPoint1: CGPointMake(61.95, 7.6) controlPoint2: CGPointMake(52.85, 2.8)]; + [questionShapePath addCurveToPoint: CGPointMake(25.05, 5.8) controlPoint1: CGPointMake(34.75, 2.8) controlPoint2: CGPointMake(29.65, 3.8)]; + [questionShapePath addLineToPoint: CGPointMake(25.05, 14.4)]; + [questionShapePath addCurveToPoint: CGPointMake(38.15, 12.3) controlPoint1: CGPointMake(29.15, 13.2) controlPoint2: CGPointMake(32.35, 12.3)]; + [questionShapePath addCurveToPoint: CGPointMake(49.65, 20.8) controlPoint1: CGPointMake(45.65, 12.3) controlPoint2: CGPointMake(49.65, 14.4)]; + [questionShapePath addCurveToPoint: CGPointMake(43.65, 31.7) controlPoint1: CGPointMake(49.65, 26) controlPoint2: CGPointMake(47.95, 28.4)]; + [questionShapePath addCurveToPoint: CGPointMake(33.75, 46.6) controlPoint1: CGPointMake(37.15, 36.9) controlPoint2: CGPointMake(33.75, 39.7)]; + [questionShapePath addLineToPoint: CGPointMake(33.75, 54.1)]; + [questionShapePath closePath]; + + [questionShapePath moveToPoint: CGPointMake(33.15, 75.4)]; + [questionShapePath addLineToPoint: CGPointMake(45.35, 75.4)]; + [questionShapePath addLineToPoint: CGPointMake(45.35, 63.7)]; + [questionShapePath addLineToPoint: CGPointMake(33.15, 63.7)]; + [questionShapePath addLineToPoint: CGPointMake(33.15, 75.4)]; + [questionShapePath closePath]; + + [color setFill]; + [questionShapePath fill]; +} + #pragma mark - Images + (UIImage*)imageOfCheckmark @@ -328,4 +362,19 @@ + (UIImage*)imageOfEdit return imageOfEdit; } ++ (UIImage*)imageOfQuestion +{ + if (imageOfQuestion != nil) + { + return imageOfQuestion; + } + + UIGraphicsBeginImageContextWithOptions(CGSizeMake(80, 80), NO, 0); + [SCLAlertViewStyleKit drawQuestion]; + imageOfQuestion = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + return imageOfQuestion; +} + @end From c65aee961c3632a6258a2ca72add70ba9ab471ae Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 27 Dec 2015 11:09:05 -0200 Subject: [PATCH 051/250] Add question alert to example storyboard --- .../Base.lproj/Storyboard.storyboard | 13 +++++++++++-- .../AppIcon.appiconset/Contents.json | 5 +++++ SCLAlertViewExample/ViewController.m | 7 +++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index 233babf..e2409a9 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -1,8 +1,8 @@ - + - + @@ -140,6 +140,13 @@ + @@ -152,8 +159,10 @@ + + diff --git a/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json b/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json index b4e7fd1..335b014 100644 --- a/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json @@ -113,6 +113,11 @@ "idiom" : "ipad", "filename" : "icon_152x152.png", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" } ], "info" : { diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 204eef1..27da727 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -255,6 +255,13 @@ - (IBAction)showTimer:(id)sender closeButtonTitle:@"Dismiss" duration:10.0f]; } +- (IBAction)showQuestion:(id)sender +{ + SCLAlertView *alert = [[SCLAlertView alloc] init]; + + [alert showQuestion:self title:@"Question?" subTitle:kSubtitle closeButtonTitle:@"Dismiss" duration:0.0f]; +} + - (void)firstButton { NSLog(@"First button tapped"); From b1f5b2db453e74576fa290294e41c069bc675cfc Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 27 Dec 2015 13:40:59 -0200 Subject: [PATCH 052/250] Add scrollview to example storyboard --- .../Base.lproj/Storyboard.storyboard | 319 +++++++++--------- 1 file changed, 164 insertions(+), 155 deletions(-) diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index e2409a9..4a70fc5 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -17,166 +17,175 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + From 6a9069f9d6d9ddc36584c8e63bf93fe9ab7be0b9 Mon Sep 17 00:00:00 2001 From: jusefjames Date: Mon, 28 Dec 2015 11:18:44 +0100 Subject: [PATCH 053/250] Fix for #164 no Subtitle with iOS8 Avoid using "boundingRectWithSize:" --- SCLAlertView/SCLAlertView.m | 43 +++++++------------------------------ 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index f4476d6..83df2b7 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -812,46 +812,19 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima // Adjust text view size, if necessary CGSize sz = CGSizeMake(_windowWidth - 24.0f, CGFLOAT_MAX); - NSDictionary *attr = @{NSFontAttributeName:self.viewText.font}; - NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading | NSStringDrawingUsesDeviceMetrics; - if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) + CGSize size = [_viewText sizeThatFits:sz]; + + CGFloat ht = ceilf(size.height); + if (ht < _subTitleHeight) { - CGRect r = CGRectNull; - if(_attributedFormatBlock == nil) { - NSString *str = subTitle; - r = [str boundingRectWithSize:sz options:options attributes:attr context:nil]; - } else { - r = [_viewText.attributedText boundingRectWithSize:sz options:options context:nil]; - } - - CGFloat ht = ceilf(r.size.height); - if (ht < _subTitleHeight) - { - self.windowHeight -= (_subTitleHeight - ht); - self.subTitleHeight = ht; - } - else - { - self.windowHeight += (ht - _subTitleHeight); - self.subTitleHeight = ht; - } + self.windowHeight -= (_subTitleHeight - ht); + self.subTitleHeight = ht; } else { - NSAttributedString *str =[[NSAttributedString alloc] initWithString:subTitle attributes:attr]; - CGRect r = [str boundingRectWithSize:sz options:options context:nil]; - CGFloat ht = ceilf(r.size.height) + 10.0f; - if (ht < _subTitleHeight) - { - self.windowHeight -= (_subTitleHeight - ht); - self.subTitleHeight = ht; - } - else - { - self.windowHeight += (ht - _subTitleHeight); - self.subTitleHeight = ht; - } + self.windowHeight += (ht - _subTitleHeight); + self.subTitleHeight = ht; } _viewText.frame = CGRectMake(12.0f, _subTitleY, _windowWidth - 24.0f, _subTitleHeight); } From fd03308f95e561390eef341755bb18bace33c2c6 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 29 Dec 2015 14:21:15 -0200 Subject: [PATCH 054/250] bump version --- 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 1059cb7..8442345 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.7.9" + spec.version = "0.8.0" 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" From d36f44ab3aff35d069866a214f13e243598eaef0 Mon Sep 17 00:00:00 2001 From: Liqiankun Date: Fri, 8 Jan 2016 10:00:25 +0800 Subject: [PATCH 055/250] Change play sound class --- SCLAlertView/SCLAlertView.m | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 83df2b7..0ec5fe6 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -55,6 +55,8 @@ @interface SCLAlertView () @property (nonatomic) CGFloat windowWidth; @property (nonatomic) CGFloat subTitleHeight; @property (nonatomic) CGFloat subTitleY; +/** soundID */ +@property(nonatomic,assign) SystemSoundID soundID; @end @@ -468,7 +470,20 @@ - (void)setSoundURL:(NSURL *)soundURL { NSError *error; _soundURL = soundURL; - _audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:_soundURL error:&error]; + //_audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:_soundURL error:&error]; + + //DisposeSound + AudioServicesDisposeSystemSoundID(_soundID); + + AudioServicesCreateSystemSoundID((__bridge CFURLRef)_soundURL,&_soundID); + + AudioServicesPlaySystemSoundWithCompletion(_soundID, ^{ + //call When Sound play to the end + + }); + + //PlaySound + AudioServicesPlaySystemSound(_soundID); } #pragma mark - Subtitle Height From 1442dc982747fdd95ed6da6f172f60d413031297 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 11 Jan 2016 00:14:09 -0200 Subject: [PATCH 056/250] Code formatting Try to fix issue #142 --- SCLAlertView/SCLAlertView.m | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 83df2b7..ec87920 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1192,7 +1192,7 @@ - (void)hideView break; } - if(_activityIndicatorView) + if (_activityIndicatorView) { [_activityIndicatorView stopAnimating]; } @@ -1202,12 +1202,19 @@ - (void)hideView self.dismissBlock(); } - if(_usingNewWindow) + if (_usingNewWindow) { // Restore previous window [self.previousWindow makeKeyAndVisible]; self.previousWindow = nil; } + + for (SCLButton *btn in _buttons) + { + btn.actionBlock = nil; + btn.target = nil; + btn.selector = nil; + } } #pragma mark - Hide Animations @@ -1219,7 +1226,7 @@ - (void)fadeOut self.view.alpha = 0.0f; } completion:^(BOOL completed) { [self.backgroundView removeFromSuperview]; - if(_usingNewWindow) + if (_usingNewWindow) { // Remove current window [self.SCLAlertWindow setHidden:YES]; From 60fd9a0a6ca37f7142f7510b7f3b74614610a073 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 11 Jan 2016 00:18:20 -0200 Subject: [PATCH 057/250] RootViewController could be weak to SCLAlertView be correctly de-initialized --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index ec87920..5d95ada 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -38,10 +38,10 @@ @interface SCLAlertView () @property (nonatomic, strong) NSString *titleFontFamily; @property (nonatomic, strong) NSString *bodyTextFontFamily; @property (nonatomic, strong) NSString *buttonsFontFamily; -@property (nonatomic, strong) UIViewController *rootViewController; @property (nonatomic, strong) UIWindow *previousWindow; @property (nonatomic, strong) UIWindow *SCLAlertWindow; @property (nonatomic, copy) DismissBlock dismissBlock; +@property (nonatomic, weak) UIViewController *rootViewController; @property (nonatomic, weak) id restoreInteractivePopGestureDelegate; @property (nonatomic) BOOL canAddObservers; @property (nonatomic) BOOL keyboardIsVisible; From a0e700746ab1ce29997202c4ce521d861589fcdb Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 20 Jan 2016 23:55:16 -0200 Subject: [PATCH 058/250] Bump version --- 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 8442345..577f64c 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.8.0" + spec.version = "0.8.1" 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" From 199781d1ff9a29ba69e9634af6f8072c38ceed98 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 22 Jan 2016 14:58:46 -0200 Subject: [PATCH 059/250] Fix button actionBlocks not working #175 --- SCLAlertView/SCLAlertView.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 5d95ada..4189053 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -660,10 +660,6 @@ - (void)buttonTapped:(SCLButton *)btn if (btn.validationBlock && !btn.validationBlock()) { return; } - if([self isVisible]) - { - [self hideView]; - } if (btn.actionType == SCLBlock) { @@ -679,6 +675,11 @@ - (void)buttonTapped:(SCLButton *)btn { NSLog(@"Unknown action type for button"); } + + if([self isVisible]) + { + [self hideView]; + } } #pragma mark - Button Timer From a716a0287c22e490cfca5bd94ca87cd8bea098ff Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 22 Jan 2016 14:59:28 -0200 Subject: [PATCH 060/250] Bump version --- 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 577f64c..4bcdfe8 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.8.1" + spec.version = "0.8.2" 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" From 6e8c04468e6a0c2b3d7067abd6bde725c93ca8d6 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 26 Jan 2016 09:23:52 -0200 Subject: [PATCH 061/250] Update copyright year Rename DismissBlock --- SCLAlertView/SCLAlertView.h | 6 +++--- SCLAlertView/SCLAlertView.m | 10 +++++----- SCLAlertView/SCLAlertViewResponder.h | 2 +- SCLAlertView/SCLAlertViewResponder.m | 2 +- SCLAlertView/SCLAlertViewStyleKit.h | 2 +- SCLAlertView/SCLAlertViewStyleKit.m | 2 +- SCLAlertView/SCLButton.h | 2 +- SCLAlertView/SCLButton.m | 2 +- SCLAlertViewExample/AppDelegate.h | 2 +- SCLAlertViewExample/AppDelegate.m | 2 +- SCLAlertViewExample/ViewController.h | 2 +- SCLAlertViewExample/ViewController.m | 2 +- SCLAlertViewExample/main.m | 2 +- SCLAlertViewTests/SCLAlertViewTests.m | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 2135ff2..333886f 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) @@ -15,7 +15,7 @@ #import "SCLTextView.h" typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); -typedef void (^DismissBlock)(void); +typedef void (^SCLDismissBlock)(void); @interface SCLAlertView : UIViewController @@ -208,7 +208,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) * * Warns that alerts is gone using block */ -- (void)alertIsDismissed:(DismissBlock)dismissBlock; +- (void)alertIsDismissed:(SCLDismissBlock)dismissBlock; /** Hide SCLAlertView * diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 4189053..77d30ca 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import "SCLAlertView.h" @@ -40,7 +40,7 @@ @interface SCLAlertView () @property (nonatomic, strong) NSString *buttonsFontFamily; @property (nonatomic, strong) UIWindow *previousWindow; @property (nonatomic, strong) UIWindow *SCLAlertWindow; -@property (nonatomic, copy) DismissBlock dismissBlock; +@property (nonatomic, copy) SCLDismissBlock dismissBlock; @property (nonatomic, weak) UIViewController *rootViewController; @property (nonatomic, weak) id restoreInteractivePopGestureDelegate; @property (nonatomic) BOOL canAddObservers; @@ -906,8 +906,8 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima { [durationTimer invalidate]; - if (buttonTimer && _buttons.count > 0) { - + if (buttonTimer && _buttons.count > 0) + { SCLButton *btn = _buttons[buttonTimer.buttonIndex]; btn.timer = buttonTimer; [buttonTimer startTimerWithTimeLimit:duration completed:^{ @@ -1056,7 +1056,7 @@ - (BOOL)isVisible return (self.view.alpha); } -- (void)alertIsDismissed:(DismissBlock)dismissBlock +- (void)alertIsDismissed:(SCLDismissBlock)dismissBlock { self.dismissBlock = dismissBlock; } diff --git a/SCLAlertView/SCLAlertViewResponder.h b/SCLAlertView/SCLAlertViewResponder.h index eecaddf..a705de6 100644 --- a/SCLAlertView/SCLAlertViewResponder.h +++ b/SCLAlertView/SCLAlertViewResponder.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLAlertViewResponder.m b/SCLAlertView/SCLAlertViewResponder.m index c55dcc7..d7a28a3 100644 --- a/SCLAlertView/SCLAlertViewResponder.m +++ b/SCLAlertView/SCLAlertViewResponder.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import "SCLAlertViewResponder.h" diff --git a/SCLAlertView/SCLAlertViewStyleKit.h b/SCLAlertView/SCLAlertViewStyleKit.h index ccdcaf7..5fbb243 100644 --- a/SCLAlertView/SCLAlertViewStyleKit.h +++ b/SCLAlertView/SCLAlertViewStyleKit.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLAlertViewStyleKit.m b/SCLAlertView/SCLAlertViewStyleKit.m index 97a04a8..7fc0973 100644 --- a/SCLAlertView/SCLAlertViewStyleKit.m +++ b/SCLAlertView/SCLAlertViewStyleKit.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import "SCLAlertViewStyleKit.h" diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index 1d4b496..8a46e46 100644 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index db84b75..f150983 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import "SCLButton.h" diff --git a/SCLAlertViewExample/AppDelegate.h b/SCLAlertViewExample/AppDelegate.h index 5052672..0bc8c8d 100644 --- a/SCLAlertViewExample/AppDelegate.h +++ b/SCLAlertViewExample/AppDelegate.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import diff --git a/SCLAlertViewExample/AppDelegate.m b/SCLAlertViewExample/AppDelegate.m index 2c186f0..985186b 100644 --- a/SCLAlertViewExample/AppDelegate.m +++ b/SCLAlertViewExample/AppDelegate.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import "AppDelegate.h" diff --git a/SCLAlertViewExample/ViewController.h b/SCLAlertViewExample/ViewController.h index 53a20f1..81de180 100644 --- a/SCLAlertViewExample/ViewController.h +++ b/SCLAlertViewExample/ViewController.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 27da727..a9f734f 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import "ViewController.h" diff --git a/SCLAlertViewExample/main.m b/SCLAlertViewExample/main.m index 569b31f..b817fa0 100644 --- a/SCLAlertViewExample/main.m +++ b/SCLAlertViewExample/main.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import diff --git a/SCLAlertViewTests/SCLAlertViewTests.m b/SCLAlertViewTests/SCLAlertViewTests.m index a522c5b..8b06453 100644 --- a/SCLAlertViewTests/SCLAlertViewTests.m +++ b/SCLAlertViewTests/SCLAlertViewTests.m @@ -3,7 +3,7 @@ // SCLAlertViewTests // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. // #import From 9df5bd08f87728517c68a8335dcbed5c5e322305 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 26 Jan 2016 09:28:03 -0200 Subject: [PATCH 062/250] Add property to force hide SCLAlertView Fix Show alert while running a block #176 --- SCLAlertView/SCLAlertView.h | 7 +++++++ SCLAlertView/SCLAlertView.m | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 333886f..06fbc89 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -16,6 +16,7 @@ typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); typedef void (^SCLDismissBlock)(void); +typedef void (^SCLForceHideBlock)(void); @interface SCLAlertView : UIViewController @@ -128,6 +129,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ @property (nonatomic, copy) ButtonFormatBlock buttonFormatBlock; +/** Set force hide block. + * + * When set force hideview method invocation. + */ +@property (nonatomic, copy) SCLForceHideBlock forceHideBlock; + /** Hide animation type * * Holds the hide animation type. diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 77d30ca..ad4662a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1061,6 +1061,17 @@ - (void)alertIsDismissed:(SCLDismissBlock)dismissBlock self.dismissBlock = dismissBlock; } +- (SCLForceHideBlock)forceHideBlock:(SCLForceHideBlock)forceHideBlock +{ + _forceHideBlock = forceHideBlock; + + if (_forceHideBlock) + { + [self hideView]; + } + return _forceHideBlock; +} + - (CGRect)mainScreenFrame { return [self isAppExtension] ? _extensionBounds : [UIApplication sharedApplication].keyWindow.bounds; From 6a8cbc9142205f99f70daac8f17d71857af7901c Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 26 Jan 2016 16:17:52 -0200 Subject: [PATCH 063/250] Update Readme Add missing screenshot --- README.md | 5 +++++ ScreenShots/ScreenShot7.png | Bin 0 -> 36827 bytes 2 files changed, 5 insertions(+) create mode 100644 ScreenShots/ScreenShot7.png diff --git a/README.md b/README.md index 234035f..3740fcc 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Animated Alert View written in Swift but ported to Objective-C, which can be use ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot4.png) ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot5.png)_ ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot6.png) +![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot7.png) ###Easy to use ```Objective-C @@ -29,6 +30,8 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert showEdit:self title:@"Hello Edit" subTitle:@"This is a more descriptive info text with a edit textbox" closeButtonTitle:@"Done" duration:0.0f]; // Edit [alert showCustom:self image:[UIImage imageNamed:@"git"] color:color title:@"Custom" subTitle:@"Add a custom icon and color for your own type of alert!" closeButtonTitle:@"OK" duration:0.0f]; // Custom [alert showWaiting:self title:@"Waiting..." subTitle:@"Blah de blah de blah, blah. Blah de blah de" closeButtonTitle:nil duration:5.0f]; +[alert showQuestion:self title:@"Question?" subTitle:kSubtitle closeButtonTitle:@"Dismiss" duration:0.0f]; + // Using custom alert width SCLAlertView *alert = [[SCLAlertView alloc] initWithWindowWidth:300.0f]; @@ -49,6 +52,7 @@ SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; [alert showEdit:@"Hello Edit" subTitle:@"This is a more descriptive info text with a edit textbox" closeButtonTitle:@"Done" duration:0.0f]; // Edit [alert showCustom:[UIImage imageNamed:@"git"] color:color title:@"Custom" subTitle:@"Add a custom icon and color for your own type of alert!" closeButtonTitle:@"OK" duration:0.0f]; // Custom [alert showWaiting:@"Waiting..." subTitle:@"Blah de blah de blah, blah. Blah de blah de" closeButtonTitle:nil duration:5.0f]; +[alert showQuestion:@"Question?" subTitle:kSubtitle closeButtonTitle:@"Dismiss" duration:0.0f]; // Using custom alert width SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindowWidth:300.0f]; @@ -189,6 +193,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewStyle) Info, Edit, Waiting, + Question, Custom }; ``` diff --git a/ScreenShots/ScreenShot7.png b/ScreenShots/ScreenShot7.png new file mode 100644 index 0000000000000000000000000000000000000000..db84136ecfd6103d0e3fc5d0451e005b6f76cc7b GIT binary patch literal 36827 zcmcHgbx<5#81RWU13`il+%>qnySqbhhXBD{f=h6B4^Hqva19V#gS&fhhuiP>)!nal z_txFrKenr;W_qNj&pD4jzZ0pVB#rzY|2+Tz$g(mLY5)Kw0zNk2A>ccDXA~d6Cj>_s zT^9gA1YaY5fC4hJaRK1HvW>X7ii)*^tAmTRgCnV|xHze!vxB9Lodp1RF6F3OX{aA! z3*N0=i^)d>B+EOfVZoECiA4oqCVZqLLqL;@AS+nJQtd&Pl!PG|%8!7KjSYy#Qe{B; z_I?3whpaF*xG3V=@YAMGk?r61yS=g3pYuZdRaZF;6L8(|NU1XHs+<8x8^MG9 z1DiWcB7yHI9RW1>26Hl(7YZog-d{j~p1d2b6M*uZL4*go6|=fo2*ck{kHj+cp#nmn zx?K}^cw*$rFwjvE4B&6i1DZk_Kn=sbo+I8qS6suxJ_68 zsaFQ(2K)ei*Z}+2LaH+uYeU3*x4S6IdQ_30K>p#9_Lbv*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[PATCH 064/250] Code cleanup Code formatting --- SCLAlertView/SCLAlertView.m | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 1162fa7..5972186 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -33,7 +33,6 @@ @interface SCLAlertView () @property (nonatomic, strong) UIView *circleViewBackground; @property (nonatomic, strong) UIView *contentView; @property (nonatomic, strong) UIImageView *backgroundView; -@property (nonatomic, strong) AVAudioPlayer *audioPlayer; @property (nonatomic, strong) UITapGestureRecognizer *gestureRecognizer; @property (nonatomic, strong) NSString *titleFontFamily; @property (nonatomic, strong) NSString *bodyTextFontFamily; @@ -41,6 +40,7 @@ @interface SCLAlertView () @property (nonatomic, strong) UIWindow *previousWindow; @property (nonatomic, strong) UIWindow *SCLAlertWindow; @property (nonatomic, copy) SCLDismissBlock dismissBlock; +@property (nonatomic, assign) SystemSoundID soundID; @property (nonatomic, weak) UIViewController *rootViewController; @property (nonatomic, weak) id restoreInteractivePopGestureDelegate; @property (nonatomic) BOOL canAddObservers; @@ -55,8 +55,6 @@ @interface SCLAlertView () @property (nonatomic) CGFloat windowWidth; @property (nonatomic) CGFloat subTitleHeight; @property (nonatomic) CGFloat subTitleY; -/** soundID */ -@property(nonatomic,assign) SystemSoundID soundID; @end @@ -468,18 +466,15 @@ - (void)setBackgroundViewColor:(UIColor *)backgroundViewColor - (void)setSoundURL:(NSURL *)soundURL { - NSError *error; _soundURL = soundURL; - //_audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:_soundURL error:&error]; //DisposeSound AudioServicesDisposeSystemSoundID(_soundID); - AudioServicesCreateSystemSoundID((__bridge CFURLRef)_soundURL,&_soundID); + AudioServicesCreateSystemSoundID((__bridge CFURLRef)_soundURL, &_soundID); AudioServicesPlaySystemSoundWithCompletion(_soundID, ^{ //call When Sound play to the end - }); //PlaySound @@ -854,20 +849,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima // Move up _labelTitle.frame = CGRectMake(12.0f, 37.0f, _windowWidth - 24.0f, kTitleHeight); } - - // Play sound, if necessary - if(_soundURL != nil) - { - if (_audioPlayer == nil) - { - NSLog(@"You need to set your sound file first"); - } - else - { - [_audioPlayer play]; - } - } - + // Add button, if necessary if(completeText != nil) { From 3367dc0fca2a77d4635f194f28bcaff91ddfaac4 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 27 Jan 2016 15:25:51 -0200 Subject: [PATCH 065/250] Add new icon --- .../AppIcon.appiconset/Contents.json | 3 ++- .../AppIcon.appiconset/icon_167x167.png | Bin 0 -> 10550 bytes 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/icon_167x167.png diff --git a/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json b/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json index 335b014..67d4569 100644 --- a/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/Contents.json @@ -115,8 +115,9 @@ "scale" : "2x" }, { - "idiom" : "ipad", "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "icon_167x167.png", "scale" : "2x" } ], diff --git a/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/icon_167x167.png b/SCLAlertViewExample/Images.xcassets/AppIcon.appiconset/icon_167x167.png new file mode 100644 index 0000000000000000000000000000000000000000..ff6599fb2f7091c206382c805f34f9b87fd75ce8 GIT binary patch literal 10550 zcmZA6V{l%i;F8Oe{*zmbp7V&L?$CHPUhs|XlZR{0RUcWxoV!;Dfc)+pnD5cO|g~B#&o-2 zfP%6HZVXMQ2<6tajQog1}VK-Xp^8WW`(tD*npoOGkS z#oy=R?Cg2@x$7wB=w;e_1~mvBgC_Z~$Ohn54Hw{BAx%`09{SxK1c@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za@$o}O`xJQGW6tAo)T0+h2ajXAEd;4q3#>PF^>c%?9~S}_drnqwyM8E9%8&am>$RX z3uv$u>*AMlVePH@8BzZ?YyxsvXx^3g$|=+Z?o4Fh|GxHdj+lqjN_m6m6xE$Pv0XLf zHQAEwuej4VY0Pg{ymex+2S)#7Q$t~|=V z&ur0=?JQtd;ab30qKF^Lk^Z96uN@{cZx_lEGW+c*$mfhMOg9SB;{j#ZD<=7^W98O4icGsTN%_aL5xin(Dc z=-HeA{TcNg5)lLR*(lb2D!DgY@QJ-npF!Dk^gcrPkD;HG&cbLtx^A2$isvu!yi}0J ogGW_hmnat!M Date: Wed, 27 Jan 2016 17:51:40 -0200 Subject: [PATCH 066/250] Implement SCLSwitchView Add switch alert example to demo app Update doc --- README.md | 15 ++- SCLAlertView.xcodeproj/project.pbxproj | 8 +- SCLAlertView/SCLAlertView.h | 7 + SCLAlertView/SCLAlertView.m | 21 +++ SCLAlertView/SCLSwitchView.h | 23 ++++ SCLAlertView/SCLSwitchView.m | 126 ++++++++++++++++++ .../Base.lproj/Storyboard.storyboard | 57 ++++---- .../Images.xcassets/Contents.json | 6 + .../switch.imageset/Contents.json | 21 +++ .../switch.imageset/switch.png | Bin 0 -> 3173 bytes SCLAlertViewExample/ViewController.m | 13 ++ 11 files changed, 271 insertions(+), 26 deletions(-) create mode 100644 SCLAlertView/SCLSwitchView.h create mode 100644 SCLAlertView/SCLSwitchView.m create mode 100644 SCLAlertViewExample/Images.xcassets/Contents.json create mode 100644 SCLAlertViewExample/Images.xcassets/switch.imageset/Contents.json create mode 100644 SCLAlertViewExample/Images.xcassets/switch.imageset/switch.png diff --git a/README.md b/README.md index 3740fcc..478c90d 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ alert.attributedFormatBlock = ^NSAttributedString* (NSString *value) [alert showSuccess:self title:@"Button View" subTitle:@"Attributed string operation successfully completed." closeButtonTitle:@"Done" duration:0.0f]; ``` + ###Add a text field ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -142,7 +143,19 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert showWaiting:self title:@"Waiting..." subTitle:@"Blah de blah de blah, blah. Blah de blah de" closeButtonTitle:nil duration:5.0f]; ``` - +###Add a switch button +```Objective-C +SCLAlertView *alert = [[SCLAlertView alloc] init]; + +SCLSwitchView *switchView = [alert addSwitchViewWithLabel:@"Don't show again".uppercaseString]; +switchView.tintColor = [UIColor brownColor]; + +[alert addButton:@"Done" actionBlock:^(void) { + NSLog(@"Show again? %@", switchView.isSelected ? @"-No": @"-Yes"); +}]; + +[alert showCustom:self image:[UIImage imageNamed:@"switch"] color:[UIColor brownColor] title:kInfoTitle subTitle:kSubtitle closeButtonTitle:nil duration:0.0f]; +``` ###SCLAlertView properties ```Objective-C diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index ba35bdf..b4c31ac 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -8,7 +8,8 @@ /* Begin PBXBuildFile section */ 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */; }; - DD24453C1BAC383600892117 /* SCLTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD24453B1BAC383600892117 /* SCLTextView.m */; settings = {ASSET_TAGS = (); }; }; + CF6FB1241C5926FC009715F3 /* SCLSwitchView.m in Sources */ = {isa = PBXBuildFile; fileRef = CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */; }; + DD24453C1BAC383600892117 /* SCLTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD24453B1BAC383600892117 /* SCLTextView.m */; }; DD2E172A19FA84B800CBAEC3 /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */; }; DD4BA9C119DED8EF008D73EB /* right_answer.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */; }; DD7282B919D6087C00077F54 /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD7282B719D6087C00077F54 /* Storyboard.storyboard */; }; @@ -36,6 +37,8 @@ /* Begin PBXFileReference section */ 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTimerDisplay.h; sourceTree = ""; }; 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTimerDisplay.m; sourceTree = ""; }; + CF6FB1221C5926FC009715F3 /* SCLSwitchView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLSwitchView.h; sourceTree = ""; }; + CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLSwitchView.m; sourceTree = ""; }; DD0D295B19D902DA00881F53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = SCLAlertViewExample/Info.plist; sourceTree = SOURCE_ROOT; }; DD24453A1BAC383600892117 /* SCLTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTextView.h; sourceTree = ""; }; DD24453B1BAC383600892117 /* SCLTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTextView.m; sourceTree = ""; }; @@ -172,6 +175,8 @@ 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */, DD24453A1BAC383600892117 /* SCLTextView.h */, DD24453B1BAC383600892117 /* SCLTextView.m */, + CF6FB1221C5926FC009715F3 /* SCLSwitchView.h */, + CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */, ); path = SCLAlertView; sourceTree = ""; @@ -279,6 +284,7 @@ DD2E172A19FA84B800CBAEC3 /* UIImage+ImageEffects.m in Sources */, DDB15FCB19D5B88A00173158 /* ViewController.m in Sources */, DDB15FD419D5B8DB00173158 /* main.m in Sources */, + CF6FB1241C5926FC009715F3 /* SCLSwitchView.m in Sources */, DDB15FE119D5D85B00173158 /* SCLAlertViewStyleKit.m in Sources */, DD24453C1BAC383600892117 /* SCLTextView.m in Sources */, 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */, diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 06fbc89..4909271 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -13,6 +13,7 @@ #endif #import "SCLButton.h" #import "SCLTextView.h" +#import "SCLSwitchView.h" typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); typedef void (^SCLDismissBlock)(void); @@ -247,6 +248,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ - (void)addCustomTextField:(UITextField *)textField; +/** Add a switch view + * + * @param label The label displayed for the switch. + */ +- (SCLSwitchView *)addSwitchViewWithLabel:(NSString *)label; + /** Add Timer Display * * @param buttonIndex The index of the button to add the timer display to. diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 5972186..75cdfc1 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -498,6 +498,27 @@ - (void)addActivityIndicatorView [_circleView addSubview:_activityIndicatorView]; } +#pragma mark - SwitchView + +- (SCLSwitchView *)addSwitchViewWithLabel:(NSString *)label +{ + // Add switch view + SCLSwitchView *switchView = [[SCLSwitchView alloc] initWithFrame:CGRectMake(0, 0, self.windowWidth, 31.0f)]; + + // Update view height + self.windowHeight += switchView.bounds.size.height + 10.0f; + + if (label != nil) + { + switchView.labelText = label; + } + + [_contentView addSubview:switchView]; + [_inputs addObject:switchView]; + + return switchView; +} + #pragma mark - TextField - (SCLTextView *)addTextField:(NSString *)title diff --git a/SCLAlertView/SCLSwitchView.h b/SCLAlertView/SCLSwitchView.h new file mode 100644 index 0000000..4ebd3dc --- /dev/null +++ b/SCLAlertView/SCLSwitchView.h @@ -0,0 +1,23 @@ +// +// SCLSwitchView.h +// SCLAlertView +// +// Created by André Felipe Santos on 27/01/16. +// Copyright © 2016 AnyKey Entertainment. All rights reserved. +// + +#if defined(__has_feature) && __has_feature(modules) +@import UIKit; +#else +#import +#endif + +@interface SCLSwitchView : UIView + +@property (strong, nonatomic) UIColor *tintColor; +@property (strong, nonatomic) UIColor *labelColor; +@property (strong, nonatomic) UIFont *labelFont; +@property (strong, nonatomic) NSString *labelText; +@property (nonatomic, getter=isSelected) BOOL selected; + +@end diff --git a/SCLAlertView/SCLSwitchView.m b/SCLAlertView/SCLSwitchView.m new file mode 100644 index 0000000..44c0fd5 --- /dev/null +++ b/SCLAlertView/SCLSwitchView.m @@ -0,0 +1,126 @@ +// +// SCLSwitchView.m +// SCLAlertView +// +// Created by André Felipe Santos on 27/01/16. +// Copyright © 2016 AnyKey Entertainment. All rights reserved. +// + +#import "SCLSwitchView.h" +#import "SCLMacros.h" + +@interface SCLSwitchView () + +@property (strong, nonatomic) UISwitch *switchKnob; +@property (strong, nonatomic) UILabel *switchLabel; + +@end + +#pragma mark + +@implementation SCLSwitchView + +#pragma mark - Constructors + +- (instancetype)init +{ + self = [super init]; + if (self) + { + [self setup]; + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder +{ + self = [super initWithCoder:aDecoder]; + if(self) + { + [self setup]; + } + return self; +} + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) + { + [self setup]; + } + return self; +} + +#pragma mark - Initialization + +- (void)setup +{ + // Add switch knob + self.switchKnob = [[UISwitch alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 0.0f, 0.f)]; + [self addSubview:self.switchKnob]; + + // Add switch label + CGFloat x, width, height; + x = self.switchKnob.frame.size.width + 8.0f; + width = self.frame.size.width - self.switchKnob.frame.size.width - 8.0f; + height = self.switchKnob.frame.size.height; + + self.switchLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, 0.0f, width, height)]; + + NSString *switchFontFamily = @"HelveticaNeue-Bold"; + CGFloat switchFontSize = 12.0f; + + self.switchLabel.numberOfLines = 1; + self.switchLabel.textAlignment = NSTextAlignmentLeft; + self.switchLabel.lineBreakMode = NSLineBreakByTruncatingTail; + self.switchLabel.adjustsFontSizeToFitWidth = YES; + self.switchLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters; + self.switchLabel.minimumScaleFactor = 0.5f; + self.switchLabel.font = [UIFont fontWithName:switchFontFamily size:switchFontSize]; + self.switchLabel.textColor = UIColorFromHEX(0x4D4D4D); + + [self addSubview:self.switchLabel]; +} + +#pragma mark - Getters + +- (UIColor *)tintColor { + return self.switchKnob.tintColor; +} + +- (UIColor *)labelColor { + return self.switchLabel.textColor; +} + +- (UIFont *)labelFont { + return self.switchLabel.font; +} + +- (NSString *)labelText { + return self.switchLabel.text; +} + +- (BOOL)isSelected { + return self.switchKnob.isOn; +} + +#pragma mark - Setters + +- (void)setTintColor:(UIColor *)tintColor { + self.switchKnob.onTintColor = tintColor; +} + +- (void)setLabelColor:(UIColor *)labelColor { + self.switchLabel.textColor = labelColor; +} + +- (void)setLabelFont:(UIFont *)labelFont { + self.switchLabel.font = labelFont; +} + +- (void)setLabelText:(NSString *)labelText { + self.switchLabel.text = labelText; +} + +@end diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index 4a70fc5..489b24d 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -33,7 +33,7 @@ + + diff --git a/SCLAlertViewExample/Images.xcassets/Contents.json b/SCLAlertViewExample/Images.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/SCLAlertViewExample/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/SCLAlertViewExample/Images.xcassets/switch.imageset/Contents.json b/SCLAlertViewExample/Images.xcassets/switch.imageset/Contents.json new file mode 100644 index 0000000..edb4d41 --- /dev/null +++ b/SCLAlertViewExample/Images.xcassets/switch.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "switch.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/SCLAlertViewExample/Images.xcassets/switch.imageset/switch.png b/SCLAlertViewExample/Images.xcassets/switch.imageset/switch.png new file mode 100644 index 0000000000000000000000000000000000000000..7db83abf00ad0054fd0774f088e9001ca727880c GIT binary patch literal 3173 zcmb`KjWg8y7so%}UF~|DB+0neD>uOp0-kti*$cxsAf?QNQE9+0}VCIC~b zNH(ay*zMP|ckRUbt00Pn9Et6jy!(z~t?v<|vDeNI`)Ud(_e}Dw7*_r2(MlR&xA5j2 z>i*sl*Z0$42H-sx54$_zKq*%TNxhsha?F4;a&V1+4d(GUZ9 z79s!5%Pf%?^38y%Mzf-+aMZ2e&fU3f5y!$Y?SU6l51%-OVGe%AA+r%@phsMbwx2P7 zF)QJ}VSm_j&vV^xg=5()OL!69_p7Zbwl)Di2)Dqq5vT*7&;4BurjP_+Y&ZF?`8RYL z;G?3W^rT5R^>{VOPLZX+GwpHT?}|KG;qJZCBo?+{P!NeG3eB@9R$D*z=HnAPSu#wM zE)@g;;ag~5ecUA>0LOu1ep(ECk={6VkeIu{9J#Wqlq_%)urpg&=^XJH=5elR7a}d& zGdUlQrP{Xh931;3$H6RuI4!;-duiu2SSep#hIF-~O-iE7c{Q;ksvEOnu;_|U9C{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@@nx_F z{$%9QyP7KD->a9}gt Date: Thu, 28 Jan 2016 15:12:38 -0200 Subject: [PATCH 067/250] Add tint top circle functionality --- SCLAlertView/SCLAlertView.h | 9 ++++++++- SCLAlertView/SCLAlertView.m | 20 ++++++++++++-------- SCLAlertViewExample/ViewController.m | 2 ++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 4909271..4a59de3 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -19,7 +19,7 @@ typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); typedef void (^SCLDismissBlock)(void); typedef void (^SCLForceHideBlock)(void); -@interface SCLAlertView : UIViewController +@interface SCLAlertView : UIViewController /** Alert Styles * @@ -79,6 +79,13 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) Transparent }; +/** Tint top circle + * + * A boolean value that determines whether to tint the SCLAlertView top circle. + * (Default: YES) + */ +@property BOOL tintTopCircle; + /** Title Label * * The text displayed as title. diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 75cdfc1..62ac6c0 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -86,6 +86,7 @@ - (instancetype)init self = [super init]; if (self) { + _tintTopCircle = YES; [self setupViewWindowWidth:DEFAULT_WINDOW_WIDTH]; } return self; @@ -96,6 +97,7 @@ - (instancetype)initWithWindowWidth:(CGFloat)windowWidth self = [super init]; if (self) { + _tintTopCircle = YES; [self setupViewWindowWidth:windowWidth]; } return self; @@ -106,6 +108,7 @@ - (instancetype)initWithNewWindow self = [self initWithWindowWidth:DEFAULT_WINDOW_WIDTH]; if(self) { + _tintTopCircle = YES; [self setupNewWindow]; } return self; @@ -116,6 +119,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)windowWidth self = [self initWithWindowWidth:windowWidth]; if(self) { + _tintTopCircle = YES; [self setupNewWindow]; } return self; @@ -346,12 +350,12 @@ - (void)viewWillLayoutSubviews - (BOOL)prefersStatusBarHidden { - return self.statusBarHidden; + return self.statusBarHidden; } - (UIStatusBarStyle)preferredStatusBarStyle { - return self.statusBarStyle; + return self.statusBarStyle; } #pragma mark - Handle gesture @@ -470,13 +474,13 @@ - (void)setSoundURL:(NSURL *)soundURL //DisposeSound AudioServicesDisposeSystemSoundID(_soundID); - + AudioServicesCreateSystemSoundID((__bridge CFURLRef)_soundURL, &_soundID); AudioServicesPlaySystemSoundWithCompletion(_soundID, ^{ //call When Sound play to the end }); - + //PlaySound AudioServicesPlaySystemSound(_soundID); } @@ -691,7 +695,7 @@ - (void)buttonTapped:(SCLButton *)btn if (btn.validationBlock && !btn.validationBlock()) { return; } - + if (btn.actionType == SCLBlock) { if (btn.actionBlock) @@ -870,7 +874,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima // Move up _labelTitle.frame = CGRectMake(12.0f, 37.0f, _windowWidth - 24.0f, kTitleHeight); } - + // Add button, if necessary if(completeText != nil) { @@ -878,7 +882,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima } // Alert view color and images - self.circleView.backgroundColor = viewColor; + self.circleView.backgroundColor = self.tintTopCircle ? viewColor : _backgroundViewColor; if (style == Waiting) { @@ -1258,7 +1262,7 @@ - (void)fadeOut [self.backgroundView removeFromSuperview]; if (_usingNewWindow) { - // Remove current window + // Remove current window [self.SCLAlertWindow setHidden:YES]; self.SCLAlertWindow = nil; } diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 1f336e5..d9b9659 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -264,6 +264,8 @@ - (IBAction)showQuestion:(id)sender - (IBAction)showSwitch:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; + alert.tintTopCircle = NO; + alert.iconTintColor = [UIColor brownColor]; SCLSwitchView *switchView = [alert addSwitchViewWithLabel:@"Don't show again".uppercaseString]; switchView.tintColor = [UIColor brownColor]; From 8e5ff43516fbd450a3fd7f729a442d388f5bd090 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 29 Jan 2016 15:02:03 -0200 Subject: [PATCH 068/250] Simplify tint top circle --- SCLAlertView/SCLAlertView.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 62ac6c0..f41dce0 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -86,7 +86,6 @@ - (instancetype)init self = [super init]; if (self) { - _tintTopCircle = YES; [self setupViewWindowWidth:DEFAULT_WINDOW_WIDTH]; } return self; @@ -97,7 +96,6 @@ - (instancetype)initWithWindowWidth:(CGFloat)windowWidth self = [super init]; if (self) { - _tintTopCircle = YES; [self setupViewWindowWidth:windowWidth]; } return self; @@ -108,7 +106,6 @@ - (instancetype)initWithNewWindow self = [self initWithWindowWidth:DEFAULT_WINDOW_WIDTH]; if(self) { - _tintTopCircle = YES; [self setupNewWindow]; } return self; @@ -119,7 +116,6 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)windowWidth self = [self initWithWindowWidth:windowWidth]; if(self) { - _tintTopCircle = YES; [self setupNewWindow]; } return self; @@ -207,6 +203,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth [_contentView addSubview:_viewText]; // Circle View + _tintTopCircle = YES; _circleViewBackground.backgroundColor = [UIColor whiteColor]; _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; From e381432517ab0fb8c47dd8fe5cf862c4bbe77d79 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 29 Jan 2016 15:11:02 -0200 Subject: [PATCH 069/250] Fix implicit declaration of function 'AudioServicesPlaySystemSoundWithCompletion' --- SCLAlertView-Objective-C.podspec | 1 + SCLAlertView/SCLAlertView.m | 2 ++ 2 files changed, 3 insertions(+) diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index 4bcdfe8..a2cd69a 100644 --- a/SCLAlertView-Objective-C.podspec +++ b/SCLAlertView-Objective-C.podspec @@ -9,6 +9,7 @@ Pod::Spec.new do |spec| spec.author = { "Diogo Autilio" => "diautilio@gmail.com" } spec.social_media_url = "http://twitter.com/di_autilio" spec.platform = :ios + spec.frameworks = "Foundation", "AudioToolbox" spec.ios.deployment_target = '6.0' spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => spec.version.to_s } spec.source_files = "SCLAlertView/*" diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index f41dce0..be4d568 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -15,8 +15,10 @@ #if defined(__has_feature) && __has_feature(modules) @import AVFoundation; +@import AudioToolbox; #else #import +#import #endif #define KEYBOARD_HEIGHT 80 From 541c338206783243c324e908a2e051aeded5abd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Thu, 28 Jan 2016 16:22:23 -0200 Subject: [PATCH 070/250] Add use larger icon property --- SCLAlertView/SCLAlertView.h | 7 +++++++ SCLAlertView/SCLAlertView.m | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 4a59de3..08a8af8 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -85,6 +85,13 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) * (Default: YES) */ @property BOOL tintTopCircle; + +/** Use larger icon + * + * A boolean value that determines whether to make the SCLAlertView top circle icon larger. + * (Default: NO) + */ +@property BOOL useLargerIcon; /** Title Label * diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index be4d568..9308033 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -150,7 +150,6 @@ - (void)removeObservers - (void)setupViewWindowWidth:(CGFloat)windowWidth { // Default values - kCircleTopPosition = -12.0f; kCircleBackgroundTopPosition = -15.0f; kCircleHeight = 56.0f; kCircleHeightBackground = 62.0f; @@ -270,6 +269,18 @@ - (void)viewWillLayoutSubviews CGSize sz = [self mainScreenFrame].size; + // Check for larger top circle icon flag + if (_useLargerIcon) { + // TODO: recalculate using kCircleHeightBackground = 122.0f + kCircleBackgroundTopPosition = -15.0f; + kCircleHeight = 56.0f; + kCircleHeightBackground = 62.0f; + kTitleTop = 24.0f; + self.subTitleY = 70.0f; + self.circleIconHeight = 20.0f; + self.windowHeight = 178.0f; + } + // Check if the rootViewController is modal, if so we need to get the modal size not the main screen size if([self isModal] && !_usingNewWindow) { From f7724decf495e48272fc6cf42bdd6640949eee9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Thu, 28 Jan 2016 19:50:02 -0200 Subject: [PATCH 071/250] Adjust top circle frames for larger option --- SCLAlertView/SCLAlertView.m | 19 ++++++++++++------- SCLAlertViewExample/ViewController.m | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 9308033..320366b 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -272,13 +272,15 @@ - (void)viewWillLayoutSubviews // Check for larger top circle icon flag if (_useLargerIcon) { // TODO: recalculate using kCircleHeightBackground = 122.0f - kCircleBackgroundTopPosition = -15.0f; - kCircleHeight = 56.0f; - kCircleHeightBackground = 62.0f; - kTitleTop = 24.0f; - self.subTitleY = 70.0f; - self.circleIconHeight = 20.0f; - self.windowHeight = 178.0f; + kCircleBackgroundTopPosition = -30.0f; // -15.0f; + kCircleHeight = 116.0f; // 56.0f; + kCircleHeightBackground = 122.0f; // 62.0f; + kTitleTop = 84.0f; // 24.0f; + self.subTitleY = 130.0f; // 70.0f; + self.circleIconHeight = 80.0f; // 20.0f; + self.windowHeight = 238.0f; // 178.0f; + + _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; } // Check if the rootViewController is modal, if so we need to get the modal size not the main screen size @@ -321,6 +323,9 @@ - (void)viewWillLayoutSubviews self.view.frame = r; _contentView.frame = CGRectMake(0.0f, kCircleHeight / 4, _windowWidth, _windowHeight); _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); + CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; + _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); + _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); } else diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index d9b9659..ae0f7f0 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -266,6 +266,7 @@ - (IBAction)showSwitch:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; alert.tintTopCircle = NO; alert.iconTintColor = [UIColor brownColor]; + alert.useLargerIcon = YES; SCLSwitchView *switchView = [alert addSwitchViewWithLabel:@"Don't show again".uppercaseString]; switchView.tintColor = [UIColor brownColor]; From 239dd21d02d45bf930a8cebd6f00de1f04780184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Fri, 29 Jan 2016 16:13:14 -0200 Subject: [PATCH 072/250] Adjust layout calculations for larger icon option --- SCLAlertView/SCLAlertView.m | 84 ++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 320366b..c1d843a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -195,26 +195,6 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth // Background View _backgroundView.userInteractionEnabled = YES; - // Content View - _contentView.backgroundColor = [UIColor whiteColor]; - _contentView.layer.cornerRadius = 5.0f; - _contentView.layer.masksToBounds = YES; - _contentView.layer.borderWidth = 0.5f; - [_contentView addSubview:_labelTitle]; - [_contentView addSubview:_viewText]; - - // Circle View - _tintTopCircle = YES; - _circleViewBackground.backgroundColor = [UIColor whiteColor]; - _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; - CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; - _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); - _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; - x = (kCircleHeight - _circleIconHeight) / 2; - _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); - [_circleViewBackground addSubview:_circleView]; - [_circleView addSubview:_circleIconImageView]; - // Title _labelTitle.numberOfLines = 1; _labelTitle.textAlignment = NSTextAlignmentCenter; @@ -235,6 +215,26 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth self.automaticallyAdjustsScrollViewInsets = NO; } + // Content View + _contentView.backgroundColor = [UIColor whiteColor]; + _contentView.layer.cornerRadius = 5.0f; + _contentView.layer.masksToBounds = YES; + _contentView.layer.borderWidth = 0.5f; + [_contentView addSubview:_labelTitle]; + [_contentView addSubview:_viewText]; + + // Circle View + _tintTopCircle = YES; + _circleViewBackground.backgroundColor = [UIColor whiteColor]; + _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; + CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; + _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); + _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; + x = (kCircleHeight - _circleIconHeight) / 2; + _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); + [_circleViewBackground addSubview:_circleView]; + [_circleView addSubview:_circleIconImageView]; + // Colors self.backgroundViewColor = [UIColor whiteColor]; _labelTitle.textColor = UIColorFromHEX(0x4D4D4D); //Dark Grey @@ -271,14 +271,12 @@ - (void)viewWillLayoutSubviews // Check for larger top circle icon flag if (_useLargerIcon) { - // TODO: recalculate using kCircleHeightBackground = 122.0f kCircleBackgroundTopPosition = -30.0f; // -15.0f; kCircleHeight = 116.0f; // 56.0f; kCircleHeightBackground = 122.0f; // 62.0f; - kTitleTop = 84.0f; // 24.0f; - self.subTitleY = 130.0f; // 70.0f; + kTitleTop = 61.0f; // 24.0f; self.circleIconHeight = 80.0f; // 20.0f; - self.windowHeight = 238.0f; // 178.0f; + self.windowHeight = 244.0f; // 178.0f; _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; } @@ -331,7 +329,7 @@ - (void)viewWillLayoutSubviews else { CGFloat x = (sz.width - _windowWidth) / 2; - CGFloat y = (sz.height - _windowHeight - (kCircleHeight / 8)) / 2; + CGFloat y = (sz.height - _windowHeight - (kCircleHeight / 8)) / 2; _contentView.frame = CGRectMake(x, y, _windowWidth, _windowHeight); y -= kCircleHeightBackground * 0.6f; @@ -340,24 +338,26 @@ - (void)viewWillLayoutSubviews _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); } + // Labels + _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); + _viewText.frame = CGRectMake(12.0f, kTitleTop + _labelTitle.frame.size.height, _windowWidth - 24.0f, _subTitleHeight); + + // Text fields + CGFloat y = (_labelTitle.text == nil) ? kTitleTop : kTitleTop + _labelTitle.frame.size.height; + y += _subTitleHeight + 14.0f; + for (SCLTextView *textField in _inputs) { - // Text fields - CGFloat y = (_labelTitle.text == nil) ? (kCircleHeight - 20.0f) : 74.0f; - y += _subTitleHeight + 14.0f; - for (SCLTextView *textField in _inputs) - { - textField.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, textField.frame.size.height); - textField.layer.cornerRadius = 3.0f; - y += textField.frame.size.height + 10.0f; - } - - // Buttons - for (SCLButton *btn in _buttons) - { - btn.frame = CGRectMake(12.0f, y, btn.frame.size.width, btn.frame.size.height); - btn.layer.cornerRadius = 3.0f; - y += btn.frame.size.height + 10.0f; - } + textField.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, textField.frame.size.height); + textField.layer.cornerRadius = 3.0f; + y += textField.frame.size.height + 10.0f; + } + + // Buttons + for (SCLButton *btn in _buttons) + { + btn.frame = CGRectMake(12.0f, y, btn.frame.size.width, btn.frame.size.height); + btn.layer.cornerRadius = 3.0f; + y += btn.frame.size.height + 10.0f; } } From e5ef705faa0c8e194fe1885d01dc811fd7eac4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Fri, 29 Jan 2016 17:30:46 -0200 Subject: [PATCH 073/250] Layout optimizations --- SCLAlertView/SCLAlertView.m | 46 +++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index c1d843a..26055a6 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -192,6 +192,17 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth [self.view addSubview:_contentView]; [self.view addSubview:_circleViewBackground]; + // Circle View + _circleViewBackground.backgroundColor = [UIColor whiteColor]; + _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; + CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; + _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); + _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; + x = (kCircleHeight - _circleIconHeight) / 2; + _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); + [_circleViewBackground addSubview:_circleView]; + [_circleView addSubview:_circleIconImageView]; + // Background View _backgroundView.userInteractionEnabled = YES; @@ -220,21 +231,13 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _contentView.layer.cornerRadius = 5.0f; _contentView.layer.masksToBounds = YES; _contentView.layer.borderWidth = 0.5f; - [_contentView addSubview:_labelTitle]; + + CGRect position = [self.contentView convertRect:self.labelTitle.frame toView:self.view]; + _labelTitle.frame = position; + [self.view addSubview:_labelTitle]; + [_contentView addSubview:_viewText]; - // Circle View - _tintTopCircle = YES; - _circleViewBackground.backgroundColor = [UIColor whiteColor]; - _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; - CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; - _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); - _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; - x = (kCircleHeight - _circleIconHeight) / 2; - _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); - [_circleViewBackground addSubview:_circleView]; - [_circleView addSubview:_circleIconImageView]; - // Colors self.backgroundViewColor = [UIColor whiteColor]; _labelTitle.textColor = UIColorFromHEX(0x4D4D4D); //Dark Grey @@ -271,14 +274,13 @@ - (void)viewWillLayoutSubviews // Check for larger top circle icon flag if (_useLargerIcon) { - kCircleBackgroundTopPosition = -30.0f; // -15.0f; - kCircleHeight = 116.0f; // 56.0f; - kCircleHeightBackground = 122.0f; // 62.0f; - kTitleTop = 61.0f; // 24.0f; - self.circleIconHeight = 80.0f; // 20.0f; - self.windowHeight = 244.0f; // 178.0f; - + _circleIconHeight = 80.0f; _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; + + kCircleBackgroundTopPosition = -30.0f; + kCircleHeight = 116.0f; + kCircleHeightBackground = 122.0f; + kTitleTop = _tintTopCircle ? kCircleHeightBackground / 2: _circleIconHeight / 2 + 8.0f; } // Check if the rootViewController is modal, if so we need to get the modal size not the main screen size @@ -339,6 +341,7 @@ - (void)viewWillLayoutSubviews } // Labels + kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); _viewText.frame = CGRectMake(12.0f, kTitleTop + _labelTitle.frame.size.height, _windowWidth - 24.0f, _subTitleHeight); @@ -359,6 +362,9 @@ - (void)viewWillLayoutSubviews btn.layer.cornerRadius = 3.0f; y += btn.frame.size.height + 10.0f; } + + // Adapt window height according to icon size + self.windowHeight = _useLargerIcon ? y : self.windowHeight; } #pragma mark - UIViewController From c286e4ec3477f75b07010f1107402fde72c1c0c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Fri, 29 Jan 2016 17:53:58 -0200 Subject: [PATCH 074/250] Fix wrong label position --- SCLAlertView/SCLAlertView.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 26055a6..0d5380a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -231,11 +231,8 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _contentView.layer.cornerRadius = 5.0f; _contentView.layer.masksToBounds = YES; _contentView.layer.borderWidth = 0.5f; - - CGRect position = [self.contentView convertRect:self.labelTitle.frame toView:self.view]; - _labelTitle.frame = position; - [self.view addSubview:_labelTitle]; - + + [_contentView addSubview:_labelTitle]; [_contentView addSubview:_viewText]; // Colors From 9b4e29f8e753ba16e611c8317dcc84bf14bb8cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Mon, 1 Feb 2016 09:00:45 -0200 Subject: [PATCH 075/250] Revert "Fix wrong label position" This reverts commit 1d6f1e649860dd975b39bed7f7302d868a32f578. --- SCLAlertView/SCLAlertView.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 0d5380a..26055a6 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -231,8 +231,11 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _contentView.layer.cornerRadius = 5.0f; _contentView.layer.masksToBounds = YES; _contentView.layer.borderWidth = 0.5f; - - [_contentView addSubview:_labelTitle]; + + CGRect position = [self.contentView convertRect:self.labelTitle.frame toView:self.view]; + _labelTitle.frame = position; + [self.view addSubview:_labelTitle]; + [_contentView addSubview:_viewText]; // Colors From ca52e9c4d6adde33fb34f1e84384f18668809e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Mon, 1 Feb 2016 14:15:00 -0200 Subject: [PATCH 076/250] Add logic for alerts in new window Refine coordinate calculation --- SCLAlertView/SCLAlertView.m | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 26055a6..1148dfb 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -274,13 +274,21 @@ - (void)viewWillLayoutSubviews // Check for larger top circle icon flag if (_useLargerIcon) { - _circleIconHeight = 80.0f; + // Adjust icon + _circleIconHeight = 70.0f; _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; - kCircleBackgroundTopPosition = -30.0f; - kCircleHeight = 116.0f; + // Adjust coordinate variables for larger sized top circle + kCircleBackgroundTopPosition = -61.0f; + kCircleHeight = 106.0f; kCircleHeightBackground = 122.0f; kTitleTop = _tintTopCircle ? kCircleHeightBackground / 2: _circleIconHeight / 2 + 8.0f; + + // Reposition inner circle appropriately + CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; + _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); + } else { + kCircleBackgroundTopPosition = -(kCircleHeightBackground / 2); } // Check if the rootViewController is modal, if so we need to get the modal size not the main screen size @@ -321,12 +329,12 @@ - (void)viewWillLayoutSubviews // Set frames self.view.frame = r; - _contentView.frame = CGRectMake(0.0f, kCircleHeight / 4, _windowWidth, _windowHeight); + _contentView.frame = CGRectMake(0.0f, 0.0f, _windowWidth, _windowHeight); _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); - CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; - _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); + kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; + _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); } else { @@ -334,15 +342,15 @@ - (void)viewWillLayoutSubviews CGFloat y = (sz.height - _windowHeight - (kCircleHeight / 8)) / 2; _contentView.frame = CGRectMake(x, y, _windowWidth, _windowHeight); - y -= kCircleHeightBackground * 0.6f; + y -= kCircleHeightBackground / 2; x = (sz.width - kCircleHeightBackground) / 2; _circleViewBackground.frame = CGRectMake(x, y, kCircleHeightBackground, kCircleHeightBackground); _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); + kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; + _labelTitle.frame = CGRectMake(12.0f + self.contentView.frame.origin.x, kTitleTop + self.contentView.frame.origin.y, _windowWidth - 24.0f, kTitleHeight); } // Labels - kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; - _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); _viewText.frame = CGRectMake(12.0f, kTitleTop + _labelTitle.frame.size.height, _windowWidth - 24.0f, _subTitleHeight); // Text fields From 49dcc830882a633733322a97d8580a37cd2e3e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Mon, 1 Feb 2016 14:17:37 -0200 Subject: [PATCH 077/250] Make Question example use larger icon for demonstration with default alert type --- SCLAlertViewExample/ViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index ae0f7f0..28dde84 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -258,6 +258,7 @@ - (IBAction)showTimer:(id)sender - (IBAction)showQuestion:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; + alert.useLargerIcon = YES; [alert showQuestion:self title:@"Question?" subTitle:kSubtitle closeButtonTitle:@"Dismiss" duration:0.0f]; } From cb754253935617d4b18d84e4d05bd8c84e352d51 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 1 Feb 2016 14:45:23 -0200 Subject: [PATCH 078/250] Remove userLargerIcon from Question sample --- SCLAlertViewExample/ViewController.m | 1 - 1 file changed, 1 deletion(-) diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 28dde84..ae0f7f0 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -258,7 +258,6 @@ - (IBAction)showTimer:(id)sender - (IBAction)showQuestion:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - alert.useLargerIcon = YES; [alert showQuestion:self title:@"Question?" subTitle:kSubtitle closeButtonTitle:@"Dismiss" duration:0.0f]; } From 09074315029ff43ca2c0c084910ec71e5fe7bb16 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 1 Feb 2016 14:47:52 -0200 Subject: [PATCH 079/250] Fix rebase --- SCLAlertView/SCLAlertView.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 1148dfb..6dd5099 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -193,6 +193,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth [self.view addSubview:_circleViewBackground]; // Circle View + _tintTopCircle = YES; _circleViewBackground.backgroundColor = [UIColor whiteColor]; _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; From 8cc6556fb38db35aee511657c9933ec0cf429f1d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 1 Feb 2016 14:51:25 -0200 Subject: [PATCH 080/250] Code formatting --- SCLAlertView/SCLAlertView.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 6dd5099..fa68f31 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -232,12 +232,11 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _contentView.layer.cornerRadius = 5.0f; _contentView.layer.masksToBounds = YES; _contentView.layer.borderWidth = 0.5f; + [_contentView addSubview:_viewText]; CGRect position = [self.contentView convertRect:self.labelTitle.frame toView:self.view]; _labelTitle.frame = position; [self.view addSubview:_labelTitle]; - - [_contentView addSubview:_viewText]; // Colors self.backgroundViewColor = [UIColor whiteColor]; From 0d35c1b5399dee1c18e718e126a0e89dbe26ac21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Mon, 1 Feb 2016 17:19:23 -0200 Subject: [PATCH 081/250] Add corner radius to parseable SCLButton properties --- SCLAlertView/SCLButton.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index f150983..cecf285 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -117,6 +117,10 @@ - (void)parseConfig:(NSDictionary *)buttonConfig { self.layer.borderWidth = [buttonConfig[@"borderWidth"] floatValue]; } + else if(buttonConfig[@"cornerRadius"]) + { + self.layer.cornerRadius = [buttonConfig[@"cornerRadius"] floatValue]; + } } #pragma mark - Helpers From f6eece38003d3b2223ed135dbbe6f1505efdf908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Mon, 1 Feb 2016 17:52:02 -0200 Subject: [PATCH 082/250] Fix circle view corner radius when drawn in new window --- SCLAlertView/SCLAlertView.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index fa68f31..4d7968f 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -344,6 +344,7 @@ - (void)viewWillLayoutSubviews _contentView.frame = CGRectMake(x, y, _windowWidth, _windowHeight); y -= kCircleHeightBackground / 2; x = (sz.width - kCircleHeightBackground) / 2; + _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleViewBackground.frame = CGRectMake(x, y, kCircleHeightBackground, kCircleHeightBackground); _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; From 0db179d618e015e923901d805a7c8a1392793a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Mon, 1 Feb 2016 17:52:35 -0200 Subject: [PATCH 083/250] Code cleanup --- SCLAlertView/SCLButton.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index cecf285..e290ea3 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -117,9 +117,10 @@ - (void)parseConfig:(NSDictionary *)buttonConfig { self.layer.borderWidth = [buttonConfig[@"borderWidth"] floatValue]; } - else if(buttonConfig[@"cornerRadius"]) + else if (buttonConfig[@"cornerRadius"]) { - self.layer.cornerRadius = [buttonConfig[@"cornerRadius"] floatValue]; + NSString *stringValue = buttonConfig[@"cornerRadius"]; + self.layer.cornerRadius = stringValue.floatValue; } } From 6fc84a59416bc57aa25c86092f710d84d088cd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Mon, 1 Feb 2016 17:57:02 -0200 Subject: [PATCH 084/250] Swap switch view custom example button for custom one --- SCLAlertViewExample/ViewController.m | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index ae0f7f0..f5604b7 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -263,7 +263,7 @@ - (IBAction)showQuestion:(id)sender } - (IBAction)showSwitch:(id)sender { - SCLAlertView *alert = [[SCLAlertView alloc] init]; + SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; alert.tintTopCircle = NO; alert.iconTintColor = [UIColor brownColor]; alert.useLargerIcon = YES; @@ -271,9 +271,14 @@ - (IBAction)showSwitch:(id)sender { SCLSwitchView *switchView = [alert addSwitchViewWithLabel:@"Don't show again".uppercaseString]; switchView.tintColor = [UIColor brownColor]; - [alert addButton:@"Done" actionBlock:^(void) { - NSLog(@"Show again? %@", switchView.isSelected ? @"-No": @"-Yes"); - }]; + SCLButton *button = [alert addButton:@"Done" target:self selector:@selector(firstButton)]; + + button.buttonFormatBlock = ^NSDictionary* (void) { + NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; + buttonConfig[@"cornerRadius"] = @"17.5f"; + + return buttonConfig; + }; [alert showCustom:self image:[UIImage imageNamed:@"switch"] color:[UIColor brownColor] title:kInfoTitle subTitle:kSubtitle closeButtonTitle:nil duration:0.0f]; } From d26d5865fbf9d0d6fdb889c39b341ec90dd2db5f Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 2 Feb 2016 09:13:42 -0200 Subject: [PATCH 085/250] Remove fixed corner radius Simplify cornerRadius assignment --- SCLAlertView/SCLAlertView.m | 1 - SCLAlertView/SCLButton.m | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 4d7968f..8856787 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -368,7 +368,6 @@ - (void)viewWillLayoutSubviews for (SCLButton *btn in _buttons) { btn.frame = CGRectMake(12.0f, y, btn.frame.size.width, btn.frame.size.height); - btn.layer.cornerRadius = 3.0f; y += btn.frame.size.height + 10.0f; } diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index e290ea3..777e78b 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -60,6 +60,7 @@ - (void)setupWithWindowWidth:(CGFloat)windowWidth self.frame = CGRectMake(0.0f, 0.0f, windowWidth - (MARGIN_BUTTON * 2), MIN_HEIGHT); self.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; self.titleLabel.textAlignment = NSTextAlignmentCenter; + self.layer.cornerRadius = 3.0f; } - (void)setTitle:(NSString *)title forState:(UIControlState)state @@ -119,8 +120,7 @@ - (void)parseConfig:(NSDictionary *)buttonConfig } else if (buttonConfig[@"cornerRadius"]) { - NSString *stringValue = buttonConfig[@"cornerRadius"]; - self.layer.cornerRadius = stringValue.floatValue; + self.layer.cornerRadius = [buttonConfig[@"cornerRadius"] floatValue]; } } From 2d7b05217e9fd7ed1066426611a75b7f7e2f9a9f Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 2 Feb 2016 09:15:58 -0200 Subject: [PATCH 086/250] Small logic change --- SCLAlertView/SCLButton.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 777e78b..6e8f3d0 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -109,6 +109,10 @@ - (void)parseConfig:(NSDictionary *)buttonConfig { [self setTitleColor:buttonConfig[@"textColor"] forState:UIControlStateNormal]; } + if (buttonConfig[@"cornerRadius"]) + { + self.layer.cornerRadius = [buttonConfig[@"cornerRadius"] floatValue]; + } if ((buttonConfig[@"borderColor"]) && (buttonConfig[@"borderWidth"])) { self.layer.borderColor = ((UIColor*)buttonConfig[@"borderColor"]).CGColor; @@ -118,10 +122,6 @@ - (void)parseConfig:(NSDictionary *)buttonConfig { self.layer.borderWidth = [buttonConfig[@"borderWidth"] floatValue]; } - else if (buttonConfig[@"cornerRadius"]) - { - self.layer.cornerRadius = [buttonConfig[@"cornerRadius"] floatValue]; - } } #pragma mark - Helpers From 248565356dec989b6573bc460570787a5ce20ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Tue, 2 Feb 2016 10:03:23 -0200 Subject: [PATCH 087/250] Expose cornerRadius property --- SCLAlertView/SCLAlertView.h | 6 ++++++ SCLAlertView/SCLAlertView.m | 5 ++++- SCLAlertViewExample/ViewController.m | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 08a8af8..f96130c 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -79,6 +79,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) Transparent }; +/** Content view corner radius + * + * A float value that replaces the standard content viuew corner radius. + */ +@property CGFloat cornerRadius; + /** Tint top circle * * A boolean value that determines whether to tint the SCLAlertView top circle. diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 8856787..b5795f6 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -229,7 +229,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth // Content View _contentView.backgroundColor = [UIColor whiteColor]; - _contentView.layer.cornerRadius = 5.0f; + _contentView.layer.cornerRadius = self.cornerRadius > 0 ? self.cornerRadius : 5.0f; _contentView.layer.masksToBounds = YES; _contentView.layer.borderWidth = 0.5f; [_contentView addSubview:_viewText]; @@ -373,6 +373,9 @@ - (void)viewWillLayoutSubviews // Adapt window height according to icon size self.windowHeight = _useLargerIcon ? y : self.windowHeight; + + // Adjust corner radius, if a value has been passed + _contentView.layer.cornerRadius = self.cornerRadius > 0 ? self.cornerRadius : 5.0f; } #pragma mark - UIViewController diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index f5604b7..785e11c 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -267,6 +267,7 @@ - (IBAction)showSwitch:(id)sender { alert.tintTopCircle = NO; alert.iconTintColor = [UIColor brownColor]; alert.useLargerIcon = YES; + alert.cornerRadius = 13.0f; SCLSwitchView *switchView = [alert addSwitchViewWithLabel:@"Don't show again".uppercaseString]; switchView.tintColor = [UIColor brownColor]; From a806b8c58b545ecf3024c4362cedb496bd1a04de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Tue, 2 Feb 2016 10:23:46 -0200 Subject: [PATCH 088/250] Corner radius logic cleanup --- SCLAlertView/SCLAlertView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index b5795f6..3a8be73 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -229,7 +229,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth // Content View _contentView.backgroundColor = [UIColor whiteColor]; - _contentView.layer.cornerRadius = self.cornerRadius > 0 ? self.cornerRadius : 5.0f; + _contentView.layer.cornerRadius = 5.0f; _contentView.layer.masksToBounds = YES; _contentView.layer.borderWidth = 0.5f; [_contentView addSubview:_viewText]; @@ -375,7 +375,7 @@ - (void)viewWillLayoutSubviews self.windowHeight = _useLargerIcon ? y : self.windowHeight; // Adjust corner radius, if a value has been passed - _contentView.layer.cornerRadius = self.cornerRadius > 0 ? self.cornerRadius : 5.0f; + _contentView.layer.cornerRadius = self.cornerRadius ? self.cornerRadius : 5.0f; } #pragma mark - UIViewController From eba800fccf674d5c03d0ce34cb6c1dec4e86ee6c Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 5 Feb 2016 12:44:54 -0200 Subject: [PATCH 089/250] Small improvements --- SCLAlertView-Objective-C.podspec | 2 +- SCLAlertView.xcodeproj/project.pbxproj | 28 ++++++++++++++++++++++++++ SCLAlertView/SCLTimerDisplay.h | 4 ++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index a2cd69a..8bec9ff 100644 --- a/SCLAlertView-Objective-C.podspec +++ b/SCLAlertView-Objective-C.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.author = { "Diogo Autilio" => "diautilio@gmail.com" } spec.social_media_url = "http://twitter.com/di_autilio" spec.platform = :ios - spec.frameworks = "Foundation", "AudioToolbox" + spec.frameworks = "UIKit", "AudioToolbox", "Accelerate", "CoreGraphics" spec.ios.deployment_target = '6.0' spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => spec.version.to_s } spec.source_files = "SCLAlertView/*" diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index b4c31ac..a25884a 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -9,6 +9,10 @@ /* Begin PBXBuildFile section */ 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */; }; CF6FB1241C5926FC009715F3 /* SCLSwitchView.m in Sources */ = {isa = PBXBuildFile; fileRef = CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */; }; + DD06C22D1C64EAE500E6F6B0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C22C1C64EAE500E6F6B0 /* UIKit.framework */; }; + DD06C22F1C64EAF600E6F6B0 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C22E1C64EAF600E6F6B0 /* AudioToolbox.framework */; }; + DD06C2331C64EB1A00E6F6B0 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C2321C64EB1A00E6F6B0 /* Accelerate.framework */; }; + DD06C2371C64EB9200E6F6B0 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C2361C64EB9200E6F6B0 /* CoreGraphics.framework */; }; DD24453C1BAC383600892117 /* SCLTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD24453B1BAC383600892117 /* SCLTextView.m */; }; DD2E172A19FA84B800CBAEC3 /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */; }; DD4BA9C119DED8EF008D73EB /* right_answer.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */; }; @@ -39,6 +43,12 @@ 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTimerDisplay.m; sourceTree = ""; }; CF6FB1221C5926FC009715F3 /* SCLSwitchView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLSwitchView.h; sourceTree = ""; }; CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLSwitchView.m; sourceTree = ""; }; + DD06C22C1C64EAE500E6F6B0 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + DD06C22E1C64EAF600E6F6B0 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + DD06C2301C64EB0400E6F6B0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + DD06C2321C64EB1A00E6F6B0 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + DD06C2341C64EB5900E6F6B0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + DD06C2361C64EB9200E6F6B0 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DD0D295B19D902DA00881F53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = SCLAlertViewExample/Info.plist; sourceTree = SOURCE_ROOT; }; DD24453A1BAC383600892117 /* SCLTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTextView.h; sourceTree = ""; }; DD24453B1BAC383600892117 /* SCLTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTextView.m; sourceTree = ""; }; @@ -73,6 +83,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DD06C2371C64EB9200E6F6B0 /* CoreGraphics.framework in Frameworks */, + DD06C2331C64EB1A00E6F6B0 /* Accelerate.framework in Frameworks */, + DD06C22F1C64EAF600E6F6B0 /* AudioToolbox.framework in Frameworks */, + DD06C22D1C64EAE500E6F6B0 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -86,6 +100,19 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + DD06C2381C64EC5D00E6F6B0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + DD06C2361C64EB9200E6F6B0 /* CoreGraphics.framework */, + DD06C2341C64EB5900E6F6B0 /* QuartzCore.framework */, + DD06C2321C64EB1A00E6F6B0 /* Accelerate.framework */, + DD06C2301C64EB0400E6F6B0 /* Foundation.framework */, + DD06C22E1C64EAF600E6F6B0 /* AudioToolbox.framework */, + DD06C22C1C64EAE500E6F6B0 /* UIKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; DD4BA9BF19DED8EF008D73EB /* Sounds */ = { isa = PBXGroup; children = ( @@ -102,6 +129,7 @@ DDB15F9F19D5B7C600173158 /* SCLAlertViewExample */, DDB15FB919D5B7C600173158 /* SCLAlertViewTests */, DDB15F9E19D5B7C600173158 /* Products */, + DD06C2381C64EC5D00E6F6B0 /* Frameworks */, ); sourceTree = ""; }; diff --git a/SCLAlertView/SCLTimerDisplay.h b/SCLAlertView/SCLTimerDisplay.h index 039c27a..cff2d7a 100644 --- a/SCLAlertView/SCLTimerDisplay.h +++ b/SCLAlertView/SCLTimerDisplay.h @@ -7,7 +7,11 @@ // // Taken from https://stackoverflow.com/questions/11783439/uibutton-with-timer +#if defined(__has_feature) && __has_feature(modules) +@import UIKit; +#else #import +#endif #import "SCLButton.h" @interface SCLTimerDisplay : UIView{ From b7174ab36bc9dc8ad4cd65b9e65f1c9f28ccc0fa Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 5 Feb 2016 12:53:37 -0200 Subject: [PATCH 090/250] Set osx image --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 761abcc..ab724f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ # reference: http://www.objc.io/issue-6/travis-ci.html language: objective-c +osx_image: xcode7.3 script: - xcodebuild -project SCLAlertView.xcodeproj -target SCLAlertView -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO \ No newline at end of file From 89ed7aa28f3b03fa015a1bf18f0bb62853d8feae Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 5 Feb 2016 14:04:11 -0200 Subject: [PATCH 091/250] Remove exclusive and dupe iOS 9.0 method Remove OS X image --- .travis.yml | 1 - SCLAlertView/SCLAlertView.m | 4 ---- 2 files changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab724f2..761abcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ # reference: http://www.objc.io/issue-6/travis-ci.html language: objective-c -osx_image: xcode7.3 script: - xcodebuild -project SCLAlertView.xcodeproj -target SCLAlertView -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO \ No newline at end of file diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 3a8be73..1c70319 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -509,10 +509,6 @@ - (void)setSoundURL:(NSURL *)soundURL AudioServicesCreateSystemSoundID((__bridge CFURLRef)_soundURL, &_soundID); - AudioServicesPlaySystemSoundWithCompletion(_soundID, ^{ - //call When Sound play to the end - }); - //PlaySound AudioServicesPlaySystemSound(_soundID); } From e6e54947af53401c5fb07d3dde0287617b93aa36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Tue, 9 Feb 2016 14:33:46 -0200 Subject: [PATCH 092/250] Add switch/larger icon screenshot --- ScreenShots/ScreenShot8.png | Bin 0 -> 28871 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ScreenShots/ScreenShot8.png diff --git a/ScreenShots/ScreenShot8.png b/ScreenShots/ScreenShot8.png new file mode 100644 index 0000000000000000000000000000000000000000..9a001222f7910f426b85981215bf836128dcde3e GIT binary patch literal 28871 zcmeEuRd5_Zw4JnGS!gj@%(j@BnZaTvizSPh87*eCm@KlGnJi{zW@gGb$wyLol~g6~ zGhbUZ)qAIVru*J=&ON(f3UcC~;6B4aKtOzwlo0s_0Rbrh0RiHG0RdMMEQ>~f4@ie^ z;zAG=V|a%U5CRaAB7(}UkSCeYo@C;Q@7$3rf8EHe$A%0toilCKO+Q!$K)!Ewg5w!E zi?*$zY&*MF4dOZN8T$2eCE57)8|99xy3$?hsLSmUnO9%m>!p^{@JC0Y^0Ua=9v7C5 zj!M-keN;N!D@%K(*?+7Q56L4VgRjsaN%?0n%b_3zJ4FRxXto8A2aUjioo*{`xy?jG z;3P&Om>out-%c~qr%zA;f;#i@SkjL5H8s-=k$?aG6@iLMB}5EaUS5X&_|a;aj)q2L z#xWnirYVC~KpY(%J*6;JLfH2YO<8gA7e&aSaS{+IDJe7}UZ@C((sWL9GZ#8sUpa1e zXVkXUa=rC<7O!n^Y_;pxo*dy21&ZdxxVSju;Urq^ zM%%yBQnj@!^2|QGk2~?m*ed&@=`L48lmprv_%{#R(G7KViV(JPoV(~xS~~MllX_lW zuO&rUpS=na_&pyOI76vuX?3a%MU9L|L#W*GLO2oHcp zVk&@?a(u)|?Qf=2uY%}pboL(Sy~oSgkxCuxL<>DohR7kcu&@}cEGzrqfXWabrPblh z%MulV&`DJWpYQYjynd($BO_@7c8}4}x^2JePT|^yiyavuf*?1C!DPTT4EDl#tWVd{)Fr9;X&wrK>S2tcab`Ior~25qq@y3EYaG?YB{HnZ1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*AHT47ka2fOW=u7VH_}&=%_@pf)snsC z**uE`1!_h@R*wxSvYYwoQznY5)cf-+x3hu6WTR-u*16*CT72N;Nu6nc7mZPtOxy+1 zO=y=csi6|x)fAm)^`pv@$$D+X2u8jL-I(mi-X1H*5qfP_%phO4q+7SNQJK+UPxdUG zXjRUPx-j;eueqKW<+W&V2F6BRMQ1m}_YFKo%8M7()kwX6L>RCibZPa5+cViBcs$*F ziT1Kt%w?=M z$I^d>Qs@1AJ$;rrPh6({APYXh5dVzOJ>!C|-O`?z+R2lBj8`m9?B5)1u=$NejySkM z*nU85N*)%z`oD3-EvzMrRww?0Mez(i-(GxBHEQ_U=*dPIJs* zEdfSS2jk;2!tIGAI^yN|fM05^tE)>oz2sMtiFfrXYP)EP&=`mJnoOm6B)QBR<9I6{ zvp3|UPImBPD=2n27HaVUrZydw4c#;4yucEu-|Jw}&UXnGW5K(2)mbRd6Mb+xuH~jFJ*SmMJ)Vl#s;6g1l_u)KEl* z0n<1Z`gs8v5<*Q0B5*e?NWmHi4MxsFqHDkgA;?OA*>`*1uu&x-!C?zvzO|(RqecO1 z?L=6jo)je}h}xO_%d{LaE-oB)Q|?QehK~~DV3{=$#?n|UMn>SOB!QeQ3Pc1Lf{&U8 t36+`}a5aQIW*P_NgN60q7+{z2AL|T1&ps<2;LU_D6l7Ios-#Rp{ukhvX9NHM literal 0 HcmV?d00001 From f3bbf636325fba7fc0754192125edc3fc90fe994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Tue, 9 Feb 2016 14:36:20 -0200 Subject: [PATCH 093/250] Revert "Add switch/larger icon screenshot" This reverts commit e6e54947af53401c5fb07d3dde0287617b93aa36. --- ScreenShots/ScreenShot8.png | Bin 28871 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ScreenShots/ScreenShot8.png diff --git a/ScreenShots/ScreenShot8.png b/ScreenShots/ScreenShot8.png deleted file mode 100644 index 9a001222f7910f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8M7()kwX6L>RCibZPa5+cViBcs$*F ziT1Kt%w?=M z$I^d>Qs@1AJ$;rrPh6({APYXh5dVzOJ>!C|-O`?z+R2lBj8`m9?B5)1u=$NejySkM z*nU85N*)%z`oD3-EvzMrRww?0Mez(i-(GxBHEQ_U=*dPIJs* zEdfSS2jk;2!tIGAI^yN|fM05^tE)>oz2sMtiFfrXYP)EP&=`mJnoOm6B)QBR<9I6{ zvp3|UPImBPD=2n27HaVUrZydw4c#;4yucEu-|Jw}&UXnGW5K(2)mbRd6Mb+xuH~jFJ*SmMJ)Vl#s;6g1l_u)KEl* z0n<1Z`gs8v5<*Q0B5*e?NWmHi4MxsFqHDkgA;?OA*>`*1uu&x-!C?zvzO|(RqecO1 z?L=6jo)je}h}xO_%d{LaE-oB)Q|?QehK~~DV3{=$#?n|UMn>SOB!QeQ3Pc1Lf{&U8 t36+`}a5aQIW*P_NgN60q7+{z2AL|T1&ps<2;LU_D6l7Ios-#Rp{ukhvX9NHM From e168396b8d87118a37421fd8f7912631a388e29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Felipe?= Date: Tue, 9 Feb 2016 14:46:32 -0200 Subject: [PATCH 094/250] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 478c90d..e1c64ee 100644 --- a/README.md +++ b/README.md @@ -177,14 +177,25 @@ alert.customViewColor = [UIColor purpleColor]; //Set custom tint color for icon image. alert.iconTintColor = [UIColor purpleColor]; +//Override top circle tint color with background color +alert.tintTopCircle = NO; + +//Set custom corner radius for SCLAlertView +alert.cornerRadius = 13.0f; + //Overwrite SCLAlertView background color alert.backgroundViewColor = [UIColor cyanColor]; //Returns if the alert is visible or not. alert.isVisible; +//Make the top circle icon larger +alert.useLargerIcon = YES; + //Using sound alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_answer.mp3", [[NSBundle mainBundle] resourcePath]]]; + + ``` ###Helpers From 7d0a652a574ec99c829dcd688310814c4124a8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Felipe=20Santos?= Date: Tue, 9 Feb 2016 20:29:54 -0200 Subject: [PATCH 095/250] Add switch/larger icon screenshot asset --- ScreenShots/ScreenShot8.png | Bin 0 -> 29347 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ScreenShots/ScreenShot8.png diff --git a/ScreenShots/ScreenShot8.png b/ScreenShots/ScreenShot8.png new file mode 100644 index 0000000000000000000000000000000000000000..1e0dda57cb37f0d3d5a20b9755fc2d1af4409984 GIT binary patch literal 29347 zcmeEuRZt#57bTDn_>kc4PH=a3hv4oWJh;2NYao!|?(PJF6P)1g?!J?McVD))c5AEl zVIP(ks-}mbyQll!bIv_Ik)IW%KEmU{LqI@$l#v!!fq;M%hJb+L215Z?Qf!LHfM1Z# zDpH~lRTBh<5D>x;GU6g?9*`&BU~}};m);#RSC`gwz0OGk6F!R~bmDv#H&Cky&{sYw z=!)tpsXk>0y1lIqf|qVA07sx4hCsk2h`;TjP;25n7e#*y8c9gN++c8^IRO}oNKzPlvN?f1 z2MtMD69XyI(+_^wI$oQZ*}i{v)sHu%pI_SBv*>4rM?f&eDJ923~Mbsuq76tcQsG`F~H@#0x%I zJMH*!B;s<&KjvMUqT(3rnDoWZ8o>d7C;6Y}rkRfC?&ud1>i&*CsQH{WEX z6p#nGov(fT-A~WopylpAfo zN?6pb9+KurgYUeyrPE{0L8_(!&-EBvYt#o=q=XOpnX3jqm%pZ`rwirMx6VHom6TXb z#pp` z)DlMU`+lxB;|$L>jE#&S>m`}A<8Lr|ua)Ue?_8;Bv5DF++`H44xia+_+Cj=b>rZ@q z_)-OBWk*x_V)E7jXa;_wMVrPVA|if%f|{^wHa0eM=1^2UK|*P6gE6?m@Z2v3-lrTf zoaQCJ4dI3RxP|{Xx$LIUs2-@=(u0by)DJ|E0<*+=im@{UWJZ}N!6l{1ao?-Sz1X6l z2MuOIWAHUKr;kwfm}TcHbr;s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Mme*GyPh$0^6A@Skm^n)2vlw`-tr83cRQwy3mfl1f*qQCP9UsOrZ zJ_-^(JUFbKY*qcu6c63=t(#A|106TOOOCllUq9~(DcP}C14b&+O4;|cdoP?uhMg?B%92UxZix*N)r4XN=Kkee3cLC^MK>uK+k#yEBKVd_q1%iVr*xveFNfwk^W>U=Ho((?XZhfyNEEoyt*a?HEderISJ$nxVY*W86#adaH_w~ zzuLx9Ns+=1)?umON6;ORQ~~Q36Jp=DPZ1p7l3`vjo}PwAlFGk*XD5B7Bd}U6GLk$} zVO1yUOv5*9QrBuF|GNN=mlR8Sg=}{EEW-Ld@AG$V0I-@|KVDP+zPK@eSiw)0yK3hM zkG-pA;=qp>1fJjffCo~m<_FLdKdj+99@#Zj58hX6g=Dm^Y4Y4`1_dN^mImg5sr@R_ zhtCh)%j9g(KO^VD(#&H(E5!uEuYAWUHbDSzL+&t}&tFI=roKZWB|#3tbaeSpNW<{o e^M%i3l4^ePE9?)hkbj+gry!#&T_b56@;?A5(5$Nf literal 0 HcmV?d00001 From c1f8cb8fb13e59f09541024c2c64784528a24840 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 10 Feb 2016 21:33:19 -0200 Subject: [PATCH 096/250] Bump version --- 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 8bec9ff..e84e2a3 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.8.2" + spec.version = "0.9.0" 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" From 0029b5068bf8ad4f3db62c9c3024faff7671e66e Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 15 Feb 2016 12:25:00 -0200 Subject: [PATCH 097/250] Fix vertical spacing broken on 0.9.0 #183 --- SCLAlertView/SCLAlertView.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 1c70319..29a6645 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -351,11 +351,9 @@ - (void)viewWillLayoutSubviews _labelTitle.frame = CGRectMake(12.0f + self.contentView.frame.origin.x, kTitleTop + self.contentView.frame.origin.y, _windowWidth - 24.0f, kTitleHeight); } - // Labels - _viewText.frame = CGRectMake(12.0f, kTitleTop + _labelTitle.frame.size.height, _windowWidth - 24.0f, _subTitleHeight); - // Text fields CGFloat y = (_labelTitle.text == nil) ? kTitleTop : kTitleTop + _labelTitle.frame.size.height; + _viewText.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, _subTitleHeight); y += _subTitleHeight + 14.0f; for (SCLTextView *textField in _inputs) { From ea4f72285e472f2f160a427cc318154133d5d7a1 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 15 Feb 2016 12:26:04 -0200 Subject: [PATCH 098/250] Bump version --- 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 e84e2a3..80331f1 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.9.0" + spec.version = "0.9.1" 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" From addd1906cf1b2fe2c859a02faf3b66ffa0af9133 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 18 Feb 2016 11:24:45 -0200 Subject: [PATCH 099/250] Adjust UIScrollView content size (Example project) --- .../Base.lproj/Storyboard.storyboard | 7 +++++-- SCLAlertViewExample/ViewController.m | 13 +++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index 489b24d..7c01a6e 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -1,8 +1,8 @@ - + - + @@ -197,6 +197,9 @@ + + + diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 785e11c..c3e8e2a 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -11,6 +11,8 @@ @interface ViewController () +@property (nonatomic, weak) IBOutlet UIScrollView *scrollView; + @end NSString *kSuccessTitle = @"Congratulations"; @@ -24,9 +26,16 @@ @interface ViewController () @implementation ViewController -- (void)viewDidLoad +- (void)viewDidAppear:(BOOL)animated { - [super viewDidLoad]; + [super viewDidAppear:animated]; + + // auto size UIScrollView to fit the content + CGRect contentRect = CGRectZero; + for (UIView *view in self.scrollView.subviews) { + contentRect = CGRectUnion(contentRect, view.frame); + } + self.scrollView.contentSize = contentRect.size; } - (void)didReceiveMemoryWarning From 2966c716ebc573bbd1339cbd792f7359568e33fa Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 26 Feb 2016 09:52:31 -0300 Subject: [PATCH 100/250] Add custom view to SCLAlertView --- SCLAlertView/SCLAlertView.h | 6 ++++++ SCLAlertView/SCLAlertView.m | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index f96130c..b8a3c3e 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -256,6 +256,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ - (void)removeTopCircle; +/** Add a custom UIView + * + * @param customView UIView object to be added above the first SCLButton. + */ +- (UIView *)addCustomView:(UIView *)customView; + /** Add Text Field * * @param title The text displayed on the textfield. diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 29a6645..78b6c48 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -29,6 +29,7 @@ @interface SCLAlertView () @property (nonatomic, strong) NSMutableArray *inputs; +@property (nonatomic, strong) NSMutableArray *customViews; @property (nonatomic, strong) NSMutableArray *buttons; @property (nonatomic, strong) UIImageView *circleIconImageView; @property (nonatomic, strong) UIView *circleView; @@ -187,6 +188,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _backgroundView = [[UIImageView alloc]initWithFrame:[self mainScreenFrame]]; _buttons = [[NSMutableArray alloc] init]; _inputs = [[NSMutableArray alloc] init]; + _customViews = [[NSMutableArray alloc] init]; // Add Subviews [self.view addSubview:_contentView]; @@ -362,6 +364,13 @@ - (void)viewWillLayoutSubviews y += textField.frame.size.height + 10.0f; } + // Custom views + for (UIView *view in _customViews) + { + view.frame = CGRectMake(12.0f, y, view.frame.size.width, view.frame.size.height); + y += view.frame.size.height + 10.0f; + } + // Buttons for (SCLButton *btn in _buttons) { @@ -528,6 +537,19 @@ - (void)addActivityIndicatorView [_circleView addSubview:_activityIndicatorView]; } +#pragma mark - UICustomView + +- (UIView *)addCustomView:(UIView *)customView +{ + // Update view height + self.windowHeight += customView.bounds.size.height + 10.0f; + + [_contentView addSubview:customView]; + [_customViews addObject:customView]; + + return customView; +} + #pragma mark - SwitchView - (SCLSwitchView *)addSwitchViewWithLabel:(NSString *)label From 06c609bd444fb3eeaa92f1a0baac2d75b75a186d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 3 Mar 2016 09:05:56 -0300 Subject: [PATCH 101/250] Bump version --- 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 80331f1..68eb638 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.9.1" + spec.version = "0.9.2" 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" From ab813f1789f779b29c83a000c759889fae0d808a Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 3 Mar 2016 12:27:11 -0300 Subject: [PATCH 102/250] Add aspect fill content mode property to circleIconImageView, fixes problems with custom icons --- SCLAlertView/SCLAlertView.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 78b6c48..56b84c0 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -203,6 +203,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; x = (kCircleHeight - _circleIconHeight) / 2; _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); + _circleIconImageView.contentMode = UIViewContentModeScaleAspectFill; [_circleViewBackground addSubview:_circleView]; [_circleView addSubview:_circleIconImageView]; From dcb689e3968f169435f65a05e6b4c691597985e2 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 3 Mar 2016 12:27:50 -0300 Subject: [PATCH 103/250] Bump version --- 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 68eb638..4be9550 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.9.2" + spec.version = "0.9.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" From e852ea87540afbe592ba052c3d7649d2b445cd49 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 3 Mar 2016 22:23:52 -0300 Subject: [PATCH 104/250] Fix alert shrinking when rotated --- SCLAlertView/SCLAlertView.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 56b84c0..2a0dca5 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -155,7 +155,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth kCircleHeight = 56.0f; kCircleHeightBackground = 62.0f; kActivityIndicatorHeight = 40.0f; - kTitleTop = 24.0f; + kTitleTop = 30.0f; kTitleHeight = 40.0f; self.subTitleY = 70.0f; self.subTitleHeight = 90.0f; @@ -285,7 +285,6 @@ - (void)viewWillLayoutSubviews kCircleBackgroundTopPosition = -61.0f; kCircleHeight = 106.0f; kCircleHeightBackground = 122.0f; - kTitleTop = _tintTopCircle ? kCircleHeightBackground / 2: _circleIconHeight / 2 + 8.0f; // Reposition inner circle appropriately CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; @@ -336,7 +335,6 @@ - (void)viewWillLayoutSubviews _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); - kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); } else @@ -350,7 +348,6 @@ - (void)viewWillLayoutSubviews _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleViewBackground.frame = CGRectMake(x, y, kCircleHeightBackground, kCircleHeightBackground); _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); - kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; _labelTitle.frame = CGRectMake(12.0f + self.contentView.frame.origin.x, kTitleTop + self.contentView.frame.origin.y, _windowWidth - 24.0f, kTitleHeight); } From 0e1e34bd8317e93afec5ca1e7cd8d83320fc6770 Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sat, 5 Mar 2016 17:10:31 +0300 Subject: [PATCH 105/250] fluent: first steps --- SCLAlertView/SCLAlertView.h | 80 ++++++ SCLAlertView/SCLAlertView.m | 509 ++++++++++++++++++++++++++++++++++++ 2 files changed, 589 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index b8a3c3e..9655b71 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -445,3 +445,83 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) - (void)showQuestion:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; @end + +@interface SCLAlertViewShowBuilder : NSObject + +@property(copy, nonatomic, readonly) UIViewController *parameterViewController; +@property(copy, nonatomic, readonly) UIImage *parameterImage; +@property(copy, nonatomic, readonly) UIColor *parameterColor; +@property(copy, nonatomic, readonly) NSString *parameterTitle; +@property(copy, nonatomic, readonly) NSString *parameterSubTitle; +@property(copy, nonatomic, readonly) NSString *parameterCompleteText; +@property(assign, nonatomic, readonly) SCLAlertViewStyle parameterStyle; +@property(copy, nonatomic, readonly) NSString *parameterCloseButtonTitle; +@property(assign, nonatomic, readonly) NSTimeInterval parameterDuration; + +#pragma mark - Setters +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^viewController)(UIViewController *viewController); +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^image)(UIImage *image); +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^color)(UIColor *color); +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^title)(NSString *title); +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^subTitle)(NSString *subTitle); +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^completeText)(NSString *completeText); +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^style)(SCLAlertViewStyle style); +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^closeButtonTitle)(NSString *closeButtonTitle); +@property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^duration)(NSTimeInterval duration); + +- (void)showAlertView:(SCLAlertView *)alertView; +@end + +@interface SCLAlertViewBuilder : NSObject + +#pragma mark - Parameters +@property (copy, nonatomic, readonly) SCLAlertView *alertView; + +#pragma mark - Init +- (instancetype)init; +- (instancetype)initWithNewWindow; +- (instancetype)initWithNewWindowWidth:(CGFloat)width; + +#pragma mark - Properties +@property(copy, nonatomic) SCLAlertViewBuilder *(^cornerRadius) (CGFloat cornerRadius); +@property(copy, nonatomic) SCLAlertViewBuilder *(^tintTopCircle) (BOOL tintTopCircle); +@property(copy, nonatomic) SCLAlertViewBuilder *(^useLargerIcon) (BOOL useLargerIcon); +@property(copy, nonatomic) SCLAlertViewBuilder *(^labelTitle) (UILabel *labelTitle); +@property(copy, nonatomic) SCLAlertViewBuilder *(^viewText) (UITextView *viewText); +@property(copy, nonatomic) SCLAlertViewBuilder *(^activityIndicatorView) (UIActivityIndicatorView *activityIndicatorView); +@property(copy, nonatomic) SCLAlertViewBuilder *(^shouldDismissOnTapOutside) (BOOL shouldDismissOnTapOutside); +@property(copy, nonatomic) SCLAlertViewBuilder *(^soundURL) (NSURL *soundURL); +@property(copy, nonatomic) SCLAlertViewBuilder *(^attributedFormatBlock) (SCLAttributedFormatBlock attributedFormatBlock); +@property(copy, nonatomic) SCLAlertViewBuilder *(^completeButtonFormatBlock) (CompleteButtonFormatBlock completeButtonFormatBlock); +@property(copy, nonatomic) SCLAlertViewBuilder *(^buttonFormatBlock) (ButtonFormatBlock buttonFormatBlock); +@property(copy, nonatomic) SCLAlertViewBuilder *(^forceHideBlock) (SCLForceHideBlock forceHideBlock); +@property(copy, nonatomic) SCLAlertViewBuilder *(^hideAnimationType) (SCLAlertViewHideAnimation hideAnimationType); +@property(copy, nonatomic) SCLAlertViewBuilder *(^showAnimationType) (SCLAlertViewShowAnimation showAnimationType); +@property(copy, nonatomic) SCLAlertViewBuilder *(^backgroundType) (SCLAlertViewBackground backgroundType); +@property(copy, nonatomic) SCLAlertViewBuilder *(^customViewColor) (UIColor *customViewColor); +@property(copy, nonatomic) SCLAlertViewBuilder *(^backgroundViewColor) (UIColor *backgroundViewColor); +@property(copy, nonatomic) SCLAlertViewBuilder *(^iconTintColor) (UIColor *iconTintColor); +@property(copy, nonatomic) SCLAlertViewBuilder *(^circleIconHeight) (CGFloat circleIconHeight); +@property(copy, nonatomic) SCLAlertViewBuilder *(^extensionBounds) (CGRect extensionBounds); +@property(copy, nonatomic) SCLAlertViewBuilder *(^statusBarHidden) (BOOL statusBarHidden); +@property(copy, nonatomic) SCLAlertViewBuilder *(^statusBarStyle) (UIStatusBarStyle statusBarStyle); + +#pragma mark - Custom Setters +@property(copy, nonatomic) SCLAlertViewBuilder *(^alertIsDismissed) (SCLDismissBlock dismissBlock); +@property(copy, nonatomic) SCLAlertViewBuilder *(^removeTopCircle)(void); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addCustomView)(UIView *view); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addTextField)(NSString *title); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addCustomTextField)(UITextField *textField); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addSwitchViewWithLabelTitle)(NSString *title); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addTimerToButtonIndex)(NSInteger buttonIndex, BOOL reverse); +@property(copy, nonatomic) SCLAlertViewBuilder *(^setTitleFontFamily)(NSString *titleFontFamily, CGFloat size); +@property(copy, nonatomic) SCLAlertViewBuilder *(^setBodyTextFontFamily)(NSString *bodyTextFontFamily, CGFloat size); +@property(copy, nonatomic) SCLAlertViewBuilder *(^setButtonsTextFontFamily)(NSString *buttonsFontFamily, CGFloat size); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addButtonWithActionBlock)(NSString *title, SCLActionBlock action); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addButtonWithValidationBlock)(NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addButtonWithTarget)(NSString *title, id target, SEL selector); + +#pragma mark - Show Builder +@property(copy, nonatomic) SCLAlertViewBuilder *(^showBuilder)(void(^showBuilder)(SCLAlertViewShowBuilder *builder)); + +@end \ No newline at end of file diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 56b84c0..632583a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1565,3 +1565,512 @@ - (void)slideInToCenter } @end + +@interface SCLAlertViewBuilder() + +@property (copy, nonatomic) SCLAlertView *alertView; + +@end + +@implementation SCLAlertViewBuilder + +#pragma mark - Init +- (instancetype)init { + self = [super init]; + if (self) { + self.alertView = [[SCLAlertView alloc] init]; + } + return self; +} +- (instancetype)initWithNewWindow { + self = [super init]; + if (self) { + self.alertView = [[SCLAlertView alloc] initWithNewWindow]; + } + return self; +} + +- (instancetype)initWithNewWindowWidth:(CGFloat)width { + self = [super init]; + if (self) { + self.alertView = [[SCLAlertView alloc] initWithNewWindowWidth:width]; + } + return self; +} + +#pragma mark - Properties +- (SCLAlertViewBuilder *(^) (CGFloat cornerRadius))cornerRadius { + if (!_cornerRadius) { + __weak typeof(self) weakSelf = self; + _cornerRadius = ^(CGFloat cornerRadius) { + weakSelf.alertView.cornerRadius = cornerRadius; + return weakSelf; + }; + } + return _cornerRadius; +} + +- (SCLAlertViewBuilder *(^) (BOOL tintTopCircle))tintTopCircle { + if (!_tintTopCircle) { + __weak typeof(self) weakSelf = self; + _tintTopCircle = ^(BOOL tintTopCircle) { + weakSelf.alertView.tintTopCircle = tintTopCircle; + return weakSelf; + }; + } + return _tintTopCircle; +} +- (SCLAlertViewBuilder *(^) (BOOL useLargerIcon))useLargerIcon { + if (!_useLargerIcon) { + __weak typeof(self) weakSelf = self; + _useLargerIcon = ^(BOOL useLargerIcon) { + weakSelf.alertView.useLargerIcon = useLargerIcon; + return weakSelf; + }; + } + return _useLargerIcon; +} +- (SCLAlertViewBuilder *(^) (UILabel *labelTitle))labelTitle { + if (!_labelTitle) { + __weak typeof(self) weakSelf = self; + _labelTitle = ^(UILabel *labelTitle) { + weakSelf.alertView.labelTitle = labelTitle; + return weakSelf; + }; + } + return _labelTitle; +} +- (SCLAlertViewBuilder *(^) (UITextView *viewText))viewText { + if (!_viewText) { + __weak typeof(self) weakSelf = self; + _viewText = ^(UITextView *viewText) { + weakSelf.alertView.viewText = viewText; + return weakSelf; + }; + } + return _viewText; +} +- (SCLAlertViewBuilder *(^) (UIActivityIndicatorView *activityIndicatorView))activityIndicatorView { + if (!_activityIndicatorView) { + __weak typeof(self) weakSelf = self; + _activityIndicatorView = ^(UIActivityIndicatorView *activityIndicatorView) { + weakSelf.alertView.activityIndicatorView = activityIndicatorView; + return weakSelf; + }; + } + return _activityIndicatorView; +} +- (SCLAlertViewBuilder *(^) (BOOL shouldDismissOnTapOutside))shouldDismissOnTapOutside { + if (!_shouldDismissOnTapOutside) { + __weak typeof(self) weakSelf = self; + _shouldDismissOnTapOutside = ^(BOOL shouldDismissOnTapOutside) { + weakSelf.alertView.shouldDismissOnTapOutside = shouldDismissOnTapOutside; + return weakSelf; + }; + } + return _shouldDismissOnTapOutside; +} +- (SCLAlertViewBuilder *(^) (NSURL *soundURL))soundURL { + if (!_soundURL) { + __weak typeof(self) weakSelf = self; + _soundURL = ^(NSURL *soundURL) { + weakSelf.alertView.soundURL = soundURL; + return weakSelf; + }; + } + return _soundURL; +} +- (SCLAlertViewBuilder *(^) (SCLAttributedFormatBlock attributedFormatBlock))attributedFormatBlock { + if (!_attributedFormatBlock) { + __weak typeof(self) weakSelf = self; + _attributedFormatBlock = ^(SCLAttributedFormatBlock attributedFormatBlock) { + weakSelf.alertView.attributedFormatBlock = attributedFormatBlock; + return weakSelf; + }; + } + return _attributedFormatBlock; +} +- (SCLAlertViewBuilder *(^) (CompleteButtonFormatBlock completeButtonFormatBlock))completeButtonFormatBlock { + if (!_completeButtonFormatBlock) { + __weak typeof(self) weakSelf = self; + _completeButtonFormatBlock = ^(CompleteButtonFormatBlock completeButtonFormatBlock) { + weakSelf.alertView.completeButtonFormatBlock = completeButtonFormatBlock; + return weakSelf; + }; + } + return _completeButtonFormatBlock; +} +- (SCLAlertViewBuilder *(^) (ButtonFormatBlock buttonFormatBlock))buttonFormatBlock { + if (!_buttonFormatBlock) { + __weak typeof(self) weakSelf = self; + _buttonFormatBlock = ^(ButtonFormatBlock buttonFormatBlock) { + weakSelf.alertView.buttonFormatBlock = buttonFormatBlock; + return weakSelf; + }; + } + return _buttonFormatBlock; +} +- (SCLAlertViewBuilder *(^) (SCLForceHideBlock forceHideBlock))forceHideBlock { + if (!_forceHideBlock) { + __weak typeof(self) weakSelf = self; + _forceHideBlock = ^(SCLForceHideBlock forceHideBlock) { + weakSelf.alertView.forceHideBlock = forceHideBlock; + return weakSelf; + }; + } + return _forceHideBlock; +} +- (SCLAlertViewBuilder *(^) (SCLAlertViewHideAnimation hideAnimationType))hideAnimationType { + if (!_hideAnimationType) { + __weak typeof(self) weakSelf = self; + _hideAnimationType = ^(SCLAlertViewHideAnimation hideAnimationType) { + weakSelf.alertView.hideAnimationType = hideAnimationType; + return weakSelf; + }; + } + return _hideAnimationType; +} +- (SCLAlertViewBuilder *(^) (SCLAlertViewShowAnimation showAnimationType))showAnimationType { + if (!_showAnimationType) { + __weak typeof(self) weakSelf = self; + _showAnimationType = ^(SCLAlertViewShowAnimation showAnimationType) { + weakSelf.alertView.showAnimationType = showAnimationType; + return weakSelf; + }; + } + return _showAnimationType; +} +- (SCLAlertViewBuilder *(^) (SCLAlertViewBackground backgroundType))backgroundType { + if (!_backgroundType) { + __weak typeof(self) weakSelf = self; + _backgroundType = ^(SCLAlertViewBackground backgroundType) { + weakSelf.alertView.backgroundType = backgroundType; + return weakSelf; + }; + } + return _backgroundType; +} +- (SCLAlertViewBuilder *(^) (UIColor *customViewColor))customViewColor { + if (!_customViewColor) { + __weak typeof(self) weakSelf = self; + _customViewColor = ^(UIColor *customViewColor) { + weakSelf.alertView.customViewColor = customViewColor; + return weakSelf; + }; + } + return _customViewColor; +} +- (SCLAlertViewBuilder *(^) (UIColor *backgroundViewColor))backgroundViewColor { + if (!_backgroundViewColor) { + __weak typeof(self) weakSelf = self; + _backgroundViewColor = ^(UIColor *backgroundViewColor) { + weakSelf.alertView.backgroundViewColor = backgroundViewColor; + return weakSelf; + }; + } + return _backgroundViewColor; +} +- (SCLAlertViewBuilder *(^) (UIColor *iconTintColor))iconTintColor { + if (!_iconTintColor) { + __weak typeof(self) weakSelf = self; + _iconTintColor = ^(UIColor *iconTintColor) { + weakSelf.alertView.iconTintColor = iconTintColor; + return weakSelf; + }; + } + return _iconTintColor; +} +- (SCLAlertViewBuilder *(^) (CGFloat circleIconHeight))circleIconHeight { + if (!_circleIconHeight) { + __weak typeof(self) weakSelf = self; + _circleIconHeight = ^(CGFloat circleIconHeight) { + weakSelf.alertView.circleIconHeight = circleIconHeight; + return weakSelf; + }; + } + return _circleIconHeight; +} +- (SCLAlertViewBuilder *(^) (CGRect extensionBounds))extensionBounds { + if (!_extensionBounds) { + __weak typeof(self) weakSelf = self; + _extensionBounds = ^(CGRect extensionBounds) { + weakSelf.alertView.extensionBounds = extensionBounds; + return weakSelf; + }; + } + return _extensionBounds; +} +- (SCLAlertViewBuilder *(^) (BOOL statusBarHidden))statusBarHidden { + if (!_statusBarHidden) { + __weak typeof(self) weakSelf = self; + _statusBarHidden = ^(BOOL statusBarHidden) { + weakSelf.alertView.statusBarHidden = statusBarHidden; + return weakSelf; + }; + } + return _statusBarHidden; +} +- (SCLAlertViewBuilder *(^) (UIStatusBarStyle statusBarStyle))statusBarStyle { + if (!_statusBarStyle) { + __weak typeof(self) weakSelf = self; + _statusBarStyle = ^(UIStatusBarStyle statusBarStyle) { + weakSelf.alertView.statusBarStyle = statusBarStyle; + return weakSelf; + }; + } + return _statusBarStyle; +} + +#pragma mark - Custom Setters +-(SCLAlertViewBuilder *(^) (SCLDismissBlock dismissBlock))alertIsDismissed { + if (!_alertIsDismissed) { + __weak typeof(self) weakSelf = self; + _alertIsDismissed = ^(SCLDismissBlock dismissBlock) { + [weakSelf.alertView alertIsDismissed:dismissBlock]; + return weakSelf; + }; + } + return _alertIsDismissed; +} +-(SCLAlertViewBuilder *(^) (void))removeTopCircle { + if (!_removeTopCircle) { + __weak typeof(self) weakSelf = self; + _removeTopCircle = ^(void) { + [weakSelf.alertView removeTopCircle]; + return weakSelf; + }; + } + return _removeTopCircle; +} +-(SCLAlertViewBuilder *(^) (UIView *view))addCustomView { + if (!_addCustomView) { + __weak typeof(self) weakSelf = self; + _addCustomView = ^(UIView *view) { + [weakSelf.alertView addCustomView:view]; + return weakSelf; + }; + } + return _addCustomView; +} +-(SCLAlertViewBuilder *(^) (NSString *title))addTextField { + if (!_addTextField) { + __weak typeof(self) weakSelf = self; + _addTextField = ^(NSString *title) { + [weakSelf.alertView addTextField:title]; + return weakSelf; + }; + } + return _addTextField; +} +-(SCLAlertViewBuilder *(^) (UITextField *textField))addCustomTextField { + if (!_addCustomTextField) { + __weak typeof(self) weakSelf = self; + _addCustomTextField = ^(UITextField *textField) { + [weakSelf.alertView addCustomTextField:textField]; + return weakSelf; + }; + } + return _addCustomTextField; +} +-(SCLAlertViewBuilder *(^) (NSString *title))addSwitchViewWithLabelTitle { + if (!_addSwitchViewWithLabelTitle) { + __weak typeof(self) weakSelf = self; + _addSwitchViewWithLabelTitle = ^(NSString *title) { + [weakSelf.alertView addSwitchViewWithLabel:title]; + return weakSelf; + }; + } + return _addSwitchViewWithLabelTitle; +} +-(SCLAlertViewBuilder *(^) (NSInteger buttonIndex, BOOL reverse))addTimerToButtonIndex { + if (!_addTimerToButtonIndex) { + __weak typeof(self) weakSelf = self; + _addTimerToButtonIndex = ^(NSInteger buttonIndex, BOOL reverse) { + [weakSelf.alertView addTimerToButtonIndex:buttonIndex reverse:reverse]; + return weakSelf; + }; + } + return _addTimerToButtonIndex; +} +-(SCLAlertViewBuilder *(^) (NSString *titleFontFamily, CGFloat size))setTitleFontFamily { + if (!_setTitleFontFamily) { + __weak typeof(self) weakSelf = self; + _setTitleFontFamily = ^(NSString *titleFontFamily, CGFloat size) { + [weakSelf.alertView setTitleFontFamily:titleFontFamily withSize:size]; + return weakSelf; + }; + } + return _setTitleFontFamily; +} +-(SCLAlertViewBuilder *(^) (NSString *bodyTextFontFamily, CGFloat size))setBodyTextFontFamily { + if (!_setBodyTextFontFamily) { + __weak typeof(self) weakSelf = self; + _setBodyTextFontFamily = ^(NSString *bodyTextFontFamily, CGFloat size) { + [weakSelf.alertView setBodyTextFontFamily:bodyTextFontFamily withSize:size]; + return weakSelf; + }; + } + return _setBodyTextFontFamily; +} +-(SCLAlertViewBuilder *(^) (NSString *buttonsFontFamily, CGFloat size))setButtonsTextFontFamily { + if (!_setButtonsTextFontFamily) { + __weak typeof(self) weakSelf = self; + _setButtonsTextFontFamily = ^(NSString *buttonsFontFamily, CGFloat size) { + [weakSelf.alertView setButtonsTextFontFamily:buttonsFontFamily withSize:size]; + return weakSelf; + }; + } + return _setButtonsTextFontFamily; +} +-(SCLAlertViewBuilder *(^) (NSString *title, SCLActionBlock action))addButtonWithActionBlock { + if (!_addButtonWithActionBlock) { + __weak typeof(self) weakSelf = self; + _addButtonWithActionBlock = ^(NSString *title, SCLActionBlock action) { + [weakSelf.alertView addButton:title actionBlock:action]; + return weakSelf; + }; + } + return _addButtonWithActionBlock; +} +-(SCLAlertViewBuilder *(^) (NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action))addButtonWithValidationBlock { + if (!_addButtonWithValidationBlock) { + __weak typeof(self) weakSelf = self; + _addButtonWithValidationBlock = ^(NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action) { + [weakSelf.alertView addButton:title validationBlock:validationBlock actionBlock:action]; + return weakSelf; + }; + } + return _addButtonWithValidationBlock; +} +-(SCLAlertViewBuilder *(^) (NSString *title, id target, SEL selector))addButtonWithTarget { + if (!_addButtonWithTarget) { + __weak typeof(self) weakSelf = self; + _addButtonWithTarget = ^(NSString *title, id target, SEL selector) { + [weakSelf.alertView addButton:title target:target selector:selector]; + return weakSelf; + }; + } + return _addButtonWithTarget; +} + +@end + +@interface SCLAlertViewShowBuilder() +@property(copy, nonatomic) UIViewController *parameterViewController; +@property(copy, nonatomic) UIImage *parameterImage; +@property(copy, nonatomic) UIColor *parameterColor; +@property(copy, nonatomic) NSString *parameterTitle; +@property(copy, nonatomic) NSString *parameterSubTitle; +@property(copy, nonatomic) NSString *parameterCompleteText; +@property(assign, nonatomic) SCLAlertViewStyle parameterStyle; +@property(copy, nonatomic) NSString *parameterCloseButtonTitle; +@property(assign, nonatomic) NSTimeInterval parameterDuration; + +#pragma mark - Setters +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^viewController)(UIViewController *viewController); +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^image)(UIImage *image); +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^color)(UIColor *color); +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^title)(NSString *title); +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^subTitle)(NSString *subTitle); +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^completeText)(NSString *completeText); +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^style)(SCLAlertViewStyle style); +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^closeButtonTitle)(NSString *closeButtonTitle); +@property(copy, nonatomic) SCLAlertViewShowBuilder *(^duration)(NSTimeInterval duration); +@end + +@implementation SCLAlertViewShowBuilder + + +#pragma mark - Setters +-(SCLAlertViewShowBuilder *(^)(UIViewController *viewController))viewController { + if (!_viewController) { + __weak typeof(self) weakSelf = self; + _viewController = ^(UIViewController *viewController){ + weakSelf.parameterViewController = viewController; + return weakSelf; + }; + } + return _viewController; +} +-(SCLAlertViewShowBuilder *(^)(UIImage *image))image { + if (!_image) { + __weak typeof(self) weakSelf = self; + _image = ^(UIImage *image) { + weakSelf.parameterImage = image; + return weakSelf; + }; + } + return _image; +} +-(SCLAlertViewShowBuilder *(^)(UIColor *color))color { + if (!_color) { + __weak typeof(self) weakSelf = self; + _color = ^(UIColor *color) { + weakSelf.parameterColor = color; + return weakSelf; + }; + } + return _color; +} +-(SCLAlertViewShowBuilder *(^)(NSString *title))title { + if (!_title) { + __weak typeof(self) weakSelf = self; + _title = ^(NSString *title){ + weakSelf.parameterTitle = title; + return weakSelf; + }; + } + return _title; +} +-(SCLAlertViewShowBuilder *(^)(NSString *subTitle))subTitle { + if (!_subTitle) { + __weak typeof(self) weakSelf = self; + _subTitle = ^(NSString *subTitle){ + weakSelf.parameterSubTitle = subTitle; + return weakSelf; + }; + } + return _subTitle; +} + +-(SCLAlertViewShowBuilder *(^)(SCLAlertViewStyle style))style { + if (!_style) { + __weak typeof(self) weakSelf = self; + _style = ^(SCLAlertViewStyle style){ + weakSelf.parameterStyle = style; + return weakSelf; + }; + } + return _style; +} +-(SCLAlertViewShowBuilder *(^)(NSString *closeButtonTitle))closeButtonTitle { + if (!_closeButtonTitle) { + __weak typeof(self) weakSelf = self; + _closeButtonTitle = ^(NSString *closeButtonTitle){ + weakSelf.parameterCloseButtonTitle = closeButtonTitle; + return weakSelf; + }; + } + return _closeButtonTitle; +} +-(SCLAlertViewShowBuilder *(^)(NSTimeInterval duration))duration { + if (!_duration) { + __weak typeof(self) weakSelf = self; + _duration = ^(NSTimeInterval duration){ + weakSelf.parameterDuration = duration; + return weakSelf; + }; + } + return _duration; +} + +- (void)showAlertView:(SCLAlertView *)alertView { + if (self.parameterImage || self.parameterColor) { + [alertView showTitle:self.parameterViewController image:self.parameterImage color:self.parameterColor title:self.parameterTitle subTitle:self.parameterSubTitle duration:self.parameterDuration completeText:@"" style:self.parameterStyle]; + } + else { + [alertView showTitle:self.parameterViewController title:self.parameterTitle subTitle:self.parameterSubTitle style:self.parameterStyle closeButtonTitle:self.parameterCloseButtonTitle duration:self.parameterDuration]; + } +} + +@end From 79ed39aad370b6ce272f291620623133e123ea39 Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sat, 5 Mar 2016 17:27:04 +0300 Subject: [PATCH 106/250] view controller parameter moved to show method --- SCLAlertView/SCLAlertView.h | 6 ++---- SCLAlertView/SCLAlertView.m | 10 +++++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 9655b71..9b2cb71 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -448,7 +448,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @interface SCLAlertViewShowBuilder : NSObject -@property(copy, nonatomic, readonly) UIViewController *parameterViewController; +@property(strong, nonatomic, readonly) UIViewController *parameterViewController; @property(copy, nonatomic, readonly) UIImage *parameterImage; @property(copy, nonatomic, readonly) UIColor *parameterColor; @property(copy, nonatomic, readonly) NSString *parameterTitle; @@ -470,6 +470,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^duration)(NSTimeInterval duration); - (void)showAlertView:(SCLAlertView *)alertView; +- (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewController *)controller; @end @interface SCLAlertViewBuilder : NSObject @@ -521,7 +522,4 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic) SCLAlertViewBuilder *(^addButtonWithValidationBlock)(NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action); @property(copy, nonatomic) SCLAlertViewBuilder *(^addButtonWithTarget)(NSString *title, id target, SEL selector); -#pragma mark - Show Builder -@property(copy, nonatomic) SCLAlertViewBuilder *(^showBuilder)(void(^showBuilder)(SCLAlertViewShowBuilder *builder)); - @end \ No newline at end of file diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 632583a..ec70443 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1956,7 +1956,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { @end @interface SCLAlertViewShowBuilder() -@property(copy, nonatomic) UIViewController *parameterViewController; +@property(strong, nonatomic) UIViewController *parameterViewController; @property(copy, nonatomic) UIImage *parameterImage; @property(copy, nonatomic) UIColor *parameterColor; @property(copy, nonatomic) NSString *parameterTitle; @@ -2065,11 +2065,15 @@ @implementation SCLAlertViewShowBuilder } - (void)showAlertView:(SCLAlertView *)alertView { + [self showAlertView:alertView onViewController:self.parameterViewController]; +} + +- (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewController *)controller { if (self.parameterImage || self.parameterColor) { - [alertView showTitle:self.parameterViewController image:self.parameterImage color:self.parameterColor title:self.parameterTitle subTitle:self.parameterSubTitle duration:self.parameterDuration completeText:@"" style:self.parameterStyle]; + [alertView showTitle:controller image:self.parameterImage color:self.parameterColor title:self.parameterTitle subTitle:self.parameterSubTitle duration:self.parameterDuration completeText:@"" style:self.parameterStyle]; } else { - [alertView showTitle:self.parameterViewController title:self.parameterTitle subTitle:self.parameterSubTitle style:self.parameterStyle closeButtonTitle:self.parameterCloseButtonTitle duration:self.parameterDuration]; + [alertView showTitle:controller title:self.parameterTitle subTitle:self.parameterSubTitle style:self.parameterStyle closeButtonTitle:self.parameterCloseButtonTitle duration:self.parameterDuration]; } } From b13ce91305baf61fdc31dff5478ba43435411cfc Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sat, 5 Mar 2016 17:56:00 +0300 Subject: [PATCH 107/250] fluent: fix alert view copy issue --- SCLAlertView/SCLAlertView.h | 2 +- SCLAlertView/SCLAlertView.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 9b2cb71..8ee366a 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -476,7 +476,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @interface SCLAlertViewBuilder : NSObject #pragma mark - Parameters -@property (copy, nonatomic, readonly) SCLAlertView *alertView; +@property (strong, nonatomic, readonly) SCLAlertView *alertView; #pragma mark - Init - (instancetype)init; diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index ec70443..f348852 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1568,7 +1568,7 @@ - (void)slideInToCenter @interface SCLAlertViewBuilder() -@property (copy, nonatomic) SCLAlertView *alertView; +@property (strong, nonatomic) SCLAlertView *alertView; @end From 7014bc149efc8117ce0b6d02ff66b9bab3a74051 Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sat, 5 Mar 2016 19:20:50 +0300 Subject: [PATCH 108/250] readme: updated --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index e1c64ee..d7c9bb8 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,21 @@ Animated Alert View written in Swift but ported to Objective-C, which can be use ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot6.png) ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot7.png) +###Modern + +```Objective-C +//Fluent style + +SCLAlertViewBuilder *builder = [SCLAlertViewBuilder new] +.addButtonWithActionBlock(@"Send", ^{ /*work here*/ }); +SCLAlertViewShowBuilder *showBuilder = [SCLAlertViewShowBuilder new] +.style(Warning) +.title(@"Title") +.subTitle(@"Subtitle") +.duration(0); +[showBuilder showAlertView:builder.alertView onViewController:self.window.rootViewController]; +``` + ###Easy to use ```Objective-C // Get started From e19637f5619cba83f7478dff4dac70fb839330e8 Mon Sep 17 00:00:00 2001 From: Chang Shu Date: Sat, 5 Mar 2016 22:57:09 -0500 Subject: [PATCH 109/250] fix multi line label on button display problem --- SCLAlertView/SCLButton.m | 3 +++ SCLAlertViewExample/ViewController.m | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 6e8f3d0..cd84c15 100644 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -71,6 +71,9 @@ - (void)setTitle:(NSString *)title forState:(UIControlState)state // Update title frame. [self.titleLabel sizeToFit]; + // Update button frame + [self layoutIfNeeded]; + // Get height needed to display title label completely CGFloat buttonHeight = MAX(self.titleLabel.frame.size.height, MIN_HEIGHT); diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index c3e8e2a..ee2233c 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -47,7 +47,7 @@ - (IBAction)showSuccess:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; - SCLButton *button = [alert addButton:@"First Button" target:self selector:@selector(firstButton)]; + SCLButton *button = [alert addButton:@"You have not saved your Submission yet. Please save the Submission before accessing the Responses list. Blah de blah de blah, blah. Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah." target:self selector:@selector(firstButton)]; button.buttonFormatBlock = ^NSDictionary* (void) { From f8d76b208b5cd8619c8730a161b0ebfb123cea4c Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 14:20:44 +0300 Subject: [PATCH 110/250] fluent: fix complete text parameter --- SCLAlertView/SCLAlertView.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index f348852..2b8bf3a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -2032,6 +2032,16 @@ @implementation SCLAlertViewShowBuilder } return _subTitle; } +-(SCLAlertViewShowBuilder *(^)(NSString *completeText))completeText { + if (!_completeText) { + __weak typeof(self) weakSelf = self; + _completeText = ^(NSString *completeText){ + weakSelf.parametercompleteText = completeText; + return weakSelf; + }; + } + return _completeText; +} -(SCLAlertViewShowBuilder *(^)(SCLAlertViewStyle style))style { if (!_style) { @@ -2070,7 +2080,7 @@ - (void)showAlertView:(SCLAlertView *)alertView { - (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewController *)controller { if (self.parameterImage || self.parameterColor) { - [alertView showTitle:controller image:self.parameterImage color:self.parameterColor title:self.parameterTitle subTitle:self.parameterSubTitle duration:self.parameterDuration completeText:@"" style:self.parameterStyle]; + [alertView showTitle:controller image:self.parameterImage color:self.parameterColor title:self.parameterTitle subTitle:self.parameterSubTitle duration:self.parameterDuration completeText:self.parameterCloseButtonTitle style:self.parameterStyle]; } else { [alertView showTitle:controller title:self.parameterTitle subTitle:self.parameterSubTitle style:self.parameterStyle closeButtonTitle:self.parameterCloseButtonTitle duration:self.parameterDuration]; From 9f809434e0e7f1cb0b8cd477b6251bbf78f4bebc Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 14:26:00 +0300 Subject: [PATCH 111/250] fluent: fix naming --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 2b8bf3a..20c2a59 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -2036,7 +2036,7 @@ @implementation SCLAlertViewShowBuilder if (!_completeText) { __weak typeof(self) weakSelf = self; _completeText = ^(NSString *completeText){ - weakSelf.parametercompleteText = completeText; + weakSelf.parameterCompleteText = completeText; return weakSelf; }; } From d5463032256651d9435007d85b01683341bbe26d Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 15:08:01 +0300 Subject: [PATCH 112/250] fluent: element builders added --- SCLAlertView/SCLAlertView.h | 28 ++++++++ SCLAlertView/SCLAlertView.m | 131 ++++++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 8ee366a..a76e8f5 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -473,6 +473,30 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) - (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewController *)controller; @end +@interface SCLALertViewTextFieldBuilder : NSObject + +#pragma mark - Available later after adding +@property(weak, nonatomic, readonly) SCLTextView *field; + +#pragma mark - Setters +@property(copy, nonatomic, readonly) SCLALertViewTextFieldBuilder *(^title) (NSString *title); + +@end + +@interface SCLALertViewButtonBuilder : NSObject + +#pragma mark - Available later after adding +@property(weak, nonatomic, readonly) SCLButton *button; + +#pragma mark - Setters +@property(copy, nonatomic, readonly) SCLALertViewButtonBuilder *(^title) (NSString *title); +@property(copy, nonatomic, readonly) SCLALertViewButtonBuilder *(^target) (id target); +@property(copy, nonatomic, readonly) SCLALertViewButtonBuilder *(^selector) (SEL selector); +@property(copy, nonatomic, readonly) SCLALertViewButtonBuilder *(^actionBlock) (void(^actionBlock)(void)); +@property(copy, nonatomic, readonly) SCLALertViewButtonBuilder *(^validationBlock) (BOOL(^validationBlock)(void)); + +@end + @interface SCLAlertViewBuilder : NSObject #pragma mark - Parameters @@ -522,4 +546,8 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic) SCLAlertViewBuilder *(^addButtonWithValidationBlock)(NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action); @property(copy, nonatomic) SCLAlertViewBuilder *(^addButtonWithTarget)(NSString *title, id target, SEL selector); +#pragma mark - Builders +@property(copy, nonatomic) SCLAlertViewBuilder *(^addButtonWithBuilder)(SCLALertViewButtonBuilder *builder); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addTextFieldWithBuilder)(SCLALertViewTextFieldBuilder *builder); + @end \ No newline at end of file diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 20c2a59..a150c0d 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1566,6 +1566,106 @@ - (void)slideInToCenter @end +@interface SCLALertViewTextFieldBuilder() +#pragma mark - Parameters +@property(copy, nonatomic) NSString *parameterTitle; + +#pragma mark - Available later after adding +@property(weak, nonatomic) SCLTextView *field; + +#pragma mark - Setters +@property(copy, nonatomic) SCLALertViewTextFieldBuilder *(^title) (NSString *title); +@end + +@implementation SCLALertViewTextFieldBuilder +-(SCLALertViewTextFieldBuilder *(^) (NSString *title))title { + if (!_title) { + __weak typeof(self) weakSelf = self; + _title = ^(NSString *title){ + weakSelf.parameterTitle = title; + return weakSelf; + }; + } + return _title; +} +@end + +@interface SCLALertViewButtonBuilder() + +#pragma mark - Parameters +@property(copy, nonatomic) NSString *parameterTitle; +@property(weak, nonatomic) id parameterTarget; +@property(assign, nonatomic) SEL parameterSelector; +@property(copy, nonatomic) void(^parameterActionBlock)(void); +@property(copy, nonatomic) BOOL(^parameterValidationBlock)(void); + +#pragma mark - Available later after adding +@property(weak, nonatomic) SCLButton *button; + +#pragma mark - Setters +@property(copy, nonatomic) SCLALertViewButtonBuilder *(^title) (NSString *title); +@property(copy, nonatomic) SCLALertViewButtonBuilder *(^target) (id target); +@property(copy, nonatomic) SCLALertViewButtonBuilder *(^selector) (SEL selector); +@property(copy, nonatomic) SCLALertViewButtonBuilder *(^actionBlock) (void(^actionBlock)(void)); +@property(copy, nonatomic) SCLALertViewButtonBuilder *(^validationBlock) (BOOL(^validationBlock)(void)); + +@end + +@implementation SCLALertViewButtonBuilder +-(SCLALertViewButtonBuilder *(^) (id title))title { + if (!_title) { + __weak typeof(self) weakSelf = self; + _title = ^(NSString *title){ + weakSelf.parameterTarget = title; + return weakSelf; + }; + } + return _title; +} +-(SCLALertViewButtonBuilder *(^) (id target))target { + if (!_target) { + __weak typeof(self) weakSelf = self; + _target = ^(id target){ + weakSelf.parameterTarget = target; + return weakSelf; + }; + } + return _target; +} +-(SCLALertViewButtonBuilder *(^) (SEL selector))selector { + if (!_selector) { + __weak typeof(self) weakSelf = self; + _selector = ^(SEL selector){ + weakSelf.parameterSelector = selector; + return weakSelf; + }; + } + return _selector; +} +-(SCLALertViewButtonBuilder *(^) (void(^actionBlock)(void)))actionBlock { + if (!_actionBlock) { + __weak typeof(self) weakSelf = self; + _actionBlock = ^(void(^actionBlock)(void)){ + weakSelf.parameterActionBlock = actionBlock; + return weakSelf; + }; + } + return _actionBlock; +} +-(SCLALertViewButtonBuilder *(^) (BOOL(^validationBlock)(void)))validationBlock { + if (!_validationBlock) { + __weak typeof(self) weakSelf = self; + _validationBlock = ^(BOOL(^validationBlock)(void)){ + weakSelf.parameterValidationBlock = validationBlock; + return weakSelf; + }; + } + return _validationBlock; +} +@end + + + @interface SCLAlertViewBuilder() @property (strong, nonatomic) SCLAlertView *alertView; @@ -1953,6 +2053,37 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { return _addButtonWithTarget; } +#pragma mark - Builders +-(SCLAlertViewBuilder *(^)(SCLALertViewButtonBuilder *builder))addButtonWithBuilder { + if (!_addButtonWithBuilder) { + __weak typeof(self) weakSelf = self; + _addButtonWithBuilder = ^(SCLALertViewButtonBuilder *builder){ + SCLButton *button = nil; + if (builder.parameterTarget && builder.parameterSelector) { + button = [weakSelf.alertView addButton:builder.parameterTitle target:builder.parameterTarget selector:builder.parameterSelector]; + } + else if (builder.parameterValidationBlock && builder.parameterActionBlock) { + button = [weakSelf.alertView addButton:builder.parameterTitle validationBlock:builder.parameterValidationBlock actionBlock:builder.parameterActionBlock]; + } + else if (builder.parameterActionBlock) { + button = [weakSelf.alertView addButton:builder.parameterTitle actionBlock:builder.parameterActionBlock]; + } + builder.button = button; + return weakSelf; + }; + } + return _addButtonWithBuilder; +} +-(SCLAlertViewBuilder *(^)(SCLALertViewTextFieldBuilder *builder))addTextFieldWithBuilder { + if (!_addTextFieldWithBuilder) { + __weak typeof(self) weakSelf = self; + _addTextFieldWithBuilder = ^(SCLALertViewTextFieldBuilder *builder){ + builder.field = [weakSelf.alertView addTextField:builder.parameterTitle]; + return weakSelf; + }; + } + return _addTextFieldWithBuilder; +} @end @interface SCLAlertViewShowBuilder() From a79bd7943904d87f4de01de3b31475496c5f4966 Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 15:10:04 +0300 Subject: [PATCH 113/250] fluent: fix parameter types --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index a150c0d..1d0479a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1612,7 +1612,7 @@ @interface SCLALertViewButtonBuilder() @end @implementation SCLALertViewButtonBuilder --(SCLALertViewButtonBuilder *(^) (id title))title { +-(SCLALertViewButtonBuilder *(^) (NSString *title))title { if (!_title) { __weak typeof(self) weakSelf = self; _title = ^(NSString *title){ From 173d06a5d79d2121ab9c2da94c3b6acf084c7c4e Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 15:26:16 +0300 Subject: [PATCH 114/250] fluent: misplaced parameter fix --- SCLAlertView/SCLAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 1d0479a..7e55620 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1616,7 +1616,7 @@ @implementation SCLALertViewButtonBuilder if (!_title) { __weak typeof(self) weakSelf = self; _title = ^(NSString *title){ - weakSelf.parameterTarget = title; + weakSelf.parameterTitle = title; return weakSelf; }; } From fb5a9f352d3bfc2f8142d7cbec6be84d69849fdd Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 15:38:53 +0300 Subject: [PATCH 115/250] readme: updated --- README.md | 37 +++++++++++++++++++++++++++++++++++++ SCLAlertView/SCLAlertView.h | 2 +- SCLAlertView/SCLAlertView.m | 4 ++-- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d7c9bb8..80abd9a 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,43 @@ SCLAlertViewShowBuilder *showBuilder = [SCLAlertViewShowBuilder new] [showBuilder showAlertView:builder.alertView onViewController:self.window.rootViewController]; ``` +####Complex +```Objective-C + NSString *title = @"Title"; + NSString *message = @"Message"; + NSString *cancel = @"Cancel"; + NSString *done = @"Done"; + + SCLALertViewTextFieldBuilder *textField = [SCLALertViewTextFieldBuilder new].title(@"Code"); + SCLALertViewButtonBuilder *doneButton = [SCLALertViewButtonBuilder new].title(done) + .validationBlock(^BOOL{ + NSString *code = [textField.textField.text copy]; + return [code isVisible]; + }) + .actionBlock(^{ + NSString *code = [textField.textField.text copy]; + [self confirmPhoneNumberWithCode:code]; + }); + + SCLAlertViewBuilder *builder = [SCLAlertViewBuilder new] + .showAnimationType(FadeIn) + .hideAnimationType(FadeOut) + .shouldDismissOnTapOutside(NO) + .addTextFieldWithBuilder(textField) + .addButtonWithBuilder(doneButton); + + SCLAlertViewShowBuilder *showBuilder = [SCLAlertViewShowBuilder new] + .style(Custom) + .image([SCLAlertViewStyleKit imageOfInfo]) + .color([UIColor blueColor]) + .title(title) + .subTitle(message) + .closeButtonTitle(cancel) + .duration(0.0f); + + [showBuilder showAlertView:builder.alertView onViewController:self]; +``` + ###Easy to use ```Objective-C // Get started diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index a76e8f5..afbaeca 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -476,7 +476,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @interface SCLALertViewTextFieldBuilder : NSObject #pragma mark - Available later after adding -@property(weak, nonatomic, readonly) SCLTextView *field; +@property(weak, nonatomic, readonly) SCLTextView *textField; #pragma mark - Setters @property(copy, nonatomic, readonly) SCLALertViewTextFieldBuilder *(^title) (NSString *title); diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 7e55620..21756e5 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1571,7 +1571,7 @@ @interface SCLALertViewTextFieldBuilder() @property(copy, nonatomic) NSString *parameterTitle; #pragma mark - Available later after adding -@property(weak, nonatomic) SCLTextView *field; +@property(weak, nonatomic) SCLTextView *textField; #pragma mark - Setters @property(copy, nonatomic) SCLALertViewTextFieldBuilder *(^title) (NSString *title); @@ -2078,7 +2078,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { if (!_addTextFieldWithBuilder) { __weak typeof(self) weakSelf = self; _addTextFieldWithBuilder = ^(SCLALertViewTextFieldBuilder *builder){ - builder.field = [weakSelf.alertView addTextField:builder.parameterTitle]; + builder.textField = [weakSelf.alertView addTextField:builder.parameterTitle]; return weakSelf; }; } From 613d26fae19536d8c43ae25904fead3eb7d7cbc9 Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 17:03:28 +0300 Subject: [PATCH 116/250] frames: constant title top continuous update fix --- SCLAlertView/SCLAlertView.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 21756e5..dac0316 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -310,6 +310,7 @@ - (void)viewWillLayoutSubviews } } + CGFloat titleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; if(!_usingNewWindow) { // Set new background frame @@ -336,8 +337,7 @@ - (void)viewWillLayoutSubviews _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); - kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; - _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); + _labelTitle.frame = CGRectMake(12.0f, titleTop, _windowWidth - 24.0f, kTitleHeight); } else { @@ -350,12 +350,11 @@ - (void)viewWillLayoutSubviews _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleViewBackground.frame = CGRectMake(x, y, kCircleHeightBackground, kCircleHeightBackground); _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); - kTitleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; - _labelTitle.frame = CGRectMake(12.0f + self.contentView.frame.origin.x, kTitleTop + self.contentView.frame.origin.y, _windowWidth - 24.0f, kTitleHeight); + _labelTitle.frame = CGRectMake(12.0f + self.contentView.frame.origin.x, titleTop + self.contentView.frame.origin.y, _windowWidth - 24.0f, kTitleHeight); } // Text fields - CGFloat y = (_labelTitle.text == nil) ? kTitleTop : kTitleTop + _labelTitle.frame.size.height; + CGFloat y = (_labelTitle.text == nil) ? titleTop : titleTop + _labelTitle.frame.size.height; _viewText.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, _subTitleHeight); y += _subTitleHeight + 14.0f; for (SCLTextView *textField in _inputs) From c1d4457900feb47a994a37863272c7656e7701b1 Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 19:12:12 +0300 Subject: [PATCH 117/250] fluent: show block added --- SCLAlertView/SCLAlertView.h | 3 ++- SCLAlertView/SCLAlertView.m | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index afbaeca..21b067c 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -448,7 +448,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @interface SCLAlertViewShowBuilder : NSObject -@property(strong, nonatomic, readonly) UIViewController *parameterViewController; +@property(weak, nonatomic, readonly) UIViewController *parameterViewController; @property(copy, nonatomic, readonly) UIImage *parameterImage; @property(copy, nonatomic, readonly) UIColor *parameterColor; @property(copy, nonatomic, readonly) NSString *parameterTitle; @@ -471,6 +471,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) - (void)showAlertView:(SCLAlertView *)alertView; - (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewController *)controller; +@property(copy, nonatomic, readonly) void (^show)(SCLAlertView *view, UIViewController *controller); @end @interface SCLALertViewTextFieldBuilder : NSObject diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 7e0a681..884aa13 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -2085,7 +2085,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { @end @interface SCLAlertViewShowBuilder() -@property(strong, nonatomic) UIViewController *parameterViewController; +@property(weak, nonatomic) UIViewController *parameterViewController; @property(copy, nonatomic) UIImage *parameterImage; @property(copy, nonatomic) UIColor *parameterColor; @property(copy, nonatomic) NSString *parameterTitle; @@ -2105,6 +2105,9 @@ @interface SCLAlertViewShowBuilder() @property(copy, nonatomic) SCLAlertViewShowBuilder *(^style)(SCLAlertViewStyle style); @property(copy, nonatomic) SCLAlertViewShowBuilder *(^closeButtonTitle)(NSString *closeButtonTitle); @property(copy, nonatomic) SCLAlertViewShowBuilder *(^duration)(NSTimeInterval duration); + +#pragma mark - Show +@property(copy, nonatomic) void (^show)(SCLAlertView *view, UIViewController *controller); @end @implementation SCLAlertViewShowBuilder @@ -2208,12 +2211,24 @@ - (void)showAlertView:(SCLAlertView *)alertView { } - (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewController *)controller { + UIViewController *targetController = controller ? controller : self.parameterViewController; + if (self.parameterImage || self.parameterColor) { - [alertView showTitle:controller image:self.parameterImage color:self.parameterColor title:self.parameterTitle subTitle:self.parameterSubTitle duration:self.parameterDuration completeText:self.parameterCloseButtonTitle style:self.parameterStyle]; + [alertView showTitle:targetController image:self.parameterImage color:self.parameterColor title:self.parameterTitle subTitle:self.parameterSubTitle duration:self.parameterDuration completeText:self.parameterCloseButtonTitle style:self.parameterStyle]; } else { - [alertView showTitle:controller title:self.parameterTitle subTitle:self.parameterSubTitle style:self.parameterStyle closeButtonTitle:self.parameterCloseButtonTitle duration:self.parameterDuration]; + [alertView showTitle:targetController title:self.parameterTitle subTitle:self.parameterSubTitle style:self.parameterStyle closeButtonTitle:self.parameterCloseButtonTitle duration:self.parameterDuration]; + } +} + +- (void (^)(SCLAlertView *view, UIViewController *controller))show { + if (!_show) { + __weak typeof(self) weakSelf = self; + _show = ^(SCLAlertView *view, UIViewController *controller) { + [weakSelf showAlertView:view onViewController:controller]; + }; } + return _show; } @end From a960f6f0cbaa846bbe429fcad39aadfe3bc28d37 Mon Sep 17 00:00:00 2001 From: Lobanov Dmitry Date: Sun, 6 Mar 2016 19:14:10 +0300 Subject: [PATCH 118/250] readme: updated --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 80abd9a..1675375 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ SCLAlertViewShowBuilder *showBuilder = [SCLAlertViewShowBuilder new] .subTitle(@"Subtitle") .duration(0); [showBuilder showAlertView:builder.alertView onViewController:self.window.rootViewController]; +// or even +showBuilder.show(builder.alertView, self.window.rootViewController); ``` ####Complex From d0bab8e775471686b3b524e8f75460b033f234fa Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 7 Mar 2016 00:38:01 -0300 Subject: [PATCH 119/250] Revert "frames: constant title top continuous update fix" --- SCLAlertView/SCLAlertView.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 884aa13..b222f38 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -309,7 +309,6 @@ - (void)viewWillLayoutSubviews } } - CGFloat titleTop = _useLargerIcon ? kTitleTop : kTitleTop + 4.0f; if(!_usingNewWindow) { // Set new background frame @@ -353,7 +352,7 @@ - (void)viewWillLayoutSubviews } // Text fields - CGFloat y = (_labelTitle.text == nil) ? titleTop : titleTop + _labelTitle.frame.size.height; + CGFloat y = (_labelTitle.text == nil) ? kTitleTop : kTitleTop + _labelTitle.frame.size.height; _viewText.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, _subTitleHeight); y += _subTitleHeight + 14.0f; for (SCLTextView *textField in _inputs) From 5388a7eead6f3e60801beb83eaf9d9a839864be7 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 7 Mar 2016 00:39:41 -0300 Subject: [PATCH 120/250] Revert sample button text --- SCLAlertViewExample/ViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index ee2233c..c3e8e2a 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -47,7 +47,7 @@ - (IBAction)showSuccess:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; - SCLButton *button = [alert addButton:@"You have not saved your Submission yet. Please save the Submission before accessing the Responses list. Blah de blah de blah, blah. Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah." target:self selector:@selector(firstButton)]; + SCLButton *button = [alert addButton:@"First Button" target:self selector:@selector(firstButton)]; button.buttonFormatBlock = ^NSDictionary* (void) { From e4c9f1fdba3f2d06fa6a354d18ca2b391e4d63d5 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 7 Mar 2016 00:44:24 -0300 Subject: [PATCH 121/250] Code formatting --- SCLAlertView/SCLAlertView.h | 2 +- SCLAlertView/SCLAlertView.m | 65 +++++++++++++++++++------------------ 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 21b067c..0c2f386 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -454,8 +454,8 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic, readonly) NSString *parameterTitle; @property(copy, nonatomic, readonly) NSString *parameterSubTitle; @property(copy, nonatomic, readonly) NSString *parameterCompleteText; -@property(assign, nonatomic, readonly) SCLAlertViewStyle parameterStyle; @property(copy, nonatomic, readonly) NSString *parameterCloseButtonTitle; +@property(assign, nonatomic, readonly) SCLAlertViewStyle parameterStyle; @property(assign, nonatomic, readonly) NSTimeInterval parameterDuration; #pragma mark - Setters diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index b222f38..d6c0a7c 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1575,7 +1575,7 @@ @interface SCLALertViewTextFieldBuilder() @end @implementation SCLALertViewTextFieldBuilder --(SCLALertViewTextFieldBuilder *(^) (NSString *title))title { +- (SCLALertViewTextFieldBuilder *(^) (NSString *title))title { if (!_title) { __weak typeof(self) weakSelf = self; _title = ^(NSString *title){ @@ -1609,7 +1609,7 @@ @interface SCLALertViewButtonBuilder() @end @implementation SCLALertViewButtonBuilder --(SCLALertViewButtonBuilder *(^) (NSString *title))title { +- (SCLALertViewButtonBuilder *(^) (NSString *title))title { if (!_title) { __weak typeof(self) weakSelf = self; _title = ^(NSString *title){ @@ -1619,7 +1619,7 @@ @implementation SCLALertViewButtonBuilder } return _title; } --(SCLALertViewButtonBuilder *(^) (id target))target { +- (SCLALertViewButtonBuilder *(^) (id target))target { if (!_target) { __weak typeof(self) weakSelf = self; _target = ^(id target){ @@ -1629,7 +1629,7 @@ @implementation SCLALertViewButtonBuilder } return _target; } --(SCLALertViewButtonBuilder *(^) (SEL selector))selector { +- (SCLALertViewButtonBuilder *(^) (SEL selector))selector { if (!_selector) { __weak typeof(self) weakSelf = self; _selector = ^(SEL selector){ @@ -1639,7 +1639,7 @@ @implementation SCLALertViewButtonBuilder } return _selector; } --(SCLALertViewButtonBuilder *(^) (void(^actionBlock)(void)))actionBlock { +- (SCLALertViewButtonBuilder *(^) (void(^actionBlock)(void)))actionBlock { if (!_actionBlock) { __weak typeof(self) weakSelf = self; _actionBlock = ^(void(^actionBlock)(void)){ @@ -1649,7 +1649,7 @@ @implementation SCLALertViewButtonBuilder } return _actionBlock; } --(SCLALertViewButtonBuilder *(^) (BOOL(^validationBlock)(void)))validationBlock { +- (SCLALertViewButtonBuilder *(^) (BOOL(^validationBlock)(void)))validationBlock { if (!_validationBlock) { __weak typeof(self) weakSelf = self; _validationBlock = ^(BOOL(^validationBlock)(void)){ @@ -1662,7 +1662,6 @@ @implementation SCLALertViewButtonBuilder @end - @interface SCLAlertViewBuilder() @property (strong, nonatomic) SCLAlertView *alertView; @@ -1672,6 +1671,7 @@ @interface SCLAlertViewBuilder() @implementation SCLAlertViewBuilder #pragma mark - Init + - (instancetype)init { self = [super init]; if (self) { @@ -1919,7 +1919,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } #pragma mark - Custom Setters --(SCLAlertViewBuilder *(^) (SCLDismissBlock dismissBlock))alertIsDismissed { +- (SCLAlertViewBuilder *(^) (SCLDismissBlock dismissBlock))alertIsDismissed { if (!_alertIsDismissed) { __weak typeof(self) weakSelf = self; _alertIsDismissed = ^(SCLDismissBlock dismissBlock) { @@ -1929,7 +1929,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _alertIsDismissed; } --(SCLAlertViewBuilder *(^) (void))removeTopCircle { +- (SCLAlertViewBuilder *(^) (void))removeTopCircle { if (!_removeTopCircle) { __weak typeof(self) weakSelf = self; _removeTopCircle = ^(void) { @@ -1939,7 +1939,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _removeTopCircle; } --(SCLAlertViewBuilder *(^) (UIView *view))addCustomView { +- (SCLAlertViewBuilder *(^) (UIView *view))addCustomView { if (!_addCustomView) { __weak typeof(self) weakSelf = self; _addCustomView = ^(UIView *view) { @@ -1949,7 +1949,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _addCustomView; } --(SCLAlertViewBuilder *(^) (NSString *title))addTextField { +- (SCLAlertViewBuilder *(^) (NSString *title))addTextField { if (!_addTextField) { __weak typeof(self) weakSelf = self; _addTextField = ^(NSString *title) { @@ -1959,7 +1959,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _addTextField; } --(SCLAlertViewBuilder *(^) (UITextField *textField))addCustomTextField { +- (SCLAlertViewBuilder *(^) (UITextField *textField))addCustomTextField { if (!_addCustomTextField) { __weak typeof(self) weakSelf = self; _addCustomTextField = ^(UITextField *textField) { @@ -1969,7 +1969,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _addCustomTextField; } --(SCLAlertViewBuilder *(^) (NSString *title))addSwitchViewWithLabelTitle { +- (SCLAlertViewBuilder *(^) (NSString *title))addSwitchViewWithLabelTitle { if (!_addSwitchViewWithLabelTitle) { __weak typeof(self) weakSelf = self; _addSwitchViewWithLabelTitle = ^(NSString *title) { @@ -1979,7 +1979,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _addSwitchViewWithLabelTitle; } --(SCLAlertViewBuilder *(^) (NSInteger buttonIndex, BOOL reverse))addTimerToButtonIndex { +- (SCLAlertViewBuilder *(^) (NSInteger buttonIndex, BOOL reverse))addTimerToButtonIndex { if (!_addTimerToButtonIndex) { __weak typeof(self) weakSelf = self; _addTimerToButtonIndex = ^(NSInteger buttonIndex, BOOL reverse) { @@ -1989,7 +1989,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _addTimerToButtonIndex; } --(SCLAlertViewBuilder *(^) (NSString *titleFontFamily, CGFloat size))setTitleFontFamily { +- (SCLAlertViewBuilder *(^) (NSString *titleFontFamily, CGFloat size))setTitleFontFamily { if (!_setTitleFontFamily) { __weak typeof(self) weakSelf = self; _setTitleFontFamily = ^(NSString *titleFontFamily, CGFloat size) { @@ -1999,7 +1999,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _setTitleFontFamily; } --(SCLAlertViewBuilder *(^) (NSString *bodyTextFontFamily, CGFloat size))setBodyTextFontFamily { +- (SCLAlertViewBuilder *(^) (NSString *bodyTextFontFamily, CGFloat size))setBodyTextFontFamily { if (!_setBodyTextFontFamily) { __weak typeof(self) weakSelf = self; _setBodyTextFontFamily = ^(NSString *bodyTextFontFamily, CGFloat size) { @@ -2009,7 +2009,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _setBodyTextFontFamily; } --(SCLAlertViewBuilder *(^) (NSString *buttonsFontFamily, CGFloat size))setButtonsTextFontFamily { +- (SCLAlertViewBuilder *(^) (NSString *buttonsFontFamily, CGFloat size))setButtonsTextFontFamily { if (!_setButtonsTextFontFamily) { __weak typeof(self) weakSelf = self; _setButtonsTextFontFamily = ^(NSString *buttonsFontFamily, CGFloat size) { @@ -2019,7 +2019,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _setButtonsTextFontFamily; } --(SCLAlertViewBuilder *(^) (NSString *title, SCLActionBlock action))addButtonWithActionBlock { +- (SCLAlertViewBuilder *(^) (NSString *title, SCLActionBlock action))addButtonWithActionBlock { if (!_addButtonWithActionBlock) { __weak typeof(self) weakSelf = self; _addButtonWithActionBlock = ^(NSString *title, SCLActionBlock action) { @@ -2029,7 +2029,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _addButtonWithActionBlock; } --(SCLAlertViewBuilder *(^) (NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action))addButtonWithValidationBlock { +- (SCLAlertViewBuilder *(^) (NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action))addButtonWithValidationBlock { if (!_addButtonWithValidationBlock) { __weak typeof(self) weakSelf = self; _addButtonWithValidationBlock = ^(NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action) { @@ -2039,7 +2039,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _addButtonWithValidationBlock; } --(SCLAlertViewBuilder *(^) (NSString *title, id target, SEL selector))addButtonWithTarget { +- (SCLAlertViewBuilder *(^) (NSString *title, id target, SEL selector))addButtonWithTarget { if (!_addButtonWithTarget) { __weak typeof(self) weakSelf = self; _addButtonWithTarget = ^(NSString *title, id target, SEL selector) { @@ -2051,7 +2051,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } #pragma mark - Builders --(SCLAlertViewBuilder *(^)(SCLALertViewButtonBuilder *builder))addButtonWithBuilder { +- (SCLAlertViewBuilder *(^)(SCLALertViewButtonBuilder *builder))addButtonWithBuilder { if (!_addButtonWithBuilder) { __weak typeof(self) weakSelf = self; _addButtonWithBuilder = ^(SCLALertViewButtonBuilder *builder){ @@ -2071,7 +2071,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _addButtonWithBuilder; } --(SCLAlertViewBuilder *(^)(SCLALertViewTextFieldBuilder *builder))addTextFieldWithBuilder { +- (SCLAlertViewBuilder *(^)(SCLALertViewTextFieldBuilder *builder))addTextFieldWithBuilder { if (!_addTextFieldWithBuilder) { __weak typeof(self) weakSelf = self; _addTextFieldWithBuilder = ^(SCLALertViewTextFieldBuilder *builder){ @@ -2084,14 +2084,15 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { @end @interface SCLAlertViewShowBuilder() + @property(weak, nonatomic) UIViewController *parameterViewController; @property(copy, nonatomic) UIImage *parameterImage; @property(copy, nonatomic) UIColor *parameterColor; @property(copy, nonatomic) NSString *parameterTitle; @property(copy, nonatomic) NSString *parameterSubTitle; @property(copy, nonatomic) NSString *parameterCompleteText; -@property(assign, nonatomic) SCLAlertViewStyle parameterStyle; @property(copy, nonatomic) NSString *parameterCloseButtonTitle; +@property(assign, nonatomic) SCLAlertViewStyle parameterStyle; @property(assign, nonatomic) NSTimeInterval parameterDuration; #pragma mark - Setters @@ -2113,7 +2114,7 @@ @implementation SCLAlertViewShowBuilder #pragma mark - Setters --(SCLAlertViewShowBuilder *(^)(UIViewController *viewController))viewController { +- (SCLAlertViewShowBuilder *(^)(UIViewController *viewController))viewController { if (!_viewController) { __weak typeof(self) weakSelf = self; _viewController = ^(UIViewController *viewController){ @@ -2123,7 +2124,7 @@ @implementation SCLAlertViewShowBuilder } return _viewController; } --(SCLAlertViewShowBuilder *(^)(UIImage *image))image { +- (SCLAlertViewShowBuilder *(^)(UIImage *image))image { if (!_image) { __weak typeof(self) weakSelf = self; _image = ^(UIImage *image) { @@ -2133,7 +2134,7 @@ @implementation SCLAlertViewShowBuilder } return _image; } --(SCLAlertViewShowBuilder *(^)(UIColor *color))color { +- (SCLAlertViewShowBuilder *(^)(UIColor *color))color { if (!_color) { __weak typeof(self) weakSelf = self; _color = ^(UIColor *color) { @@ -2143,7 +2144,7 @@ @implementation SCLAlertViewShowBuilder } return _color; } --(SCLAlertViewShowBuilder *(^)(NSString *title))title { +- (SCLAlertViewShowBuilder *(^)(NSString *title))title { if (!_title) { __weak typeof(self) weakSelf = self; _title = ^(NSString *title){ @@ -2153,7 +2154,7 @@ @implementation SCLAlertViewShowBuilder } return _title; } --(SCLAlertViewShowBuilder *(^)(NSString *subTitle))subTitle { +- (SCLAlertViewShowBuilder *(^)(NSString *subTitle))subTitle { if (!_subTitle) { __weak typeof(self) weakSelf = self; _subTitle = ^(NSString *subTitle){ @@ -2163,7 +2164,7 @@ @implementation SCLAlertViewShowBuilder } return _subTitle; } --(SCLAlertViewShowBuilder *(^)(NSString *completeText))completeText { +- (SCLAlertViewShowBuilder *(^)(NSString *completeText))completeText { if (!_completeText) { __weak typeof(self) weakSelf = self; _completeText = ^(NSString *completeText){ @@ -2174,7 +2175,7 @@ @implementation SCLAlertViewShowBuilder return _completeText; } --(SCLAlertViewShowBuilder *(^)(SCLAlertViewStyle style))style { +- (SCLAlertViewShowBuilder *(^)(SCLAlertViewStyle style))style { if (!_style) { __weak typeof(self) weakSelf = self; _style = ^(SCLAlertViewStyle style){ @@ -2184,7 +2185,7 @@ @implementation SCLAlertViewShowBuilder } return _style; } --(SCLAlertViewShowBuilder *(^)(NSString *closeButtonTitle))closeButtonTitle { +- (SCLAlertViewShowBuilder *(^)(NSString *closeButtonTitle))closeButtonTitle { if (!_closeButtonTitle) { __weak typeof(self) weakSelf = self; _closeButtonTitle = ^(NSString *closeButtonTitle){ @@ -2194,7 +2195,7 @@ @implementation SCLAlertViewShowBuilder } return _closeButtonTitle; } --(SCLAlertViewShowBuilder *(^)(NSTimeInterval duration))duration { +- (SCLAlertViewShowBuilder *(^)(NSTimeInterval duration))duration { if (!_duration) { __weak typeof(self) weakSelf = self; _duration = ^(NSTimeInterval duration){ From 8f0b6de25143d62178110cc6ee5fde44903e0824 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 7 Mar 2016 12:22:21 -0300 Subject: [PATCH 122/250] bump version --- 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 4be9550..1decb92 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.9.3" + spec.version = "1.0.0" 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" From b333e49a806112c9d4f1ffa856d4dabc7c6f5f12 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 7 Mar 2016 12:37:22 -0300 Subject: [PATCH 123/250] Update README.md --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1675375..d413458 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,9 @@ Animated Alert View written in Swift but ported to Objective-C, which can be use ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot6.png) ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot7.png) -###Modern +###Fluent style ```Objective-C -//Fluent style SCLAlertViewBuilder *builder = [SCLAlertViewBuilder new] .addButtonWithActionBlock(@"Send", ^{ /*work here*/ }); @@ -197,6 +196,7 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert showWaiting:self title:@"Waiting..." subTitle:@"Blah de blah de blah, blah. Blah de blah de" closeButtonTitle:nil duration:5.0f]; ``` + ###Add a switch button ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -211,6 +211,18 @@ switchView.tintColor = [UIColor brownColor]; [alert showCustom:self image:[UIImage imageNamed:@"switch"] color:[UIColor brownColor] title:kInfoTitle subTitle:kSubtitle closeButtonTitle:nil duration:0.0f]; ``` +###Add custom view +```Objective-C +SCLAlertView *alert = [[SCLAlertView alloc] init]; + +UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 215.0f, 80.0f)]; +customView.backgroundColor = [UIColor redColor]; + +[alert addCustomView:customView]; + +[alert showNotice:self title:@"Title" subTitle:@"This alert view shows a custom view" closeButtonTitle:@"Done" duration:0.0f]; +``` + ###SCLAlertView properties ```Objective-C //Dismiss on tap outside (Default is NO) From 986ae00d9eaadf34efe8f3ab5be784a9054379aa Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 8 Mar 2016 16:06:51 -0300 Subject: [PATCH 124/250] Fix alert subtile position when the title label is nil (large icon only) --- SCLAlertView/SCLAlertView.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index d6c0a7c..ffc20ed 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -289,6 +289,10 @@ - (void)viewWillLayoutSubviews // Reposition inner circle appropriately CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); + if (_labelTitle.text == nil) + { + kTitleTop = kCircleHeightBackground / 2; + } } else { kCircleBackgroundTopPosition = -(kCircleHeightBackground / 2); } From afdb885a6dae3de77f246b197e372f74b8356371 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 8 Mar 2016 16:10:35 -0300 Subject: [PATCH 125/250] bump version --- 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 1decb92..8e768b1 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 = "1.0.0" + spec.version = "1.0.1" 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" From 8fd27306ffce22a8a207320c4eccbade4b27c863 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 16 Mar 2016 15:43:43 -0300 Subject: [PATCH 126/250] Update circle background view corner radius properly Update contentView size properly --- SCLAlertView/SCLAlertView.m | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index ffc20ed..1839dc3 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -169,6 +169,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth self.hideAnimationType = FadeOut; self.showAnimationType = SlideInFromTop; self.backgroundType = Shadow; + self.tintTopCircle = YES; // Font _titleFontFamily = @"HelveticaNeue"; @@ -195,15 +196,19 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth [self.view addSubview:_circleViewBackground]; // Circle View - _tintTopCircle = YES; - _circleViewBackground.backgroundColor = [UIColor whiteColor]; - _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; + + // Circle Background View + _circleViewBackground.backgroundColor = [UIColor whiteColor]; + _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; x = (kCircleHeight - _circleIconHeight) / 2; + + // Circle Image View _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); - _circleIconImageView.contentMode = UIViewContentModeScaleAspectFill; + _circleIconImageView.contentMode = UIViewContentModeScaleAspectFill; + [_circleViewBackground addSubview:_circleView]; [_circleView addSubview:_circleIconImageView]; @@ -279,7 +284,6 @@ - (void)viewWillLayoutSubviews if (_useLargerIcon) { // Adjust icon _circleIconHeight = 70.0f; - _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; // Adjust coordinate variables for larger sized top circle kCircleBackgroundTopPosition = -61.0f; @@ -337,6 +341,7 @@ - (void)viewWillLayoutSubviews self.view.frame = r; _contentView.frame = CGRectMake(0.0f, 0.0f, _windowWidth, _windowHeight); _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); + _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); @@ -351,6 +356,7 @@ - (void)viewWillLayoutSubviews x = (sz.width - kCircleHeightBackground) / 2; _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleViewBackground.frame = CGRectMake(x, y, kCircleHeightBackground, kCircleHeightBackground); + _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); _labelTitle.frame = CGRectMake(12.0f + self.contentView.frame.origin.x, kTitleTop + self.contentView.frame.origin.y, _windowWidth - 24.0f, kTitleHeight); } @@ -382,6 +388,7 @@ - (void)viewWillLayoutSubviews // Adapt window height according to icon size self.windowHeight = _useLargerIcon ? y : self.windowHeight; + _contentView.frame = CGRectMake(_contentView.frame.origin.x, _contentView.frame.origin.y, _windowWidth, _windowHeight); // Adjust corner radius, if a value has been passed _contentView.layer.cornerRadius = self.cornerRadius ? self.cornerRadius : 5.0f; From 495c5d806c37c8ff4988179fc0c02944feff52f9 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 16 Mar 2016 15:47:02 -0300 Subject: [PATCH 127/250] Bump version --- 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 8e768b1..ac40b16 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 = "1.0.1" + spec.version = "1.0.2" 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" From ce977a999c85c306b522cf58cc17f9c1b939a185 Mon Sep 17 00:00:00 2001 From: AmitaiB Date: Thu, 31 Mar 2016 23:47:14 -0400 Subject: [PATCH 128/250] Adds show/hide AnimationTypes -SimplyAppear- and -SimplyDisappear- i.e., None --- SCLAlertView/SCLAlertView.h | 6 ++++-- SCLAlertView/SCLAlertView.m | 32 ++++++++++++++++++++++++++++ SCLAlertViewExample/ViewController.m | 6 +++--- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 0c2f386..d5ef469 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -50,7 +50,8 @@ typedef NS_ENUM(NSInteger, SCLAlertViewHideAnimation) SlideOutToLeft, SlideOutToRight, SlideOutToCenter, - SlideOutFromCenter + SlideOutFromCenter, + SimplyDisappear }; /** Alert show animation styles @@ -65,7 +66,8 @@ typedef NS_ENUM(NSInteger, SCLAlertViewShowAnimation) SlideInFromLeft, SlideInFromRight, SlideInFromCenter, - SlideInToCenter + SlideInToCenter, + SimplyAppear }; /** Alert background styles diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 1839dc3..a0bf244 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1245,6 +1245,10 @@ - (void)showView case SlideInToCenter: [self slideInToCenter]; break; + + case SimplyAppear: + [self simplyAppear]; + break; } } @@ -1281,6 +1285,10 @@ - (void)hideView case SlideOutFromCenter: [self slideOutFromCenter]; break; + + case SimplyDisappear: + [self simplyDisappear]; + break; } if (_activityIndicatorView) @@ -1399,6 +1407,18 @@ - (void)slideOutFromCenter }]; } +- (void)simplyDisappear +{ + self.backgroundView.alpha = _backgroundOpacity; + self.view.alpha = 1.0f; + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + self.backgroundView.alpha = 0.0f; + self.view.alpha = 0.0f; + }); +} + + #pragma mark - Show Animations - (void)fadeIn @@ -1572,6 +1592,18 @@ - (void)slideInToCenter }]; } +- (void)simplyAppear +{ + self.backgroundView.alpha = 0.0f; + self.view.alpha = 0.0f; + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + self.backgroundView.alpha = _backgroundOpacity; + self.view.alpha = 1.0f; + }); +} + + @end @interface SCLALertViewTextFieldBuilder() diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index c3e8e2a..6caeb0e 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -84,7 +84,7 @@ - (IBAction)showNotice:(id)sender SCLAlertView *alert = [[SCLAlertView alloc] init]; alert.backgroundType = Blur; - + alert.showAnimationType = FadeIn; [alert showNotice:self title:kNoticeTitle subTitle:@"You've just displayed this awesome Pop Up View with blur effect" closeButtonTitle:kButtonTitle duration:0.0f]; } @@ -100,7 +100,7 @@ - (IBAction)showInfo:(id)sender SCLAlertView *alert = [[SCLAlertView alloc] init]; alert.shouldDismissOnTapOutside = YES; - + alert.showAnimationType = SimplyAppear; [alert alertIsDismissed:^{ NSLog(@"SCLAlertView dismissed!"); }]; @@ -113,7 +113,7 @@ - (IBAction)showEdit:(id)sender SCLAlertView *alert = [[SCLAlertView alloc] init]; SCLTextView *textField = [alert addTextField:@"Enter your name"]; - + alert.hideAnimationType = SimplyDisappear; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); }]; From 5d8ae7b2f82b26dbffa12752d7dd268ff697faa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Antonio=20Espi=CC=81n=20Mora?= Date: Fri, 29 Apr 2016 12:31:54 +0200 Subject: [PATCH 129/250] Feature to show buttons horizontally. --- SCLAlertView/SCLAlertView.h | 6 ++++++ SCLAlertView/SCLAlertView.m | 29 ++++++++++++++++++++++++----- SCLAlertView/SCLButton.h | 8 ++++++++ SCLAlertView/SCLButton.m | 8 ++++++++ 4 files changed, 46 insertions(+), 5 deletions(-) mode change 100644 => 100755 SCLAlertView/SCLButton.h mode change 100644 => 100755 SCLAlertView/SCLButton.m diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index d5ef469..36d2f63 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -222,6 +222,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ @property (nonatomic) UIStatusBarStyle statusBarStyle; +/** Set horizontal alignment for buttons + * + * Horizontal aligment instead of vertically if YES + */ +@property (nonatomic) BOOL horizontalButtons; + /** Initialize SCLAlertView using a new window. * * Init with new window diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index a0bf244..db88e0f 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -380,10 +380,17 @@ - (void)viewWillLayoutSubviews } // Buttons + CGFloat x = 12.0f; for (SCLButton *btn in _buttons) { - btn.frame = CGRectMake(12.0f, y, btn.frame.size.width, btn.frame.size.height); - y += btn.frame.size.height + 10.0f; + btn.frame = CGRectMake(x, y, btn.frame.size.width, btn.frame.size.height); + + // Add horizontal or vertical offset acording on _horizontalButtons parameter + if (_horizontalButtons) { + x += btn.frame.size.width + 10.0f; + } else { + y += btn.frame.size.height + 10.0f; + } } // Adapt window height according to icon size @@ -684,12 +691,24 @@ - (SCLButton *)addButton:(NSString *)title [btn setTitle:title forState:UIControlStateNormal]; btn.titleLabel.font = [UIFont fontWithName:_buttonsFontFamily size:_buttonsFontSize]; - // Update view height - self.windowHeight += (btn.frame.size.height + ADD_BUTTON_PADDING); - [_contentView addSubview:btn]; [_buttons addObject:btn]; + if (_horizontalButtons) { + // Update buttons width according to the number of buttons + for (SCLButton *bttn in _buttons) { + [bttn adjustWidthWithWindowWidth:self.windowWidth numberOfButtons:[_buttons count]]; + } + + // Update view height + if (!([_buttons count] > 1)) { + self.windowHeight += (btn.frame.size.height + ADD_BUTTON_PADDING); + } + } else { + // Update view height + self.windowHeight += (btn.frame.size.height + ADD_BUTTON_PADDING); + } + return btn; } diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h old mode 100644 new mode 100755 index 8a46e46..b19ed77 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -98,4 +98,12 @@ typedef NS_ENUM(NSInteger, SCLActionType) */ - (instancetype)initWithWindowWidth:(CGFloat)windowWidth; +/** Adjust width of the button according to the width of the alert and + * the number of buttons. Only used when buttons are horizontally aligned. + * + * @param windowWith The width of the alert. + * @param numberOfButtons The number of buttons in the alert. + */ +- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidht numberOfButtons:(NSUInteger)numberOfButtons; + @end diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m old mode 100644 new mode 100755 index cd84c15..2288ea6 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -63,6 +63,14 @@ - (void)setupWithWindowWidth:(CGFloat)windowWidth self.layer.cornerRadius = 3.0f; } +- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidht numberOfButtons:(NSUInteger)numberOfButtons +{ + CGFloat allButtonsWidth = windowWidht - (MARGIN_BUTTON * 2); + CGFloat buttonWidth = (allButtonsWidth - ((numberOfButtons - 1) * 10)) / numberOfButtons; + + self.frame = CGRectMake(0.0f, 0.0f, buttonWidth, MIN_HEIGHT); +} + - (void)setTitle:(NSString *)title forState:(UIControlState)state { [super setTitle:title forState:state]; From 5c6e3c6be1df5709390732ef34f6fb963c737f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Antonio=20Espi=CC=81n=20Mora?= Date: Fri, 29 Apr 2016 13:50:25 +0200 Subject: [PATCH 130/250] Added an example using horizontal buttons. --- .../Base.lproj/Storyboard.storyboard | 61 +++++++++++-------- SCLAlertViewExample/ViewController.h | 1 + SCLAlertViewExample/ViewController.m | 27 ++++++++ 3 files changed, 64 insertions(+), 25 deletions(-) diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index 7c01a6e..f788db6 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -1,8 +1,8 @@ - + - + @@ -32,8 +32,17 @@ + + - + + + - + + + @@ -169,23 +189,14 @@ - - - diff --git a/SCLAlertViewExample/ViewController.h b/SCLAlertViewExample/ViewController.h index 81de180..4ba5548 100644 --- a/SCLAlertViewExample/ViewController.h +++ b/SCLAlertViewExample/ViewController.h @@ -11,6 +11,7 @@ @interface ViewController : UIViewController - (IBAction)showSuccess:(id)sender; +- (IBAction)showSuccessWithHorizontalButtons:(id)sender; - (IBAction)showError:(id)sender; - (IBAction)showNotice:(id)sender; - (IBAction)showWarning:(id)sender; diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 6caeb0e..4a7bef9 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -70,6 +70,33 @@ - (IBAction)showSuccess:(id)sender [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } +- (IBAction)showSuccessWithHorizontalButtons:(id)sender { + SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; + [alert setHorizontalButtons:YES]; + + SCLButton *button = [alert addButton:@"First Button" target:self selector:@selector(firstButton)]; + + button.buttonFormatBlock = ^NSDictionary* (void) + { + NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; + + buttonConfig[@"backgroundColor"] = [UIColor whiteColor]; + buttonConfig[@"textColor"] = [UIColor blackColor]; + buttonConfig[@"borderWidth"] = @2.0f; + buttonConfig[@"borderColor"] = [UIColor greenColor]; + + return buttonConfig; + }; + + [alert addButton:@"Second Button" actionBlock:^(void) { + NSLog(@"Second button tapped"); + }]; + + alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_answer.mp3", [NSBundle mainBundle].resourcePath]]; + + [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; +} + - (IBAction)showError:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; From 8081a2eb70b709d14ed9cde9dd44e589dd5114c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Antonio=20Espi=CC=81n=20Mora?= Date: Fri, 29 Apr 2016 18:20:22 +0200 Subject: [PATCH 131/250] Added more examples with horizontal buttons. Fixed some issues with constraints and the scroll view. --- .../Base.lproj/Storyboard.storyboard | 389 ++++++++++-------- SCLAlertViewExample/ViewController.h | 3 + SCLAlertViewExample/ViewController.m | 121 ++++++ 3 files changed, 332 insertions(+), 181 deletions(-) diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index f788db6..575a677 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -14,200 +14,227 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + diff --git a/SCLAlertViewExample/ViewController.h b/SCLAlertViewExample/ViewController.h index 4ba5548..8aff9e1 100644 --- a/SCLAlertViewExample/ViewController.h +++ b/SCLAlertViewExample/ViewController.h @@ -17,8 +17,11 @@ - (IBAction)showWarning:(id)sender; - (IBAction)showInfo:(id)sender; - (IBAction)showEdit:(id)sender; +- (IBAction)showEditWithHorizontalButtons:(id)sender; +- (IBAction)ShowAdvancedWithHorizontalButtons:(id)sender; - (IBAction)showCustom:(id)sender; - (IBAction)showValidation:(id)sender; +- (IBAction)showValidationWithHorizontalButtons:(id)sender; - (IBAction)showWaiting:(id)sender; @end diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 4a7bef9..53c2eb6 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -148,6 +148,20 @@ - (IBAction)showEdit:(id)sender [alert showEdit:self title:kInfoTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } +- (IBAction)showEditWithHorizontalButtons:(id)sender +{ + SCLAlertView *alert = [[SCLAlertView alloc] init]; + [alert setHorizontalButtons:YES]; + + SCLTextView *textField = [alert addTextField:@"Enter your name"]; + alert.hideAnimationType = SimplyDisappear; + [alert addButton:@"Show Name" actionBlock:^(void) { + NSLog(@"Text value: %@", textField.text); + }]; + + [alert showEdit:self title:kInfoTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; +} + - (IBAction)showAdvanced:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -201,6 +215,60 @@ - (IBAction)showAdvanced:(id)sender [alert showTitle:self title:@"Congratulations" subTitle:kAttributeTitle style:Success closeButtonTitle:@"Done" duration:0.0f]; } +- (IBAction)ShowAdvancedWithHorizontalButtons:(id)sender +{ + SCLAlertView *alert = [[SCLAlertView alloc] init]; + [alert setHorizontalButtons:YES]; + + alert.backgroundViewColor = [UIColor cyanColor]; + + [alert setTitleFontFamily:@"Superclarendon" withSize:20.0f]; + [alert setBodyTextFontFamily:@"TrebuchetMS" withSize:14.0f]; + [alert setButtonsTextFontFamily:@"Baskerville" withSize:14.0f]; + + [alert addButton:@"First Button" target:self selector:@selector(firstButton)]; + + [alert addButton:@"Second Button" actionBlock:^(void) { + NSLog(@"Second button tapped"); + }]; + + SCLTextView *textField = [alert addTextField:@"Enter your name"]; + + [alert addButton:@"Show Name" actionBlock:^(void) { + NSLog(@"Text value: %@", textField.text); + }]; + + alert.completeButtonFormatBlock = ^NSDictionary* (void) + { + NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; + + buttonConfig[@"backgroundColor"] = [UIColor greenColor]; + buttonConfig[@"borderColor"] = [UIColor blackColor]; + buttonConfig[@"borderWidth"] = @"1.0f"; + buttonConfig[@"textColor"] = [UIColor blackColor]; + + return buttonConfig; + }; + + alert.attributedFormatBlock = ^NSAttributedString* (NSString *value) + { + NSMutableAttributedString *subTitle = [[NSMutableAttributedString alloc]initWithString:value]; + + NSRange redRange = [value rangeOfString:@"Attributed" options:NSCaseInsensitiveSearch]; + [subTitle addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:redRange]; + + NSRange greenRange = [value rangeOfString:@"successfully" options:NSCaseInsensitiveSearch]; + [subTitle addAttribute:NSForegroundColorAttributeName value:[UIColor brownColor] range:greenRange]; + + NSRange underline = [value rangeOfString:@"completed" options:NSCaseInsensitiveSearch]; + [subTitle addAttributes:@{NSUnderlineStyleAttributeName:@(NSUnderlineStyleSingle)} range:underline]; + + return subTitle; + }; + + [alert showTitle:self title:@"Congratulations" subTitle:kAttributeTitle style:Success closeButtonTitle:@"Done" duration:0.0f]; +} + - (IBAction)showWithDuration:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -268,6 +336,59 @@ - (IBAction)showValidation:(id)sender [alert showEdit:self title:@"Validation" subTitle:@"Ensure the data is correct before dismissing!" closeButtonTitle:@"Cancel" duration:0]; } +- (IBAction)showValidationWithHorizontalButtons:(id)sender +{ + SCLAlertView *alert = [[SCLAlertView alloc] init]; + [alert setHorizontalButtons:YES]; + + SCLTextView *evenField = [alert addTextField:@"Enter an even number"]; + evenField.keyboardType = UIKeyboardTypeNumberPad; + + SCLTextView *oddField = [alert addTextField:@"Enter an odd number"]; + oddField.keyboardType = UIKeyboardTypeNumberPad; + + [alert addButton:@"Test Validation" validationBlock:^BOOL{ + if (evenField.text.length == 0) + { + [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"You forgot to add an even number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + [evenField becomeFirstResponder]; + return NO; + } + + if (oddField.text.length == 0) + { + [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"You forgot to add an odd number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + [oddField becomeFirstResponder]; + return NO; + } + + NSInteger evenFieldEntry = (evenField.text).integerValue; + BOOL evenFieldPassedValidation = evenFieldEntry % 2 == 0; + + if (!evenFieldPassedValidation) + { + [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"That is not an even number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + [evenField becomeFirstResponder]; + return NO; + } + + NSInteger oddFieldEntry = (oddField.text).integerValue; + BOOL oddFieldPassedValidation = oddFieldEntry % 2 == 1; + + if (!oddFieldPassedValidation) + { + [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"That is not an odd number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + [oddField becomeFirstResponder]; + return NO; + } + return YES; + } actionBlock:^{ + [[[UIAlertView alloc] initWithTitle:@"Great Job!" message:@"Thanks for playing." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + }]; + + [alert showEdit:self title:@"Validation" subTitle:@"Ensure the data is correct before dismissing!" closeButtonTitle:@"Cancel" duration:0]; +} + - (IBAction)showWaiting:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; From bcc23c66d2e4def9c35bc6c724cefeadaafa159e Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 3 May 2016 17:49:29 -0300 Subject: [PATCH 132/250] Bump version --- 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 ac40b16..1ce8100 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 = "1.0.2" + spec.version = "1.0.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" From 9a61c4cfda2bf102c861760615e43355d9adfe9d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 1 Jun 2016 09:57:30 -0300 Subject: [PATCH 133/250] Add UI_APPEARANCE_SELECTOR to SCLSwitchView Code formatting Update SCLSwitchView example --- SCLAlertView/SCLSwitchView.h | 8 ++++---- SCLAlertView/SCLSwitchView.m | 27 ++++++++++++++++++--------- SCLAlertView/SCLTimerDisplay.h | 2 +- SCLAlertViewExample/ViewController.m | 4 ++-- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/SCLAlertView/SCLSwitchView.h b/SCLAlertView/SCLSwitchView.h index 4ebd3dc..f318da9 100644 --- a/SCLAlertView/SCLSwitchView.h +++ b/SCLAlertView/SCLSwitchView.h @@ -14,10 +14,10 @@ @interface SCLSwitchView : UIView -@property (strong, nonatomic) UIColor *tintColor; -@property (strong, nonatomic) UIColor *labelColor; -@property (strong, nonatomic) UIFont *labelFont; -@property (strong, nonatomic) NSString *labelText; +@property (strong, nonatomic) UIColor *tintColor UI_APPEARANCE_SELECTOR; +@property (strong, nonatomic) UIColor *labelColor UI_APPEARANCE_SELECTOR; +@property (strong, nonatomic) UIFont *labelFont UI_APPEARANCE_SELECTOR; +@property (strong, nonatomic) NSString *labelText UI_APPEARANCE_SELECTOR; @property (nonatomic, getter=isSelected) BOOL selected; @end diff --git a/SCLAlertView/SCLSwitchView.m b/SCLAlertView/SCLSwitchView.m index 44c0fd5..1cfea4b 100644 --- a/SCLAlertView/SCLSwitchView.m +++ b/SCLAlertView/SCLSwitchView.m @@ -85,41 +85,50 @@ - (void)setup #pragma mark - Getters -- (UIColor *)tintColor { +- (UIColor *)tintColor +{ return self.switchKnob.tintColor; } -- (UIColor *)labelColor { +- (UIColor *)labelColor +{ return self.switchLabel.textColor; } -- (UIFont *)labelFont { +- (UIFont *)labelFont +{ return self.switchLabel.font; } -- (NSString *)labelText { +- (NSString *)labelText +{ return self.switchLabel.text; } -- (BOOL)isSelected { +- (BOOL)isSelected +{ return self.switchKnob.isOn; } #pragma mark - Setters -- (void)setTintColor:(UIColor *)tintColor { +- (void)setTintColor:(UIColor *)tintColor +{ self.switchKnob.onTintColor = tintColor; } -- (void)setLabelColor:(UIColor *)labelColor { +- (void)setLabelColor:(UIColor *)labelColor +{ self.switchLabel.textColor = labelColor; } -- (void)setLabelFont:(UIFont *)labelFont { +- (void)setLabelFont:(UIFont *)labelFont +{ self.switchLabel.font = labelFont; } -- (void)setLabelText:(NSString *)labelText { +- (void)setLabelText:(NSString *)labelText +{ self.switchLabel.text = labelText; } diff --git a/SCLAlertView/SCLTimerDisplay.h b/SCLAlertView/SCLTimerDisplay.h index cff2d7a..1e37cfd 100644 --- a/SCLAlertView/SCLTimerDisplay.h +++ b/SCLAlertView/SCLTimerDisplay.h @@ -14,7 +14,7 @@ #endif #import "SCLButton.h" -@interface SCLTimerDisplay : UIView{ +@interface SCLTimerDisplay : UIView { CGFloat currentAngle; CGFloat currentTime; CGFloat timerLimit; diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 53c2eb6..109ecf9 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -426,8 +426,8 @@ - (IBAction)showSwitch:(id)sender { alert.useLargerIcon = YES; alert.cornerRadius = 13.0f; - SCLSwitchView *switchView = [alert addSwitchViewWithLabel:@"Don't show again".uppercaseString]; - switchView.tintColor = [UIColor brownColor]; + [alert addSwitchViewWithLabel:@"Don't show again".uppercaseString]; + [[SCLSwitchView appearance] setTintColor:[UIColor redColor]]; SCLButton *button = [alert addButton:@"Done" target:self selector:@selector(firstButton)]; From 0fc29b02de16f1544daadbf6f50fa38138f12f4e Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 1 Jun 2016 10:20:53 -0300 Subject: [PATCH 134/250] Update Copyright Fix SCLSwitchView example Add UI_APPEARANCE_SELECTOR to SCLButton --- SCLAlertView/SCLButton.h | 2 +- SCLAlertView/SCLMacros.h | 2 +- SCLAlertView/SCLSwitchView.h | 2 +- SCLAlertView/SCLTextView.h | 2 +- SCLAlertView/SCLTimerDisplay.h | 2 +- SCLAlertViewExample/ViewController.m | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index b19ed77..6755078 100755 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -65,7 +65,7 @@ typedef NS_ENUM(NSInteger, SCLActionType) * * Set SCLButton color. */ -@property (nonatomic, strong) UIColor *defaultBackgroundColor; +@property (nonatomic, strong) UIColor *defaultBackgroundColor UI_APPEARANCE_SELECTOR; /** Set Target object. * diff --git a/SCLAlertView/SCLMacros.h b/SCLAlertView/SCLMacros.h index 5e05c87..bb71567 100644 --- a/SCLAlertView/SCLMacros.h +++ b/SCLAlertView/SCLMacros.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 10/03/15. -// Copyright (c) 2015 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2016 AnyKey Entertainment. All rights reserved. // #ifndef SCL_MACROS_H diff --git a/SCLAlertView/SCLSwitchView.h b/SCLAlertView/SCLSwitchView.h index f318da9..dd8c5b8 100644 --- a/SCLAlertView/SCLSwitchView.h +++ b/SCLAlertView/SCLSwitchView.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by André Felipe Santos on 27/01/16. -// Copyright © 2016 AnyKey Entertainment. All rights reserved. +// Copyright © 2016-2016 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLTextView.h b/SCLAlertView/SCLTextView.h index 4f91486..fa2c3ce 100644 --- a/SCLAlertView/SCLTextView.h +++ b/SCLAlertView/SCLTextView.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/18/15. -// Copyright © 2015 AnyKey Entertainment. All rights reserved. +// Copyright © 2015-2016 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLTimerDisplay.h b/SCLAlertView/SCLTimerDisplay.h index 1e37cfd..548983d 100644 --- a/SCLAlertView/SCLTimerDisplay.h +++ b/SCLAlertView/SCLTimerDisplay.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Taylor Ryan on 8/18/15. -// Copyright (c) 2015 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2016 AnyKey Entertainment. All rights reserved. // // Taken from https://stackoverflow.com/questions/11783439/uibutton-with-timer diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 109ecf9..d7fdec2 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -427,7 +427,7 @@ - (IBAction)showSwitch:(id)sender { alert.cornerRadius = 13.0f; [alert addSwitchViewWithLabel:@"Don't show again".uppercaseString]; - [[SCLSwitchView appearance] setTintColor:[UIColor redColor]]; + [[SCLSwitchView appearance] setTintColor:[UIColor brownColor]]; SCLButton *button = [alert addButton:@"Done" target:self selector:@selector(firstButton)]; From faf061f683d1da410d38988703722987a41ff0a0 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 1 Jun 2016 10:56:22 -0300 Subject: [PATCH 135/250] Fix ShowWaiting timer invalidation #202 --- SCLAlertView/SCLAlertView.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index db88e0f..8de1abe 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1315,6 +1315,11 @@ - (void)hideView [_activityIndicatorView stopAnimating]; } + if (durationTimer) + { + [durationTimer invalidate]; + } + if (self.dismissBlock) { self.dismissBlock(); From be3e33d24da03183a6c7e495b026a3f3ff14d63a Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 21 Jun 2016 10:17:50 -0300 Subject: [PATCH 136/250] Add github templates --- .github/ISSUE_TEMPLATE.md | 17 +++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..46753da --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,17 @@ +- [ ] I have verified there are no duplicate active or recent bugs, questions, or requests + +###### Include the following: + - SCLAlertView version: `1.0.3` + - Device OS version: `6.0` + - Device Name: `iPhone 6` + +###### Reproduction Steps + 1. + 2. + 3. + +###### Expected Result + +###### Actual Result + +### Tell us what could be improved: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..c7a3515 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +###### Fixes issue #. +- [ ] This pull request follows the coding standards + +###### This PR changes: + - \ No newline at end of file From 1bc9204e81cc79eb6569c99d5006866f805afc52 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 21 Jun 2016 10:18:27 -0300 Subject: [PATCH 137/250] Bump version --- 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 1ce8100..5e13a4d 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 = "1.0.3" + spec.version = "1.0.4" 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" From 2210e8e9e3f85599f2839cd43bc58ab7845af331 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Sun, 10 Jul 2016 13:48:38 -0700 Subject: [PATCH 138/250] docs: nativescript integration mention --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d413458..71e0f8b 100644 --- a/README.md +++ b/README.md @@ -335,11 +335,16 @@ To install add the following line to your Podfile: ### Collaboration I tried to build an easy to use API, while beeing flexible enough for multiple variations, but I'm sure there are ways of improving and adding more features, so feel free to collaborate with ideas, issues and/or pull requests. -###Incoming improvements +### Incoming improvements - More animations - Performance tests - Remove some hardcode values +### Plugin integrations + +- [nativescript-fancyalert for NativeScript](https://github.com/NathanWalker/nativescript-fancyalert) + - Use SCLAlertView with [NativeScript](https://www.nativescript.org/) + ### Thanks to the original team - Design [@SherzodMx](https://twitter.com/SherzodMx) Sherzod Max - Development [@hackua](https://twitter.com/hackua) Viktor Radchenko From d1df460eafcae648fb61f80f88d0ddcaf220ac10 Mon Sep 17 00:00:00 2001 From: Eugene Tulusha Date: Tue, 26 Jul 2016 17:38:57 +0300 Subject: [PATCH 139/250] Add Carthage support --- SCLAlertView.xcodeproj/project.pbxproj | 168 ++++++++++++++++++ .../xcschemes/SCLAlertViewFramework.xcscheme | 80 +++++++++ SCLAlertViewFramework/Info.plist | 26 +++ 3 files changed, 274 insertions(+) create mode 100644 SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme create mode 100644 SCLAlertViewFramework/Info.plist diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index a25884a..1bbaf68 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -26,6 +26,16 @@ DDB15FDB19D5BAA000173158 /* SCLButton.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FDA19D5BAA000173158 /* SCLButton.m */; }; DDB15FDE19D5BCF400173158 /* SCLAlertViewResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FDD19D5BCF400173158 /* SCLAlertViewResponder.m */; }; DDB15FE119D5D85B00173158 /* SCLAlertViewStyleKit.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FE019D5D85B00173158 /* SCLAlertViewStyleKit.m */; }; + EF994B0F1D47AB1400619DFF /* SCLAlertViewFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF994B081D47AB1400619DFF /* SCLAlertViewFramework.framework */; }; + EF994B101D47AB1400619DFF /* SCLAlertViewFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EF994B081D47AB1400619DFF /* SCLAlertViewFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + EF994B151D47AB4A00619DFF /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */; }; + EF994B161D47AB4A00619DFF /* SCLAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FD619D5B96500173158 /* SCLAlertView.m */; }; + EF994B171D47AB4A00619DFF /* SCLButton.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FDA19D5BAA000173158 /* SCLButton.m */; }; + EF994B181D47AB4A00619DFF /* SCLAlertViewResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FDD19D5BCF400173158 /* SCLAlertViewResponder.m */; }; + EF994B191D47AB4A00619DFF /* SCLAlertViewStyleKit.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FE019D5D85B00173158 /* SCLAlertViewStyleKit.m */; }; + EF994B1A1D47AB4A00619DFF /* SCLTimerDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */; }; + EF994B1B1D47AB4A00619DFF /* SCLTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD24453B1BAC383600892117 /* SCLTextView.m */; }; + EF994B1C1D47AB4A00619DFF /* SCLSwitchView.m in Sources */ = {isa = PBXBuildFile; fileRef = CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -36,8 +46,29 @@ remoteGlobalIDString = DDB15F9C19D5B7C600173158; remoteInfo = SCLAlertView; }; + EF994B0D1D47AB1400619DFF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DDB15F9519D5B7C600173158 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EF994B071D47AB1400619DFF; + remoteInfo = SCLAlertViewFramework; + }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + EF994B141D47AB1400619DFF /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + EF994B101D47AB1400619DFF /* SCLAlertViewFramework.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTimerDisplay.h; sourceTree = ""; }; 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTimerDisplay.m; sourceTree = ""; }; @@ -76,6 +107,8 @@ DDB15FDD19D5BCF400173158 /* SCLAlertViewResponder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLAlertViewResponder.m; sourceTree = ""; }; DDB15FDF19D5D85B00173158 /* SCLAlertViewStyleKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLAlertViewStyleKit.h; sourceTree = ""; }; DDB15FE019D5D85B00173158 /* SCLAlertViewStyleKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLAlertViewStyleKit.m; sourceTree = ""; }; + EF994B081D47AB1400619DFF /* SCLAlertViewFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SCLAlertViewFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EF994B0C1D47AB1400619DFF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -87,6 +120,7 @@ DD06C2331C64EB1A00E6F6B0 /* Accelerate.framework in Frameworks */, DD06C22F1C64EAF600E6F6B0 /* AudioToolbox.framework in Frameworks */, DD06C22D1C64EAE500E6F6B0 /* UIKit.framework in Frameworks */, + EF994B0F1D47AB1400619DFF /* SCLAlertViewFramework.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -97,6 +131,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EF994B041D47AB1400619DFF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -128,6 +169,7 @@ DDB15FD519D5B96500173158 /* SCLAlertView */, DDB15F9F19D5B7C600173158 /* SCLAlertViewExample */, DDB15FB919D5B7C600173158 /* SCLAlertViewTests */, + EF994B091D47AB1400619DFF /* SCLAlertViewFramework */, DDB15F9E19D5B7C600173158 /* Products */, DD06C2381C64EC5D00E6F6B0 /* Frameworks */, ); @@ -138,6 +180,7 @@ children = ( DDB15F9D19D5B7C600173158 /* SCLAlertView.app */, DDB15FB619D5B7C600173158 /* SCLAlertViewTests.xctest */, + EF994B081D47AB1400619DFF /* SCLAlertViewFramework.framework */, ); name = Products; sourceTree = ""; @@ -209,8 +252,26 @@ path = SCLAlertView; sourceTree = ""; }; + EF994B091D47AB1400619DFF /* SCLAlertViewFramework */ = { + isa = PBXGroup; + children = ( + EF994B0C1D47AB1400619DFF /* Info.plist */, + ); + path = SCLAlertViewFramework; + sourceTree = ""; + }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + EF994B051D47AB1400619DFF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ DDB15F9C19D5B7C600173158 /* SCLAlertView */ = { isa = PBXNativeTarget; @@ -219,10 +280,12 @@ DDB15F9919D5B7C600173158 /* Sources */, DDB15F9A19D5B7C600173158 /* Frameworks */, DDB15F9B19D5B7C600173158 /* Resources */, + EF994B141D47AB1400619DFF /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( + EF994B0E1D47AB1400619DFF /* PBXTargetDependency */, ); name = SCLAlertView; productName = SCLAlertView; @@ -247,6 +310,24 @@ productReference = DDB15FB619D5B7C600173158 /* SCLAlertViewTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + EF994B071D47AB1400619DFF /* SCLAlertViewFramework */ = { + isa = PBXNativeTarget; + buildConfigurationList = EF994B131D47AB1400619DFF /* Build configuration list for PBXNativeTarget "SCLAlertViewFramework" */; + buildPhases = ( + EF994B031D47AB1400619DFF /* Sources */, + EF994B041D47AB1400619DFF /* Frameworks */, + EF994B051D47AB1400619DFF /* Headers */, + EF994B061D47AB1400619DFF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SCLAlertViewFramework; + productName = SCLAlertViewFramework; + productReference = EF994B081D47AB1400619DFF /* SCLAlertViewFramework.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -263,6 +344,9 @@ CreatedOnToolsVersion = 6.0.1; TestTargetID = DDB15F9C19D5B7C600173158; }; + EF994B071D47AB1400619DFF = { + CreatedOnToolsVersion = 7.3.1; + }; }; }; buildConfigurationList = DDB15F9819D5B7C600173158 /* Build configuration list for PBXProject "SCLAlertView" */; @@ -280,6 +364,7 @@ targets = ( DDB15F9C19D5B7C600173158 /* SCLAlertView */, DDB15FB519D5B7C600173158 /* SCLAlertViewTests */, + EF994B071D47AB1400619DFF /* SCLAlertViewFramework */, ); }; /* End PBXProject section */ @@ -302,6 +387,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EF994B061D47AB1400619DFF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -331,6 +423,21 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EF994B031D47AB1400619DFF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EF994B191D47AB4A00619DFF /* SCLAlertViewStyleKit.m in Sources */, + EF994B1C1D47AB4A00619DFF /* SCLSwitchView.m in Sources */, + EF994B1A1D47AB4A00619DFF /* SCLTimerDisplay.m in Sources */, + EF994B161D47AB4A00619DFF /* SCLAlertView.m in Sources */, + EF994B181D47AB4A00619DFF /* SCLAlertViewResponder.m in Sources */, + EF994B171D47AB4A00619DFF /* SCLButton.m in Sources */, + EF994B1B1D47AB4A00619DFF /* SCLTextView.m in Sources */, + EF994B151D47AB4A00619DFF /* UIImage+ImageEffects.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -339,6 +446,11 @@ target = DDB15F9C19D5B7C600173158 /* SCLAlertView */; targetProxy = DDB15FB719D5B7C600173158 /* PBXContainerItemProxy */; }; + EF994B0E1D47AB1400619DFF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EF994B071D47AB1400619DFF /* SCLAlertViewFramework */; + targetProxy = EF994B0D1D47AB1400619DFF /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -494,6 +606,53 @@ }; name = Release; }; + EF994B111D47AB1400619DFF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = SCLAlertViewFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = br.com.anykey.SCLAlertViewFramework; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + EF994B121D47AB1400619DFF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = SCLAlertViewFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = br.com.anykey.SCLAlertViewFramework; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -524,6 +683,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + EF994B131D47AB1400619DFF /* Build configuration list for PBXNativeTarget "SCLAlertViewFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EF994B111D47AB1400619DFF /* Debug */, + EF994B121D47AB1400619DFF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = DDB15F9519D5B7C600173158 /* Project object */; diff --git a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme new file mode 100644 index 0000000..7b974f7 --- /dev/null +++ b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SCLAlertViewFramework/Info.plist b/SCLAlertViewFramework/Info.plist new file mode 100644 index 0000000..d3de8ee --- /dev/null +++ b/SCLAlertViewFramework/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + From c344ab78cf218748b333c2d78fe786d7389690ee Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 26 Jul 2016 14:14:36 -0300 Subject: [PATCH 140/250] Add Carthage badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 71e0f8b..2258bdd 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Animated Alert View written in Swift but ported to Objective-C, which can be use [![Build Status](https://travis-ci.org/dogo/SCLAlertView.svg?branch=master)](https://travis-ci.org/dogo/SCLAlertView) [![Cocoapods](http://img.shields.io/cocoapods/v/SCLAlertView-Objective-C.svg)](http://cocoapods.org/?q=SCLAlertView-Objective-C) [![Pod License](http://img.shields.io/cocoapods/l/SCLAlertView-Objective-C.svg)](https://github.com/dogo/SCLAlertView/blob/master/LICENSE) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot.png)_ ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot2.png) From fe7d7db022e56620e09b32ab881e0b4486dc19ea Mon Sep 17 00:00:00 2001 From: Eugene Tulusha Date: Tue, 13 Sep 2016 23:02:27 +0300 Subject: [PATCH 141/250] Add umbrella header to exclude warnings during framework building --- SCLAlertView.xcodeproj/project.pbxproj | 2 ++ SCLAlertViewFramework/SCLAlertViewFramework.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 SCLAlertViewFramework/SCLAlertViewFramework.h diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index 1bbaf68..4f9dbad 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -70,6 +70,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 44E430DB1D889255002FE849 /* SCLAlertViewFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCLAlertViewFramework.h; sourceTree = ""; }; 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTimerDisplay.h; sourceTree = ""; }; 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTimerDisplay.m; sourceTree = ""; }; CF6FB1221C5926FC009715F3 /* SCLSwitchView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLSwitchView.h; sourceTree = ""; }; @@ -256,6 +257,7 @@ isa = PBXGroup; children = ( EF994B0C1D47AB1400619DFF /* Info.plist */, + 44E430DB1D889255002FE849 /* SCLAlertViewFramework.h */, ); path = SCLAlertViewFramework; sourceTree = ""; diff --git a/SCLAlertViewFramework/SCLAlertViewFramework.h b/SCLAlertViewFramework/SCLAlertViewFramework.h new file mode 100644 index 0000000..4bd14e8 --- /dev/null +++ b/SCLAlertViewFramework/SCLAlertViewFramework.h @@ -0,0 +1,15 @@ +// +// SCLAlertViewFramework.h +// SCLAlertView +// +// Created by Eugene Tulusha on 9/13/16. +// Copyright © 2016 AnyKey Entertainment. All rights reserved. +// + +@import Foundation; + +//! Project version number for CryptoSwift. +FOUNDATION_EXPORT double SCLAlertViewFrameworkVersionNumber; + +//! Project version string for CryptoSwift. +FOUNDATION_EXPORT const unsigned char SCLAlertViewFrameworkVersionString[]; From fef021696fde98a4137aee9d202ebfb6885ff5c6 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 26 Jul 2016 15:27:45 -0300 Subject: [PATCH 142/250] Update readme --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2258bdd..9491b67 100644 --- a/README.md +++ b/README.md @@ -326,12 +326,19 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) ``` ### Installation +SCLAlertView-Objective-C is available through : -SCLAlertView-Objective-C is available through [CocoaPods](http://cocoapods.org). +### [CocoaPods](https://cocoapods.org) To install add the following line to your Podfile: pod 'SCLAlertView-Objective-C' + +### [Carthage] (https://github.com/Carthage/Carthage) + +``` +TODO +``` ### Collaboration I tried to build an easy to use API, while beeing flexible enough for multiple variations, but I'm sure there are ways of improving and adding more features, so feel free to collaborate with ideas, issues and/or pull requests. From 7a0b796ee9dec20a4d2f3d392a6154732740a226 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 8 Sep 2016 21:15:17 -0300 Subject: [PATCH 143/250] Remove extra white space #218 --- SCLAlertView/SCLAlertView.m | 55 ++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 8de1abe..45dd1fe 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -28,28 +28,28 @@ @interface SCLAlertView () -@property (nonatomic, strong) NSMutableArray *inputs; -@property (nonatomic, strong) NSMutableArray *customViews; -@property (nonatomic, strong) NSMutableArray *buttons; -@property (nonatomic, strong) UIImageView *circleIconImageView; -@property (nonatomic, strong) UIView *circleView; -@property (nonatomic, strong) UIView *circleViewBackground; -@property (nonatomic, strong) UIView *contentView; -@property (nonatomic, strong) UIImageView *backgroundView; -@property (nonatomic, strong) UITapGestureRecognizer *gestureRecognizer; -@property (nonatomic, strong) NSString *titleFontFamily; -@property (nonatomic, strong) NSString *bodyTextFontFamily; -@property (nonatomic, strong) NSString *buttonsFontFamily; -@property (nonatomic, strong) UIWindow *previousWindow; -@property (nonatomic, strong) UIWindow *SCLAlertWindow; -@property (nonatomic, copy) SCLDismissBlock dismissBlock; -@property (nonatomic, assign) SystemSoundID soundID; -@property (nonatomic, weak) UIViewController *rootViewController; -@property (nonatomic, weak) id restoreInteractivePopGestureDelegate; -@property (nonatomic) BOOL canAddObservers; -@property (nonatomic) BOOL keyboardIsVisible; -@property (nonatomic) BOOL usingNewWindow; -@property (nonatomic) BOOL restoreInteractivePopGestureEnabled; +@property (strong, nonatomic) NSMutableArray *inputs; +@property (strong, nonatomic) NSMutableArray *customViews; +@property (strong, nonatomic) NSMutableArray *buttons; +@property (strong, nonatomic) UIImageView *circleIconImageView; +@property (strong, nonatomic) UIView *circleView; +@property (strong, nonatomic) UIView *circleViewBackground; +@property (strong, nonatomic) UIView *contentView; +@property (strong, nonatomic) UIImageView *backgroundView; +@property (strong, nonatomic) UITapGestureRecognizer *gestureRecognizer; +@property (strong, nonatomic) NSString *titleFontFamily; +@property (strong, nonatomic) NSString *bodyTextFontFamily; +@property (strong, nonatomic) NSString *buttonsFontFamily; +@property (strong, nonatomic) UIWindow *previousWindow; +@property (strong, nonatomic) UIWindow *SCLAlertWindow; +@property (copy, nonatomic) SCLDismissBlock dismissBlock; +@property (weak, nonatomic) UIViewController *rootViewController; +@property (weak, nonatomic) id restoreInteractivePopGestureDelegate; +@property (assign, nonatomic) SystemSoundID soundID; +@property (assign, nonatomic) BOOL canAddObservers; +@property (assign, nonatomic) BOOL keyboardIsVisible; +@property (assign, nonatomic) BOOL usingNewWindow; +@property (assign, nonatomic) BOOL restoreInteractivePopGestureEnabled; @property (nonatomic) CGFloat backgroundOpacity; @property (nonatomic) CGFloat titleFontSize; @property (nonatomic) CGFloat bodyFontSize; @@ -364,6 +364,11 @@ - (void)viewWillLayoutSubviews // Text fields CGFloat y = (_labelTitle.text == nil) ? kTitleTop : kTitleTop + _labelTitle.frame.size.height; _viewText.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, _subTitleHeight); + + if (!_labelTitle && !_viewText) { + y = 0.0f; + } + y += _subTitleHeight + 14.0f; for (SCLTextView *textField in _inputs) { @@ -904,6 +909,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima // Title is nil, we can move the body message to center and remove it from superView self.windowHeight -= _labelTitle.frame.size.height; [_labelTitle removeFromSuperview]; + _labelTitle = nil; _subTitleY = kCircleHeight - 20; } @@ -946,11 +952,16 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima self.subTitleHeight = 0.0f; self.windowHeight -= _viewText.frame.size.height; [_viewText removeFromSuperview]; + _viewText = nil; // Move up _labelTitle.frame = CGRectMake(12.0f, 37.0f, _windowWidth - 24.0f, kTitleHeight); } + if (!_labelTitle && !_viewText) { + self.windowHeight -= kTitleTop; + } + // Add button, if necessary if(completeText != nil) { From b1f2b14489083acf206571bd7c1c37ccdd8e6415 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 13 Sep 2016 17:49:14 -0300 Subject: [PATCH 144/250] bump version --- 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 5e13a4d..094126f 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 = "1.0.4" + spec.version = "1.0.5" 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" From 264e329dadce90894b0312475cd461517b50931d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 16 Sep 2016 13:41:34 -0300 Subject: [PATCH 145/250] Fix Umbrela header warning Upgrade Xcode project --- SCLAlertView.xcodeproj/project.pbxproj | 12 +++++++++++- .../xcschemes/SCLAlertViewFramework.xcscheme | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index 4f9dbad..99f1656 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ DD06C2371C64EB9200E6F6B0 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C2361C64EB9200E6F6B0 /* CoreGraphics.framework */; }; DD24453C1BAC383600892117 /* SCLTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD24453B1BAC383600892117 /* SCLTextView.m */; }; DD2E172A19FA84B800CBAEC3 /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */; }; + DD4B77E41D8C580B00CF97C7 /* SCLAlertViewFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 44E430DB1D889255002FE849 /* SCLAlertViewFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; DD4BA9C119DED8EF008D73EB /* right_answer.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */; }; DD7282B919D6087C00077F54 /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD7282B719D6087C00077F54 /* Storyboard.storyboard */; }; DDB15FBD19D5B7C600173158 /* SCLAlertViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FBC19D5B7C600173158 /* SCLAlertViewTests.m */; }; @@ -269,6 +270,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + DD4B77E41D8C580B00CF97C7 /* SCLAlertViewFramework.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -336,7 +338,7 @@ DDB15F9519D5B7C600173158 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "AnyKey Entertainment"; TargetAttributes = { DDB15F9C19D5B7C600173158 = { @@ -480,8 +482,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -490,6 +494,7 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -523,8 +528,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -532,6 +539,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -612,6 +620,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_NONNULL = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; @@ -635,6 +644,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_NONNULL = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; diff --git a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme index 7b974f7..3c77347 100644 --- a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme +++ b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme @@ -1,6 +1,6 @@ Date: Fri, 16 Sep 2016 13:44:07 -0300 Subject: [PATCH 146/250] Update storyboard --- .../Base.lproj/Storyboard.storyboard | 62 +++++++------------ 1 file changed, 22 insertions(+), 40 deletions(-) diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index 575a677..7bd2099 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -1,8 +1,9 @@ - + - + + @@ -18,165 +19,146 @@ - + + @@ -186,6 +222,7 @@ + @@ -216,14 +253,14 @@ - + - + diff --git a/SCLAlertViewExample/Info.plist b/SCLAlertViewExample/Info.plist index 422cdf3..457ae3b 100644 --- a/SCLAlertViewExample/Info.plist +++ b/SCLAlertViewExample/Info.plist @@ -37,6 +37,10 @@ UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown + UIAppFonts + + comic-sans.ttf + UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 09687f7..c1904ad 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -445,4 +445,33 @@ - (void)firstButton { NSLog(@"First button tapped"); } + +- (IBAction)showWithButtonCustom:(id)sender +{ + SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; + + SCLButton *button = [alert addButton:@"First Button" target:self selector:@selector(firstButton)]; + + button.buttonFormatBlock = ^NSDictionary* (void) + { + NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; + + buttonConfig[@"backgroundColor"] = [UIColor whiteColor]; + buttonConfig[@"textColor"] = [UIColor blackColor]; + buttonConfig[@"borderWidth"] = @2.0f; + buttonConfig[@"borderColor"] = [UIColor greenColor]; + buttonConfig[@"font"] = [UIFont fontWithName:@"ComicSansMS" size:13]; + + return buttonConfig; + }; + + [alert addButton:@"Second Button" actionBlock:^(void) { + NSLog(@"Second button tapped"); + }]; + + alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_answer.mp3", [NSBundle mainBundle].resourcePath]]; + + [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; +} + @end From 51e8838bc61f0c3dd5fec93ec64be85e1cbf2d99 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 7 Dec 2016 17:45:13 -0200 Subject: [PATCH 157/250] Bump version --- 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 d6e56ae..83944c5 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 = "1.0.6" + spec.version = "1.1.0" 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" From 63782b1c8e4fa7e3f077f3de158c0dbc206ae16c Mon Sep 17 00:00:00 2001 From: Haydar Sahin Date: Thu, 19 Jan 2017 14:43:54 +0200 Subject: [PATCH 158/250] added dismiss animation completion block --- SCLAlertView/SCLAlertView.h | 9 +++++++++ SCLAlertView/SCLAlertView.m | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index e3c88da..6947281 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -17,6 +17,7 @@ typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); typedef void (^SCLDismissBlock)(void); +typedef void (^SCLDismissAnimationCompletionBlock)(void); typedef void (^SCLForceHideBlock)(void); @interface SCLAlertView : UIViewController @@ -246,10 +247,17 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ - (void)alertIsDismissed:(SCLDismissBlock)dismissBlock; +/** Warns that alerts dismiss animation is completed + * + * Warns that alerts dismiss animation is completed + */ +- (void)alertDissmissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock; + /** Hide SCLAlertView * * Hide SCLAlertView using animation and removing from super view. */ + - (void)hideView; /** SCLAlertView visibility @@ -542,6 +550,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) #pragma mark - Custom Setters @property(copy, nonatomic) SCLAlertViewBuilder *(^alertIsDismissed) (SCLDismissBlock dismissBlock); +@property(copy, nonatomic) SCLAlertViewBuilder *(^alertDismissAnimationIsCompleted) (SCLDismissAnimationCompletionBlock dismissAnimationCompletionBlock); @property(copy, nonatomic) SCLAlertViewBuilder *(^removeTopCircle)(void); @property(copy, nonatomic) SCLAlertViewBuilder *(^addCustomView)(UIView *view); @property(copy, nonatomic) SCLAlertViewBuilder *(^addTextField)(NSString *title); diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 8b7f9a2..f38dff6 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -43,6 +43,7 @@ @interface SCLAlertView () @property (strong, nonatomic) UIWindow *previousWindow; @property (strong, nonatomic) UIWindow *SCLAlertWindow; @property (copy, nonatomic) SCLDismissBlock dismissBlock; +@property (copy, nonatomic) SCLDismissAnimationCompletionBlock dismissAnimationCompletionBlock; @property (weak, nonatomic) UIViewController *rootViewController; @property (weak, nonatomic) id restoreInteractivePopGestureDelegate; @property (assign, nonatomic) SystemSoundID soundID; @@ -1170,6 +1171,10 @@ - (void)alertIsDismissed:(SCLDismissBlock)dismissBlock self.dismissBlock = dismissBlock; } +- (void)alertDissmissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock{ + self.dismissAnimationCompletionBlock = dismissAnimationCompletionBlock; +} + - (SCLForceHideBlock)forceHideBlock:(SCLForceHideBlock)forceHideBlock { _forceHideBlock = forceHideBlock; @@ -1376,6 +1381,9 @@ - (void)fadeOutWithDuration:(NSTimeInterval)duration [self.view removeFromSuperview]; [self removeFromParentViewController]; } + if ( _dismissAnimationCompletionBlock ){ + self.dismissAnimationCompletionBlock(); + } }]; } @@ -2011,6 +2019,16 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _alertIsDismissed; } +-(SCLAlertViewBuilder *(^)(SCLDismissAnimationCompletionBlock))alertDismissAnimationIsCompleted{ + if (!_alertDismissAnimationIsCompleted) { + __weak typeof(self) weakSelf = self; + _alertDismissAnimationIsCompleted = ^(SCLDismissAnimationCompletionBlock dismissAnimationCompletionBlock) { + [weakSelf.alertView alertDissmissAnimationIsCompleted:dismissAnimationCompletionBlock]; + return weakSelf; + }; + } + return _alertDismissAnimationIsCompleted; +} - (SCLAlertViewBuilder *(^) (void))removeTopCircle { if (!_removeTopCircle) { __weak typeof(self) weakSelf = self; From da98148dae5900a5a84175d38b5403e5a556be29 Mon Sep 17 00:00:00 2001 From: Haydar Sahin Date: Thu, 19 Jan 2017 14:50:32 +0200 Subject: [PATCH 159/250] fixed typo. --- SCLAlertView/SCLAlertView.h | 2 +- SCLAlertView/SCLAlertView.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 6947281..2614f3f 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -251,7 +251,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) * * Warns that alerts dismiss animation is completed */ -- (void)alertDissmissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock; +- (void)alertDismissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock; /** Hide SCLAlertView * diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index f38dff6..8104ccb 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1171,7 +1171,7 @@ - (void)alertIsDismissed:(SCLDismissBlock)dismissBlock self.dismissBlock = dismissBlock; } -- (void)alertDissmissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock{ +- (void)alertDismissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock{ self.dismissAnimationCompletionBlock = dismissAnimationCompletionBlock; } @@ -2023,7 +2023,7 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { if (!_alertDismissAnimationIsCompleted) { __weak typeof(self) weakSelf = self; _alertDismissAnimationIsCompleted = ^(SCLDismissAnimationCompletionBlock dismissAnimationCompletionBlock) { - [weakSelf.alertView alertDissmissAnimationIsCompleted:dismissAnimationCompletionBlock]; + [weakSelf.alertView alertDismissAnimationIsCompleted:dismissAnimationCompletionBlock]; return weakSelf; }; } From 20df9cb2e57aeb59e06615838ad3f77bbcc20430 Mon Sep 17 00:00:00 2001 From: Haydar Sahin Date: Tue, 14 Feb 2017 12:40:09 +0200 Subject: [PATCH 160/250] added show animation completion block --- SCLAlertView/SCLAlertView.h | 8 ++++++ SCLAlertView/SCLAlertView.m | 52 +++++++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 2614f3f..3d46cd2 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -18,6 +18,7 @@ typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); typedef void (^SCLDismissBlock)(void); typedef void (^SCLDismissAnimationCompletionBlock)(void); +typedef void (^SCLShowAnimationCompletionBlock)(void); typedef void (^SCLForceHideBlock)(void); @interface SCLAlertView : UIViewController @@ -253,6 +254,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ - (void)alertDismissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock; +/** Warns that alerts show animation is completed + * + * Warns that alerts show animation is completed + */ +- (void)alertShowAnimationIsCompleted:(SCLShowAnimationCompletionBlock)showAnimationCompletionBlock; + /** Hide SCLAlertView * * Hide SCLAlertView using animation and removing from super view. @@ -551,6 +558,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) #pragma mark - Custom Setters @property(copy, nonatomic) SCLAlertViewBuilder *(^alertIsDismissed) (SCLDismissBlock dismissBlock); @property(copy, nonatomic) SCLAlertViewBuilder *(^alertDismissAnimationIsCompleted) (SCLDismissAnimationCompletionBlock dismissAnimationCompletionBlock); +@property(copy, nonatomic) SCLAlertViewBuilder *(^alertShowAnimationIsCompleted) (SCLShowAnimationCompletionBlock showAnimationCompletionBlock); @property(copy, nonatomic) SCLAlertViewBuilder *(^removeTopCircle)(void); @property(copy, nonatomic) SCLAlertViewBuilder *(^addCustomView)(UIView *view); @property(copy, nonatomic) SCLAlertViewBuilder *(^addTextField)(NSString *title); diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 8104ccb..675080f 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -44,6 +44,7 @@ @interface SCLAlertView () @property (strong, nonatomic) UIWindow *SCLAlertWindow; @property (copy, nonatomic) SCLDismissBlock dismissBlock; @property (copy, nonatomic) SCLDismissAnimationCompletionBlock dismissAnimationCompletionBlock; +@property (copy, nonatomic) SCLShowAnimationCompletionBlock showAnimationCompletionBlock; @property (weak, nonatomic) UIViewController *rootViewController; @property (weak, nonatomic) id restoreInteractivePopGestureDelegate; @property (assign, nonatomic) SystemSoundID soundID; @@ -1175,6 +1176,10 @@ - (void)alertDismissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dis self.dismissAnimationCompletionBlock = dismissAnimationCompletionBlock; } +- (void)alertShowAnimationIsCompleted:(SCLShowAnimationCompletionBlock)showAnimationCompletionBlock{ + self.showAnimationCompletionBlock = showAnimationCompletionBlock; +} + - (SCLForceHideBlock)forceHideBlock:(SCLForceHideBlock)forceHideBlock { _forceHideBlock = forceHideBlock; @@ -1480,7 +1485,11 @@ - (void)fadeIn self.backgroundView.alpha = _backgroundOpacity; self.view.alpha = 1.0f; } - completion:nil]; + completion:^(BOOL finished) { + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } + }]; } - (void)slideInFromTop @@ -1504,6 +1513,10 @@ - (void)slideInFromTop } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ self.view.center = _backgroundView.center; + } completion:^(BOOL finished) { + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } }]; }]; } @@ -1523,7 +1536,9 @@ - (void)slideInFromTop self.view.alpha = 1.0f; } completion:^(BOOL finished) { - // nothing + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } }]; } } @@ -1547,6 +1562,10 @@ - (void)slideInFromBottom } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ self.view.center = _backgroundView.center; + } completion:^(BOOL finished) { + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } }]; }]; } @@ -1570,6 +1589,10 @@ - (void)slideInFromLeft } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ self.view.center = _backgroundView.center; + } completion:^(BOOL finished) { + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } }]; }]; } @@ -1593,6 +1616,10 @@ - (void)slideInFromRight } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ self.view.center = _backgroundView.center; + } completion:^(BOOL finished) { + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } }]; }]; } @@ -1614,6 +1641,10 @@ - (void)slideInFromCenter } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ self.view.center = _backgroundView.center; + } completion:^(BOOL finished) { + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } }]; }]; } @@ -1635,6 +1666,10 @@ - (void)slideInToCenter } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ self.view.center = _backgroundView.center; + } completion:^(BOOL finished) { + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } }]; }]; } @@ -1647,6 +1682,9 @@ - (void)simplyAppear dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ self.backgroundView.alpha = _backgroundOpacity; self.view.alpha = 1.0f; + if ( _showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } }); } @@ -2029,6 +2067,16 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return _alertDismissAnimationIsCompleted; } +-(SCLAlertViewBuilder *(^)(SCLShowAnimationCompletionBlock))alertShowAnimationIsCompleted{ + if (!_alertShowAnimationIsCompleted) { + __weak typeof(self) weakSelf = self; + _alertShowAnimationIsCompleted = ^(SCLShowAnimationCompletionBlock showAnimationCompletionBlock) { + [weakSelf.alertView alertShowAnimationIsCompleted:showAnimationCompletionBlock]; + return weakSelf; + }; + } + return _alertShowAnimationIsCompleted; +} - (SCLAlertViewBuilder *(^) (void))removeTopCircle { if (!_removeTopCircle) { __weak typeof(self) weakSelf = self; From d3125d9e24df6a058b1fe6cc90a2928a1f5bd771 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 16 Feb 2017 10:34:00 -0200 Subject: [PATCH 161/250] Fix typo --- SCLAlertView/SCLButton.h | 4 ++-- SCLAlertView/SCLButton.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index b365339..3069ebe 100755 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -101,9 +101,9 @@ typedef NS_ENUM(NSInteger, SCLActionType) /** Adjust width of the button according to the width of the alert and * the number of buttons. Only used when buttons are horizontally aligned. * - * @param windowWith The width of the alert. + * @param windowWidth The width of the alert. * @param numberOfButtons The number of buttons in the alert. */ -- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidht numberOfButtons:(NSUInteger)numberOfButtons; +- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidth numberOfButtons:(NSUInteger)numberOfButtons; @end diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 6f4f727..1b509a8 100755 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -63,9 +63,9 @@ - (void)setupWithWindowWidth:(CGFloat)windowWidth self.layer.cornerRadius = 3.0f; } -- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidht numberOfButtons:(NSUInteger)numberOfButtons +- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidth numberOfButtons:(NSUInteger)numberOfButtons { - CGFloat allButtonsWidth = windowWidht - (MARGIN_BUTTON * 2); + CGFloat allButtonsWidth = windowWidth - (MARGIN_BUTTON * 2); CGFloat buttonWidth = (allButtonsWidth - ((numberOfButtons - 1) * 10)) / numberOfButtons; self.frame = CGRectMake(0.0f, 0.0f, buttonWidth, MIN_HEIGHT); From 569dbfaa768b9dbfee44478337bc008d75b58d70 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 16 Feb 2017 10:34:21 -0200 Subject: [PATCH 162/250] Simplify demo --- SCLAlertViewExample/ViewController.m | 3 --- 1 file changed, 3 deletions(-) diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index c1904ad..387164f 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -111,7 +111,6 @@ - (IBAction)showNotice:(id)sender SCLAlertView *alert = [[SCLAlertView alloc] init]; alert.backgroundType = SCLAlertViewBackgroundBlur; - alert.showAnimationType = SCLAlertViewShowAnimationFadeIn; [alert showNotice:self title:kNoticeTitle subTitle:@"You've just displayed this awesome Pop Up View with blur effect" closeButtonTitle:kButtonTitle duration:0.0f]; } @@ -127,7 +126,6 @@ - (IBAction)showInfo:(id)sender SCLAlertView *alert = [[SCLAlertView alloc] init]; alert.shouldDismissOnTapOutside = YES; - alert.showAnimationType = SCLAlertViewShowAnimationSimplyAppear; [alert alertIsDismissed:^{ NSLog(@"SCLAlertView dismissed!"); }]; @@ -140,7 +138,6 @@ - (IBAction)showEdit:(id)sender SCLAlertView *alert = [[SCLAlertView alloc] init]; SCLTextView *textField = [alert addTextField:@"Enter your name"]; - alert.hideAnimationType = SCLAlertViewHideAnimationSimplyDisappear; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); }]; From b01b408f12e53caba680b8f88485d8e2516de35a Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 16 Feb 2017 10:40:01 -0200 Subject: [PATCH 163/250] Fix example font location and target --- SCLAlertView.xcodeproj/project.pbxproj | 19 ++++++++++++------ .../Fonts}/comic-sans.ttf | Bin 2 files changed, 13 insertions(+), 6 deletions(-) rename {SCLAlertView => SCLAlertViewExample/Fonts}/comic-sans.ttf (100%) diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index 7130448..d258417 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -7,8 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 08DD3F811DF864530099EC72 /* comic-sans.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 08DD3F801DF864530099EC72 /* comic-sans.ttf */; }; - 08DD3F821DF864530099EC72 /* comic-sans.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 08DD3F801DF864530099EC72 /* comic-sans.ttf */; }; 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */; }; CF6FB1241C5926FC009715F3 /* SCLSwitchView.m in Sources */ = {isa = PBXBuildFile; fileRef = CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */; }; DD06C22D1C64EAE500E6F6B0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C22C1C64EAE500E6F6B0 /* UIKit.framework */; }; @@ -29,6 +27,7 @@ DDB15FDB19D5BAA000173158 /* SCLButton.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FDA19D5BAA000173158 /* SCLButton.m */; }; DDB15FDE19D5BCF400173158 /* SCLAlertViewResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FDD19D5BCF400173158 /* SCLAlertViewResponder.m */; }; DDB15FE119D5D85B00173158 /* SCLAlertViewStyleKit.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FE019D5D85B00173158 /* SCLAlertViewStyleKit.m */; }; + DDB2BA1B1E55D4260009DAC9 /* comic-sans.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DDB2BA1A1E55D4260009DAC9 /* comic-sans.ttf */; }; EF994B151D47AB4A00619DFF /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */; }; EF994B161D47AB4A00619DFF /* SCLAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FD619D5B96500173158 /* SCLAlertView.m */; }; EF994B171D47AB4A00619DFF /* SCLButton.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FDA19D5BAA000173158 /* SCLButton.m */; }; @@ -50,7 +49,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 08DD3F801DF864530099EC72 /* comic-sans.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "comic-sans.ttf"; sourceTree = ""; }; 44E430DB1D889255002FE849 /* SCLAlertViewFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCLAlertViewFramework.h; sourceTree = ""; }; 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLTimerDisplay.h; sourceTree = ""; }; 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLTimerDisplay.m; sourceTree = ""; }; @@ -89,6 +87,7 @@ DDB15FDD19D5BCF400173158 /* SCLAlertViewResponder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLAlertViewResponder.m; sourceTree = ""; }; DDB15FDF19D5D85B00173158 /* SCLAlertViewStyleKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCLAlertViewStyleKit.h; sourceTree = ""; }; DDB15FE019D5D85B00173158 /* SCLAlertViewStyleKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLAlertViewStyleKit.m; sourceTree = ""; }; + DDB2BA1A1E55D4260009DAC9 /* comic-sans.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "comic-sans.ttf"; sourceTree = ""; }; EF994B081D47AB1400619DFF /* SCLAlertViewFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SCLAlertViewFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; EF994B0C1D47AB1400619DFF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ @@ -187,7 +186,7 @@ DDB15FD319D5B8DB00173158 /* main.m */, DD4BA9C219DEDD8E008D73EB /* SCLAlertView-Objective-C-prefix.pch */, DD0D295B19D902DA00881F53 /* Info.plist */, - 08DD3F801DF864530099EC72 /* comic-sans.ttf */, + DDB2BA191E55D4260009DAC9 /* Fonts */, DD4BA9BF19DED8EF008D73EB /* Sounds */, ); name = "Supporting Files"; @@ -234,6 +233,15 @@ path = SCLAlertView; sourceTree = ""; }; + DDB2BA191E55D4260009DAC9 /* Fonts */ = { + isa = PBXGroup; + children = ( + DDB2BA1A1E55D4260009DAC9 /* comic-sans.ttf */, + ); + name = Fonts; + path = SCLAlertViewExample/Fonts; + sourceTree = SOURCE_ROOT; + }; EF994B091D47AB1400619DFF /* SCLAlertViewFramework */ = { isa = PBXGroup; children = ( @@ -359,7 +367,7 @@ DD4BA9C119DED8EF008D73EB /* right_answer.mp3 in Resources */, DDB15FD019D5B8BF00173158 /* Images.xcassets in Resources */, DD7282B919D6087C00077F54 /* Storyboard.storyboard in Resources */, - 08DD3F811DF864530099EC72 /* comic-sans.ttf in Resources */, + DDB2BA1B1E55D4260009DAC9 /* comic-sans.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -374,7 +382,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 08DD3F821DF864530099EC72 /* comic-sans.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/SCLAlertView/comic-sans.ttf b/SCLAlertViewExample/Fonts/comic-sans.ttf similarity index 100% rename from SCLAlertView/comic-sans.ttf rename to SCLAlertViewExample/Fonts/comic-sans.ttf From bbf79b9eb71cec4660a82abf46608a23667b1a1b Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 16 Feb 2017 11:18:48 -0200 Subject: [PATCH 164/250] Adjust example storyboard --- .../Base.lproj/Storyboard.storyboard | 451 +++++++++--------- SCLAlertViewExample/ViewController.m | 19 - 2 files changed, 228 insertions(+), 242 deletions(-) diff --git a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard index 1da0a57..e016d6d 100644 --- a/SCLAlertViewExample/Base.lproj/Storyboard.storyboard +++ b/SCLAlertViewExample/Base.lproj/Storyboard.storyboard @@ -1,11 +1,11 @@ - + - + @@ -21,242 +21,247 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - + + + + - - - diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 387164f..55893fa 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -11,8 +11,6 @@ @interface ViewController () -@property (nonatomic, weak) IBOutlet UIScrollView *scrollView; - @end NSString *kSuccessTitle = @"Congratulations"; @@ -26,23 +24,6 @@ @interface ViewController () @implementation ViewController -- (void)viewDidAppear:(BOOL)animated -{ - [super viewDidAppear:animated]; - - // auto size UIScrollView to fit the content - CGRect contentRect = CGRectZero; - for (UIView *view in self.scrollView.subviews) { - contentRect = CGRectUnion(contentRect, view.frame); - } - self.scrollView.contentSize = contentRect.size; -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; -} - - (IBAction)showSuccess:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; From 3fde86a13260382954720b4f773c9035feb755e7 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 16 Feb 2017 11:19:35 -0200 Subject: [PATCH 165/250] Bump version --- 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 83944c5..596ce45 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 = "1.1.0" + spec.version = "1.1.1" 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" From ce3bee78ad5794b98c156e36efb300ba7cb98b79 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 16 Feb 2017 11:22:04 -0200 Subject: [PATCH 166/250] Add rbenv file --- .ruby-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..2bf1c1c --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.3.1 From c7f5628f170ec44c5b5e51f810f3db64bd585261 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 8 Mar 2017 17:30:41 -0300 Subject: [PATCH 167/250] Fix title label hierarchy Code formatting --- SCLAlertView/SCLAlertView.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 675080f..6a83f9c 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -188,7 +188,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _circleView = [[UIView alloc] init]; _circleViewBackground = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, kCircleHeightBackground, kCircleHeightBackground)]; _circleIconImageView = [[UIImageView alloc] init]; - _backgroundView = [[UIImageView alloc]initWithFrame:[self mainScreenFrame]]; + _backgroundView = [[UIImageView alloc] initWithFrame:[self mainScreenFrame]]; _buttons = [[NSMutableArray alloc] init]; _inputs = [[NSMutableArray alloc] init]; _customViews = [[NSMutableArray alloc] init]; @@ -243,10 +243,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _contentView.layer.masksToBounds = YES; _contentView.layer.borderWidth = 0.5f; [_contentView addSubview:_viewText]; - - CGRect position = [self.contentView convertRect:self.labelTitle.frame toView:self.view]; - _labelTitle.frame = position; - [self.view addSubview:_labelTitle]; + [_contentView addSubview:_labelTitle]; // Colors self.backgroundViewColor = [UIColor whiteColor]; @@ -360,7 +357,7 @@ - (void)viewWillLayoutSubviews _circleViewBackground.frame = CGRectMake(x, y, kCircleHeightBackground, kCircleHeightBackground); _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); - _labelTitle.frame = CGRectMake(12.0f + self.contentView.frame.origin.x, kTitleTop + self.contentView.frame.origin.y, _windowWidth - 24.0f, kTitleHeight); + _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); } // Text fields @@ -437,7 +434,10 @@ - (void)handleTap:(UITapGestureRecognizer *)gesture hide = NO; } } - if(hide)[self hideView]; + if(hide) + { + [self hideView]; + } } } From b7a2f1c28ca45132155b98247516d74fe051d4d4 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 14 Mar 2017 09:50:06 -0300 Subject: [PATCH 168/250] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 677b5a3..8fd934a 100644 --- a/README.md +++ b/README.md @@ -339,7 +339,7 @@ To install add the following line to your Podfile: ### [Carthage] (https://github.com/Carthage/Carthage) ``` -TODO +github "dogo/SCLAlertView" ``` ### Collaboration From e6b861efefd873f55c9f5d000658571c2e481195 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 14 Mar 2017 09:51:00 -0300 Subject: [PATCH 169/250] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fd934a..888d591 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,7 @@ To install add the following line to your Podfile: pod 'SCLAlertView-Objective-C' -### [Carthage] (https://github.com/Carthage/Carthage) +### [Carthage](https://github.com/Carthage/Carthage) ``` github "dogo/SCLAlertView" From 6e38c69a9482451bf44db8f0ef34a072f6b60fec Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 11 Apr 2017 11:27:08 -0300 Subject: [PATCH 170/250] Fix tap inside the alert will dismiss the alert when using new window and shouldDissmissOnTapOutside=YES #211 --- SCLAlertView/SCLAlertView.m | 61 +++++++++++++------------------------ 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 6a83f9c..5866dcd 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -316,50 +316,33 @@ - (void)viewWillLayoutSubviews } } - if(!_usingNewWindow) + // Set new background frame + CGRect newBackgroundFrame = self.backgroundView.frame; + newBackgroundFrame.size = sz; + self.backgroundView.frame = newBackgroundFrame; + + // Set new main frame + CGRect r; + if (self.view.superview != nil) { - // Set new background frame - CGRect newBackgroundFrame = self.backgroundView.frame; - newBackgroundFrame.size = sz; - self.backgroundView.frame = newBackgroundFrame; - - // Set new main frame - CGRect r; - if (self.view.superview != nil) - { - // View is showing, position at center of screen - r = CGRectMake((sz.width-_windowWidth)/2, (sz.height-_windowHeight)/2, _windowWidth, _windowHeight); - } - else - { - // View is not visible, position outside screen bounds - r = CGRectMake((sz.width-_windowWidth)/2, -_windowHeight, _windowWidth, _windowHeight); - } - - // Set frames - self.view.frame = r; - _contentView.frame = CGRectMake(0.0f, 0.0f, _windowWidth, _windowHeight); - _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); - _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; - _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; - _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); - _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); + // View is showing, position at center of screen + r = CGRectMake((sz.width-_windowWidth)/2, (sz.height-_windowHeight)/2, _windowWidth, _windowHeight); } else { - CGFloat x = (sz.width - _windowWidth) / 2; - CGFloat y = (sz.height - _windowHeight - (kCircleHeight / 8)) / 2; - - _contentView.frame = CGRectMake(x, y, _windowWidth, _windowHeight); - y -= kCircleHeightBackground / 2; - x = (sz.width - kCircleHeightBackground) / 2; - _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; - _circleViewBackground.frame = CGRectMake(x, y, kCircleHeightBackground, kCircleHeightBackground); - _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; - _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); - _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); + // View is not visible, position outside screen bounds + r = CGRectMake((sz.width-_windowWidth)/2, -_windowHeight, _windowWidth, _windowHeight); } + // Set frames + self.view.frame = r; + _contentView.frame = CGRectMake(0.0f, 0.0f, _windowWidth, _windowHeight); + _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); + _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; + _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; + _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); + _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); + // Text fields CGFloat y = (_labelTitle.text == nil) ? kTitleTop : kTitleTop + _labelTitle.frame.size.height; _viewText.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, _subTitleHeight); @@ -448,7 +431,7 @@ - (void)setShouldDismissOnTapOutside:(BOOL)shouldDismissOnTapOutside if(_shouldDismissOnTapOutside) { self.gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)]; - [_usingNewWindow ? _SCLAlertWindow : _backgroundView addGestureRecognizer:_gestureRecognizer]; + [_backgroundView addGestureRecognizer:_gestureRecognizer]; } } From dae00d3b8d3bfc002fd829bc32b0024f77c2686f Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 11 Apr 2017 11:29:56 -0300 Subject: [PATCH 171/250] Update README.md --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 888d591..1b00e19 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Animated Alert View written in Swift but ported to Objective-C, which can be use ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot6.png) ![BackgroundImage](https://raw.githubusercontent.com/dogo/SCLAlertView/master/ScreenShots/ScreenShot7.png) -###Fluent style +### Fluent style ```Objective-C @@ -32,7 +32,7 @@ SCLAlertViewShowBuilder *showBuilder = [SCLAlertViewShowBuilder new] showBuilder.show(builder.alertView, self.window.rootViewController); ``` -####Complex +#### Complex ```Objective-C NSString *title = @"Title"; NSString *message = @"Message"; @@ -69,7 +69,7 @@ showBuilder.show(builder.alertView, self.window.rootViewController); [showBuilder showAlertView:builder.alertView onViewController:self]; ``` -###Easy to use +### Easy to use ```Objective-C // Get started SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -91,7 +91,7 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; SCLAlertView *alert = [[SCLAlertView alloc] initWithWindowWidth:300.0f]; ``` -###SCLAlertview in a new window. (No UIViewController) +### SCLAlertview in a new window. (No UIViewController) ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; @@ -112,11 +112,11 @@ SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindowWidth:300.0f]; ``` -###New Window: Known issues +### New Window: Known issues 1. SCLAlert animation is wrong in landscape. (iOS 6.X and 7.X) -###Add buttons +### Add buttons ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -140,7 +140,7 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert showSuccess:self title:@"Button View" subTitle:@"This alert view has buttons" closeButtonTitle:@"Done" duration:0.0f]; ``` -###Add button timer +### Add button timer ```Objective-C //The index of the button to add the timer display to. [alert addTimerToButtonIndex:0 reverse:NO]; @@ -155,7 +155,7 @@ SCLAlertView *alert = [[SCLAlertView alloc] init]; ``` -###Add Text Attributes +### Add Text Attributes ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -178,7 +178,7 @@ alert.attributedFormatBlock = ^NSAttributedString* (NSString *value) [alert showSuccess:self title:@"Button View" subTitle:@"Attributed string operation successfully completed." closeButtonTitle:@"Done" duration:0.0f]; ``` -###Add a text field +### Add a text field ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -191,14 +191,14 @@ UITextField *textField = [alert addTextField:@"Enter your name"]; [alert showEdit:self title:@"Edit View" subTitle:@"This alert view shows a text box" closeButtonTitle:@"Done" duration:0.0f]; ``` -###Indeterminate progress +### Indeterminate progress ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert showWaiting:self title:@"Waiting..." subTitle:@"Blah de blah de blah, blah. Blah de blah de" closeButtonTitle:nil duration:5.0f]; ``` -###Add a switch button +### Add a switch button ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -212,7 +212,7 @@ switchView.tintColor = [UIColor brownColor]; [alert showCustom:self image:[UIImage imageNamed:@"switch"] color:[UIColor brownColor] title:kInfoTitle subTitle:kSubtitle closeButtonTitle:nil duration:0.0f]; ``` -###Add custom view +### Add custom view ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -224,7 +224,7 @@ customView.backgroundColor = [UIColor redColor]; [alert showNotice:self title:@"Title" subTitle:@"This alert view shows a custom view" closeButtonTitle:@"Done" duration:0.0f]; ``` -###SCLAlertView properties +### SCLAlertView properties ```Objective-C //Dismiss on tap outside (Default is NO) alert.shouldDismissOnTapOutside = YES; @@ -265,7 +265,7 @@ alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_an ``` -###Helpers +### Helpers ```Objective-C //Receiving information that SCLAlertView is dismissed [alert alertIsDismissed:^{ @@ -273,7 +273,7 @@ alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_an }]; ``` -####Alert View Styles +#### Alert View Styles ```Objective-C typedef NS_ENUM(NSInteger, SCLAlertViewStyle) { @@ -288,7 +288,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewStyle) SCLAlertViewStyleCustom }; ``` -####Alert View hide animation styles +#### Alert View hide animation styles ```Objective-C typedef NS_ENUM(NSInteger, SCLAlertViewHideAnimation) { @@ -302,7 +302,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewHideAnimation) SCLAlertViewHideAnimationSimplyDisappear }; ``` -####Alert View show animation styles +#### Alert View show animation styles ```Objective-C typedef NS_ENUM(NSInteger, SCLAlertViewShowAnimation) { @@ -317,7 +317,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewShowAnimation) }; ``` -####Alert View background styles +#### Alert View background styles ```Objective-C typedef NS_ENUM(NSInteger, SCLAlertViewBackground) { From 193c1e75b6cbed427ef315f34462b343aaae33da Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 11 Apr 2017 11:32:06 -0300 Subject: [PATCH 172/250] Bump version --- 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 596ce45..284b1f0 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 = "1.1.1" + spec.version = "1.1.2" 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" From 87664331451063a7c5deabeb706c59fc5c7ebaa6 Mon Sep 17 00:00:00 2001 From: amisare <243297288@qq.com> Date: Fri, 26 May 2017 09:06:13 +0800 Subject: [PATCH 173/250] clerical error --- SCLAlertView/SCLButton.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index b365339..730dbd8 100755 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -104,6 +104,6 @@ typedef NS_ENUM(NSInteger, SCLActionType) * @param windowWith The width of the alert. * @param numberOfButtons The number of buttons in the alert. */ -- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidht numberOfButtons:(NSUInteger)numberOfButtons; +- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidth numberOfButtons:(NSUInteger)numberOfButtons; @end From 398c60633d9116356214b24405e81ab91ff8071d Mon Sep 17 00:00:00 2001 From: amisare <243297288@qq.com> Date: Fri, 26 May 2017 09:07:33 +0800 Subject: [PATCH 174/250] clerical error --- SCLAlertView/SCLButton.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 6f4f727..1b509a8 100755 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -63,9 +63,9 @@ - (void)setupWithWindowWidth:(CGFloat)windowWidth self.layer.cornerRadius = 3.0f; } -- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidht numberOfButtons:(NSUInteger)numberOfButtons +- (void)adjustWidthWithWindowWidth:(CGFloat)windowWidth numberOfButtons:(NSUInteger)numberOfButtons { - CGFloat allButtonsWidth = windowWidht - (MARGIN_BUTTON * 2); + CGFloat allButtonsWidth = windowWidth - (MARGIN_BUTTON * 2); CGFloat buttonWidth = (allButtonsWidth - ((numberOfButtons - 1) * 10)) / numberOfButtons; self.frame = CGRectMake(0.0f, 0.0f, buttonWidth, MIN_HEIGHT); From 15c1aaec41f5b05027411dfe3d5ebc57f292cafc Mon Sep 17 00:00:00 2001 From: Kyle Hankinson Date: Mon, 19 Jun 2017 10:04:52 -0300 Subject: [PATCH 175/250] + Added SCLAlertView header as public. --- SCLAlertView.xcodeproj/project.pbxproj | 2 ++ SCLAlertViewFramework/SCLAlertViewFramework.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index d258417..e96f798 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */; }; + 726C8FA61EF803310060F33B /* SCLAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = DDB15FD819D5B98800173158 /* SCLAlertView.h */; settings = {ATTRIBUTES = (Public, ); }; }; CF6FB1241C5926FC009715F3 /* SCLSwitchView.m in Sources */ = {isa = PBXBuildFile; fileRef = CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */; }; DD06C22D1C64EAE500E6F6B0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C22C1C64EAE500E6F6B0 /* UIKit.framework */; }; DD06C22F1C64EAF600E6F6B0 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C22E1C64EAF600E6F6B0 /* AudioToolbox.framework */; }; @@ -258,6 +259,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 726C8FA61EF803310060F33B /* SCLAlertView.h in Headers */, DD4B77E41D8C580B00CF97C7 /* SCLAlertViewFramework.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/SCLAlertViewFramework/SCLAlertViewFramework.h b/SCLAlertViewFramework/SCLAlertViewFramework.h index 4bd14e8..5981fc4 100644 --- a/SCLAlertViewFramework/SCLAlertViewFramework.h +++ b/SCLAlertViewFramework/SCLAlertViewFramework.h @@ -13,3 +13,5 @@ FOUNDATION_EXPORT double SCLAlertViewFrameworkVersionNumber; //! Project version string for CryptoSwift. FOUNDATION_EXPORT const unsigned char SCLAlertViewFrameworkVersionString[]; + +#import "SCLAlertView.h" From 0a663571c56d9199dcde7b59262744ef4d7a76b6 Mon Sep 17 00:00:00 2001 From: Kyle Hankinson Date: Mon, 19 Jun 2017 10:13:40 -0300 Subject: [PATCH 176/250] + Added required public headers. --- SCLAlertView.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index e96f798..a7f9f76 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -9,6 +9,9 @@ /* Begin PBXBuildFile section */ 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */; }; 726C8FA61EF803310060F33B /* SCLAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = DDB15FD819D5B98800173158 /* SCLAlertView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 726C8FA71EF805520060F33B /* SCLButton.h in Headers */ = {isa = PBXBuildFile; fileRef = DDB15FD919D5BAA000173158 /* SCLButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 726C8FA81EF805620060F33B /* SCLTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = DD24453A1BAC383600892117 /* SCLTextView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 726C8FA91EF805650060F33B /* SCLSwitchView.h in Headers */ = {isa = PBXBuildFile; fileRef = CF6FB1221C5926FC009715F3 /* SCLSwitchView.h */; settings = {ATTRIBUTES = (Public, ); }; }; CF6FB1241C5926FC009715F3 /* SCLSwitchView.m in Sources */ = {isa = PBXBuildFile; fileRef = CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */; }; DD06C22D1C64EAE500E6F6B0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C22C1C64EAE500E6F6B0 /* UIKit.framework */; }; DD06C22F1C64EAF600E6F6B0 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD06C22E1C64EAF600E6F6B0 /* AudioToolbox.framework */; }; @@ -260,6 +263,9 @@ buildActionMask = 2147483647; files = ( 726C8FA61EF803310060F33B /* SCLAlertView.h in Headers */, + 726C8FA91EF805650060F33B /* SCLSwitchView.h in Headers */, + 726C8FA81EF805620060F33B /* SCLTextView.h in Headers */, + 726C8FA71EF805520060F33B /* SCLButton.h in Headers */, DD4B77E41D8C580B00CF97C7 /* SCLAlertViewFramework.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; From 07ec2ebd364ca7147b05bfaf425b317eb5cc39f2 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 6 Sep 2017 14:57:48 -0300 Subject: [PATCH 177/250] Update copyright year --- SCLAlertView/SCLAlertView.h | 2 +- SCLAlertView/SCLAlertView.m | 2 +- SCLAlertView/SCLAlertViewResponder.h | 2 +- SCLAlertView/SCLAlertViewResponder.m | 2 +- SCLAlertView/SCLAlertViewStyleKit.h | 2 +- SCLAlertView/SCLAlertViewStyleKit.m | 2 +- SCLAlertView/SCLButton.h | 2 +- SCLAlertView/SCLButton.m | 2 +- SCLAlertView/SCLMacros.h | 2 +- SCLAlertView/SCLSwitchView.h | 2 +- SCLAlertView/SCLSwitchView.m | 2 +- SCLAlertView/SCLTextView.h | 2 +- SCLAlertView/SCLTextView.m | 2 +- SCLAlertView/SCLTimerDisplay.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 3d46cd2..c4bfe11 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 5866dcd..0f8c0c4 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // #import "SCLAlertView.h" diff --git a/SCLAlertView/SCLAlertViewResponder.h b/SCLAlertView/SCLAlertViewResponder.h index a705de6..0dfb77b 100644 --- a/SCLAlertView/SCLAlertViewResponder.h +++ b/SCLAlertView/SCLAlertViewResponder.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLAlertViewResponder.m b/SCLAlertView/SCLAlertViewResponder.m index d7a28a3..847ed9d 100644 --- a/SCLAlertView/SCLAlertViewResponder.m +++ b/SCLAlertView/SCLAlertViewResponder.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // #import "SCLAlertViewResponder.h" diff --git a/SCLAlertView/SCLAlertViewStyleKit.h b/SCLAlertView/SCLAlertViewStyleKit.h index 73fd4ba..9d7cc05 100644 --- a/SCLAlertView/SCLAlertViewStyleKit.h +++ b/SCLAlertView/SCLAlertViewStyleKit.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLAlertViewStyleKit.m b/SCLAlertView/SCLAlertViewStyleKit.m index 7fc0973..f467f47 100644 --- a/SCLAlertView/SCLAlertViewStyleKit.m +++ b/SCLAlertView/SCLAlertViewStyleKit.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // #import "SCLAlertViewStyleKit.h" diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index 3069ebe..2ae3f74 100755 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 1b509a8..056ce0c 100755 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // #import "SCLButton.h" diff --git a/SCLAlertView/SCLMacros.h b/SCLAlertView/SCLMacros.h index bb71567..255fb34 100644 --- a/SCLAlertView/SCLMacros.h +++ b/SCLAlertView/SCLMacros.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 10/03/15. -// Copyright (c) 2015-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved. // #ifndef SCL_MACROS_H diff --git a/SCLAlertView/SCLSwitchView.h b/SCLAlertView/SCLSwitchView.h index 236930d..ecc4d6c 100644 --- a/SCLAlertView/SCLSwitchView.h +++ b/SCLAlertView/SCLSwitchView.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by André Felipe Santos on 27/01/16. -// Copyright (c) 2016-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2016-2017 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLSwitchView.m b/SCLAlertView/SCLSwitchView.m index 10adc73..93662ac 100644 --- a/SCLAlertView/SCLSwitchView.m +++ b/SCLAlertView/SCLSwitchView.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by André Felipe Santos on 27/01/16. -// Copyright (c) 2016-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2016-2017 AnyKey Entertainment. All rights reserved. // #import "SCLSwitchView.h" diff --git a/SCLAlertView/SCLTextView.h b/SCLAlertView/SCLTextView.h index c597544..e691ef8 100644 --- a/SCLAlertView/SCLTextView.h +++ b/SCLAlertView/SCLTextView.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/18/15. -// Copyright (c) 2015-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved. // #if defined(__has_feature) && __has_feature(modules) diff --git a/SCLAlertView/SCLTextView.m b/SCLAlertView/SCLTextView.m index 00c98ab..c508359 100644 --- a/SCLAlertView/SCLTextView.m +++ b/SCLAlertView/SCLTextView.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/18/15. -// Copyright (c) 2015-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved. // #import "SCLTextView.h" diff --git a/SCLAlertView/SCLTimerDisplay.h b/SCLAlertView/SCLTimerDisplay.h index 548983d..51b28eb 100644 --- a/SCLAlertView/SCLTimerDisplay.h +++ b/SCLAlertView/SCLTimerDisplay.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Taylor Ryan on 8/18/15. -// Copyright (c) 2015-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved. // // Taken from https://stackoverflow.com/questions/11783439/uibutton-with-timer From d05dca9f48cd8a7cb5e4a28c0bde5b377cf5f5c7 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 6 Sep 2017 14:58:16 -0300 Subject: [PATCH 178/250] Fix some XCode warnings --- SCLAlertView/SCLAlertView.h | 28 ++++++++++++++-------------- SCLAlertView/SCLButton.h | 2 +- SCLAlertView/SCLMacros.h | 4 ++++ SCLAlertView/SCLTimerDisplay.h | 4 ++-- SCLAlertView/SCLTimerDisplay.m | 7 ++----- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index c4bfe11..5868b62 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -94,71 +94,71 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) * A boolean value that determines whether to tint the SCLAlertView top circle. * (Default: YES) */ -@property BOOL tintTopCircle; +@property (assign, nonatomic) BOOL tintTopCircle; /** Use larger icon * * A boolean value that determines whether to make the SCLAlertView top circle icon larger. * (Default: NO) */ -@property BOOL useLargerIcon; +@property (assign, nonatomic) BOOL useLargerIcon; /** Title Label * * The text displayed as title. */ -@property UILabel *labelTitle; +@property (strong, nonatomic) UILabel *labelTitle; /** Text view with the body message * * Holds the textview. */ -@property UITextView *viewText; +@property (strong, nonatomic) UITextView *viewText; /** Activity Indicator * * Holds the activityIndicator. */ -@property UIActivityIndicatorView *activityIndicatorView; +@property (strong, nonatomic) UIActivityIndicatorView *activityIndicatorView; /** Dismiss on tap outside * * A boolean value that determines whether to dismiss when tapping outside the SCLAlertView. * (Default: NO) */ -@property (nonatomic, assign) BOOL shouldDismissOnTapOutside; +@property (assign, nonatomic) BOOL shouldDismissOnTapOutside; /** Sound URL * * Holds the sound NSURL path. */ -@property (nonatomic, strong) NSURL *soundURL; +@property (strong, nonatomic) NSURL *soundURL; /** Set text attributed format block * * Holds the attributed string. */ -@property (nonatomic, copy) SCLAttributedFormatBlock attributedFormatBlock; +@property (copy, nonatomic) SCLAttributedFormatBlock attributedFormatBlock; /** Set Complete button format block. * * Holds the button format block. * Support keys : backgroundColor, borderWidth, borderColor, textColor */ -@property (nonatomic, copy) CompleteButtonFormatBlock completeButtonFormatBlock; +@property (copy, nonatomic) CompleteButtonFormatBlock completeButtonFormatBlock; /** Set button format block. * * Holds the button format block. * Support keys : backgroundColor, borderWidth, borderColor, textColor */ -@property (nonatomic, copy) ButtonFormatBlock buttonFormatBlock; +@property (copy, nonatomic) ButtonFormatBlock buttonFormatBlock; /** Set force hide block. * * When set force hideview method invocation. */ -@property (nonatomic, copy) SCLForceHideBlock forceHideBlock; +@property (copy, nonatomic) SCLForceHideBlock forceHideBlock; /** Hide animation type * @@ -186,19 +186,19 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) * SCLAlertView custom color. * (Buttons, top circle and borders) */ -@property (nonatomic, strong) UIColor *customViewColor; +@property (strong, nonatomic) UIColor *customViewColor; /** Set custom color to SCLAlertView background. * * SCLAlertView background custom color. */ -@property (nonatomic, strong) UIColor *backgroundViewColor; +@property (strong, nonatomic) UIColor *backgroundViewColor; /** Set custom tint color for icon image. * * SCLAlertView icon tint color */ -@property (nonatomic, strong) UIColor *iconTintColor; +@property (strong, nonatomic) UIColor *iconTintColor; /** Set custom circle icon height. * diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index 2ae3f74..a1fb3a5 100755 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -91,7 +91,7 @@ typedef NS_ENUM(NSInteger, SCLActionType) * * Holds the button timer, if present. */ -@property (nonatomic) SCLTimerDisplay *timer; +@property (strong, nonatomic) SCLTimerDisplay *timer; /** Init method * diff --git a/SCLAlertView/SCLMacros.h b/SCLAlertView/SCLMacros.h index 255fb34..1fec837 100644 --- a/SCLAlertView/SCLMacros.h +++ b/SCLAlertView/SCLMacros.h @@ -14,6 +14,10 @@ colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] +#define DEGREES_TO_RADIANS(degrees) ((M_PI * degrees)/ 180) +#define TIMER_STEP .01 +#define START_DEGREE_OFFSET -90 + #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) diff --git a/SCLAlertView/SCLTimerDisplay.h b/SCLAlertView/SCLTimerDisplay.h index 51b28eb..2f9bc18 100644 --- a/SCLAlertView/SCLTimerDisplay.h +++ b/SCLAlertView/SCLTimerDisplay.h @@ -26,8 +26,8 @@ @property CGFloat currentAngle; @property NSInteger buttonIndex; -@property (nonatomic) UIColor *color; -@property (nonatomic) BOOL reverse; +@property (strong, nonatomic) UIColor *color; +@property (assign, nonatomic) BOOL reverse; - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r; - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFloat)width; diff --git a/SCLAlertView/SCLTimerDisplay.m b/SCLAlertView/SCLTimerDisplay.m index 1cd3712..6921e81 100644 --- a/SCLAlertView/SCLTimerDisplay.m +++ b/SCLAlertView/SCLTimerDisplay.m @@ -3,10 +3,11 @@ // SCLAlertView // // Created by Taylor Ryan on 8/18/15. -// Copyright (c) 2015-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved. // #import "SCLTimerDisplay.h" +#import "SCLMacros.h" @interface SCLTimerDisplay () @@ -16,10 +17,6 @@ @interface SCLTimerDisplay () @implementation SCLTimerDisplay -#define DEGREES_TO_RADIANS(degrees) ((M_PI * degrees)/ 180) -#define TIMER_STEP .01 -#define START_DEGREE_OFFSET -90 - @synthesize currentAngle; - (instancetype)initWithFrame:(CGRect)frame From 13591f6300e63e3fa8094010e347d9c2f9d56e9a Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 6 Sep 2017 15:05:20 -0300 Subject: [PATCH 179/250] Update travis xcode --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d438e72..9158c8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ # reference: http://www.objc.io/issue-6/travis-ci.html language: objective-c -osx_image: xcode8 +osx_image: xcode8.3 script: - xcodebuild -project SCLAlertView.xcodeproj -target SCLAlertView -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO \ No newline at end of file From 7272c191cdf62c80171238131a14d4b34b50817d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 27 Sep 2017 20:03:42 -0300 Subject: [PATCH 180/250] Update Xcode settings --- SCLAlertView.xcodeproj/project.pbxproj | 14 +++++++++++++- .../xcschemes/SCLAlertViewFramework.xcscheme | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index a7f9f76..7178e22 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -332,7 +332,7 @@ DDB15F9519D5B7C600173158 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "AnyKey Entertainment"; TargetAttributes = { DDB15F9C19D5B7C600173158 = { @@ -467,14 +467,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -513,14 +519,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; diff --git a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme index 3c77347..dc021f3 100644 --- a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme +++ b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" From 4e5fa677583af0f2f8244fcd17a5002c8b978321 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Sat, 4 Nov 2017 12:06:01 -0700 Subject: [PATCH 181/250] fix voiceover accessibility of the alert view --- SCLAlertView/SCLAlertView.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 0f8c0c4..0bac909 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -184,6 +184,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth // Init _labelTitle = [[UILabel alloc] init]; _viewText = [[UITextView alloc] init]; + _viewText.accessibilityTraits = UIAccessibilityTraitStaticText; _contentView = [[UIView alloc] init]; _circleView = [[UIView alloc] init]; _circleViewBackground = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, kCircleHeightBackground, kCircleHeightBackground)]; @@ -192,6 +193,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _buttons = [[NSMutableArray alloc] init]; _inputs = [[NSMutableArray alloc] init]; _customViews = [[NSMutableArray alloc] init]; + self.view.accessibilityViewIsModal = YES; // Add Subviews [self.view addSubview:_contentView]; @@ -259,6 +261,7 @@ - (void)setupNewWindow alertWindow.windowLevel = UIWindowLevelAlert; alertWindow.backgroundColor = [UIColor clearColor]; alertWindow.rootViewController = self; + alertWindow.accessibilityViewIsModal = YES; self.SCLAlertWindow = alertWindow; self.usingNewWindow = YES; From 8297931ed5ad79ee82e2beb8fdab15589919ca65 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 17 Jan 2018 15:07:04 -0200 Subject: [PATCH 182/250] Fix wrong hide animations --- SCLAlertView/SCLAlertView.m | 77 +++++++++++++++---------------------- 1 file changed, 31 insertions(+), 46 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 0bac909..463c52e 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -254,23 +254,23 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _contentView.layer.borderColor = UIColorFromHEX(0xCCCCCC).CGColor; //Light Grey } -- (void)setupNewWindow -{ +- (void)setupNewWindow { + // Save previous window + self.previousWindow = [UIApplication sharedApplication].keyWindow; + // Create a new one to show the alert UIWindow *alertWindow = [[UIWindow alloc] initWithFrame:[self mainScreenFrame]]; alertWindow.windowLevel = UIWindowLevelAlert; alertWindow.backgroundColor = [UIColor clearColor]; - alertWindow.rootViewController = self; + alertWindow.rootViewController = [UIViewController new]; alertWindow.accessibilityViewIsModal = YES; self.SCLAlertWindow = alertWindow; - self.usingNewWindow = YES; } #pragma mark - Modal Validation -- (BOOL)isModal -{ +- (BOOL)isModal { return (_rootViewController != nil && _rootViewController.presentingViewController); } @@ -295,8 +295,7 @@ - (void)viewWillLayoutSubviews // Reposition inner circle appropriately CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); - if (_labelTitle.text == nil) - { + if (_labelTitle.text == nil) { kTitleTop = kCircleHeightBackground / 2; } } else { @@ -304,41 +303,35 @@ - (void)viewWillLayoutSubviews } // Check if the rootViewController is modal, if so we need to get the modal size not the main screen size - if([self isModal] && !_usingNewWindow) - { + if ([self isModal] && !_usingNewWindow) { sz = _rootViewController.view.frame.size; } - if (SYSTEM_VERSION_LESS_THAN(@"8.0")) - { + if (SYSTEM_VERSION_LESS_THAN(@"8.0")) { // iOS versions before 7.0 did not switch the width and height on device roration - if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) - { + if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { CGSize ssz = sz; sz = CGSizeMake(ssz.height, ssz.width); } } - // Set new background frame - CGRect newBackgroundFrame = self.backgroundView.frame; - newBackgroundFrame.size = sz; - self.backgroundView.frame = newBackgroundFrame; - // Set new main frame CGRect r; - if (self.view.superview != nil) - { + if (self.view.superview != nil) { // View is showing, position at center of screen r = CGRectMake((sz.width-_windowWidth)/2, (sz.height-_windowHeight)/2, _windowWidth, _windowHeight); - } - else - { + } else { // View is not visible, position outside screen bounds r = CGRectMake((sz.width-_windowWidth)/2, -_windowHeight, _windowWidth, _windowHeight); } + self.view.frame = r; + + // Set new background frame + CGRect newBackgroundFrame = self.backgroundView.frame; + newBackgroundFrame.size = sz; + self.backgroundView.frame = newBackgroundFrame; // Set frames - self.view.frame = r; _contentView.frame = CGRectMake(0.0f, 0.0f, _windowWidth, _windowHeight); _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; @@ -355,24 +348,21 @@ - (void)viewWillLayoutSubviews } y += _subTitleHeight + 14.0f; - for (SCLTextView *textField in _inputs) - { + for (SCLTextView *textField in _inputs) { textField.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, textField.frame.size.height); textField.layer.cornerRadius = 3.0f; y += textField.frame.size.height + 10.0f; } // Custom views - for (UIView *view in _customViews) - { + for (UIView *view in _customViews) { view.frame = CGRectMake(12.0f, y, view.frame.size.width, view.frame.size.height); y += view.frame.size.height + 10.0f; } // Buttons CGFloat x = 12.0f; - for (SCLButton *btn in _buttons) - { + for (SCLButton *btn in _buttons) { btn.frame = CGRectMake(x, y, btn.frame.size.width, btn.frame.size.height); // Add horizontal or vertical offset acording on _horizontalButtons parameter @@ -802,17 +792,15 @@ - (void)addTimerToButtonIndex:(NSInteger)buttonIndex reverse:(BOOL)reverse - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle duration:(NSTimeInterval)duration completeText:(NSString *)completeText style:(SCLAlertViewStyle)style { - if(_usingNewWindow) - { - // Save previous window - self.previousWindow = [UIApplication sharedApplication].keyWindow; + if(_usingNewWindow) { + self.backgroundView.frame = _SCLAlertWindow.bounds; // Add window subview - [_SCLAlertWindow addSubview:_backgroundView]; - } - else - { + [_SCLAlertWindow.rootViewController addChildViewController:self]; + [_SCLAlertWindow.rootViewController.view addSubview:_backgroundView]; + [_SCLAlertWindow.rootViewController.view addSubview:self.view]; + } else { _rootViewController = vc; [self disableInteractivePopGesture]; @@ -1361,17 +1349,14 @@ - (void)fadeOutWithDuration:(NSTimeInterval)duration self.view.alpha = 0.0f; } completion:^(BOOL completed) { [self.backgroundView removeFromSuperview]; - if (_usingNewWindow) - { + [self.view removeFromSuperview]; + [self removeFromParentViewController]; + + if (_usingNewWindow) { // Remove current window [self.SCLAlertWindow setHidden:YES]; self.SCLAlertWindow = nil; } - else - { - [self.view removeFromSuperview]; - [self removeFromParentViewController]; - } if ( _dismissAnimationCompletionBlock ){ self.dismissAnimationCompletionBlock(); } From 2954860233c6ada570f0ed06ab9857805ea6254d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 17 Jan 2018 15:09:43 -0200 Subject: [PATCH 183/250] Bump version --- 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 284b1f0..db94af2 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 = "1.1.2" + spec.version = "1.1.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" From 51a2992526ff992a44fbdb193aa64bd2cc8a4579 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 18 Jan 2018 09:52:33 -0200 Subject: [PATCH 184/250] Add changelog file --- CHANGELOG.md | 699 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 699 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6792310 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,699 @@ +# Change Log + +## [Unreleased](https://github.com/dogo/SCLAlertView/tree/HEAD) + +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.3...HEAD) + +**Closed issues:** + +- SCLAlertViewHideAnimation wrong animations [\#262](https://github.com/dogo/SCLAlertView/issues/262) +- Use the builder pattern to build a SCLAlertView? [\#256](https://github.com/dogo/SCLAlertView/issues/256) +- Carthage Support [\#255](https://github.com/dogo/SCLAlertView/issues/255) + +## [1.1.3](https://github.com/dogo/SCLAlertView/tree/1.1.3) (2018-01-17) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.2...1.1.3) + +**Fixed bugs:** + +- Tap inside the alert will dismiss the alert when using new window and shouldDissmissOnTapOutside=YES [\#211](https://github.com/dogo/SCLAlertView/issues/211) +- crash on - \(void\)disableInteractivePopGesture [\#137](https://github.com/dogo/SCLAlertView/issues/137) + +**Closed issues:** + +- is it possible to change the text colour of title and subtitle of the alert??? [\#260](https://github.com/dogo/SCLAlertView/issues/260) +- not supporting for Swift 4.0 [\#257](https://github.com/dogo/SCLAlertView/issues/257) +- How to replace the latest SCLAlertView? [\#187](https://github.com/dogo/SCLAlertView/issues/187) +- UIWindow is not removed when alert showed and hided using new window [\#185](https://github.com/dogo/SCLAlertView/issues/185) +- Some issues with combination of device rotations. [\#182](https://github.com/dogo/SCLAlertView/issues/182) +- buttons from previous alertViews being displayed [\#167](https://github.com/dogo/SCLAlertView/issues/167) +- pop-up from pop-up enhancement [\#162](https://github.com/dogo/SCLAlertView/issues/162) + +**Merged pull requests:** + +- Fix VoiceOver accessibility [\#261](https://github.com/dogo/SCLAlertView/pull/261) ([tmm1](https://github.com/tmm1)) +- Fix for using as a carthage framework. [\#251](https://github.com/dogo/SCLAlertView/pull/251) ([hankinsoft](https://github.com/hankinsoft)) +- clerical error [\#249](https://github.com/dogo/SCLAlertView/pull/249) ([amisare](https://github.com/amisare)) + +## [1.1.2](https://github.com/dogo/SCLAlertView/tree/1.1.2) (2017-04-11) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.1...1.1.2) + +**Closed issues:** + +- support NSMutableAttributedString? [\#247](https://github.com/dogo/SCLAlertView/issues/247) +- SCLAlertview in a new window. \(No UIViewController\) : The window cannot be closed [\#246](https://github.com/dogo/SCLAlertView/issues/246) +- help add SCLAlertView in theos ??? [\#245](https://github.com/dogo/SCLAlertView/issues/245) +- SCLAlertView should build without warnings [\#243](https://github.com/dogo/SCLAlertView/issues/243) +- Access a Button [\#242](https://github.com/dogo/SCLAlertView/issues/242) +- window does not disappear when use hideView on first app run [\#237](https://github.com/dogo/SCLAlertView/issues/237) +- Command failed due to signal: Segmentation fault: 11 swift 3 [\#221](https://github.com/dogo/SCLAlertView/issues/221) + +## [1.1.1](https://github.com/dogo/SCLAlertView/tree/1.1.1) (2017-02-16) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.0...1.1.1) + +**Closed issues:** + +- delegate 应该使用weak修饰,否则会造成循环引用 SCLAlertView.swift Line 76 [\#240](https://github.com/dogo/SCLAlertView/issues/240) +- amazing ,but if we can custom button corlor not only custom main corlor [\#236](https://github.com/dogo/SCLAlertView/issues/236) +- XCode 8.2 language error [\#235](https://github.com/dogo/SCLAlertView/issues/235) +- Update CocoaPods [\#233](https://github.com/dogo/SCLAlertView/issues/233) +- Orientation issue in landscape when UIViewcontroller lock orientation in Portrait [\#168](https://github.com/dogo/SCLAlertView/issues/168) + +**Merged pull requests:** + +- added show animation completion block [\#241](https://github.com/dogo/SCLAlertView/pull/241) ([hydr93](https://github.com/hydr93)) +- Dismiss Animation Completion Block [\#239](https://github.com/dogo/SCLAlertView/pull/239) ([hydr93](https://github.com/hydr93)) + +## [1.1.0](https://github.com/dogo/SCLAlertView/tree/1.1.0) (2016-12-07) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.6...1.1.0) + +**Closed issues:** + +- Not centered vertically when presented in navigation controller [\#231](https://github.com/dogo/SCLAlertView/issues/231) +- Differentiate color of close/cancel button [\#228](https://github.com/dogo/SCLAlertView/issues/228) +- \[Request\] initial text and 'x' button in text entry [\#227](https://github.com/dogo/SCLAlertView/issues/227) +- One of the two will be used. Which one is undefined. [\#225](https://github.com/dogo/SCLAlertView/issues/225) + +**Merged pull requests:** + +- Add button custom font support when use buttonConfig block [\#232](https://github.com/dogo/SCLAlertView/pull/232) ([marcoslacerda](https://github.com/marcoslacerda)) +- fix the bug: dismiss SCLAlertViewHideAnimationSimplyDisappear hideAni… [\#230](https://github.com/dogo/SCLAlertView/pull/230) ([JoakimLiu](https://github.com/JoakimLiu)) +- Change auto-capitalisation to sentence only [\#229](https://github.com/dogo/SCLAlertView/pull/229) ([idrougge](https://github.com/idrougge)) + +## [1.0.6](https://github.com/dogo/SCLAlertView/tree/1.0.6) (2016-10-27) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.5...1.0.6) + +**Fixed bugs:** + +- Table title overlay of SCLAlertView [\#206](https://github.com/dogo/SCLAlertView/issues/206) + +**Closed issues:** + +- Keyboard pushes up the SCAlertView with IQKeyboardManager [\#223](https://github.com/dogo/SCLAlertView/issues/223) +- Space, when no Title, SubTitle and Image. [\#218](https://github.com/dogo/SCLAlertView/issues/218) +- carthage update fail for special platform [\#217](https://github.com/dogo/SCLAlertView/issues/217) +- Border color [\#216](https://github.com/dogo/SCLAlertView/issues/216) +- Conflict with the IQKeyboardManager [\#215](https://github.com/dogo/SCLAlertView/issues/215) +- Can't set selected on SCLSwitchView [\#214](https://github.com/dogo/SCLAlertView/issues/214) +- is it possible to change subtitle text while alert is showing? [\#213](https://github.com/dogo/SCLAlertView/issues/213) +- Execute block while 'showWaiting' running [\#197](https://github.com/dogo/SCLAlertView/issues/197) +- UIAppearance [\#72](https://github.com/dogo/SCLAlertView/issues/72) + +**Merged pull requests:** + +- Added missing setter in SCLSwitchView [\#226](https://github.com/dogo/SCLAlertView/pull/226) ([acerbetti](https://github.com/acerbetti)) +- Changed constants names to avoid name collision [\#224](https://github.com/dogo/SCLAlertView/pull/224) ([damarte](https://github.com/damarte)) + +## [1.0.5](https://github.com/dogo/SCLAlertView/tree/1.0.5) (2016-09-13) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.4...1.0.5) + +**Closed issues:** + +- SCLAlert view not covering Navigation or TabBar [\#219](https://github.com/dogo/SCLAlertView/issues/219) +- Button height support [\#212](https://github.com/dogo/SCLAlertView/issues/212) +- Statusbar Visible when showing the SCLAlertView [\#208](https://github.com/dogo/SCLAlertView/issues/208) +- Custom button height [\#207](https://github.com/dogo/SCLAlertView/issues/207) + +**Merged pull requests:** + +- Add umbrella header to exclude warnings during framework building [\#220](https://github.com/dogo/SCLAlertView/pull/220) ([alokard](https://github.com/alokard)) +- Add Carthage support [\#210](https://github.com/dogo/SCLAlertView/pull/210) ([alokard](https://github.com/alokard)) +- docs: nativescript integration mention [\#209](https://github.com/dogo/SCLAlertView/pull/209) ([NathanWalker](https://github.com/NathanWalker)) + +## [1.0.4](https://github.com/dogo/SCLAlertView/tree/1.0.4) (2016-06-21) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.3...1.0.4) + +**Closed issues:** + +- alert view not work [\#205](https://github.com/dogo/SCLAlertView/issues/205) +- Custom Button Color? [\#204](https://github.com/dogo/SCLAlertView/issues/204) +- ShowWaiting timer error [\#202](https://github.com/dogo/SCLAlertView/issues/202) + +## [1.0.3](https://github.com/dogo/SCLAlertView/tree/1.0.3) (2016-05-03) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.2...1.0.3) + +**Closed issues:** + +- Alerts all placed on top of the nav bar [\#196](https://github.com/dogo/SCLAlertView/issues/196) +- View Hangs after SCLAlert is dismissed when alert is initiated from an action sheet button. [\#173](https://github.com/dogo/SCLAlertView/issues/173) +- After scrolling uitabelview SCLAlertView not working & multiple alert window show [\#169](https://github.com/dogo/SCLAlertView/issues/169) + +**Merged pull requests:** + +- New Feature: Horizontal alignment for buttons. [\#203](https://github.com/dogo/SCLAlertView/pull/203) ([jaespinmora](https://github.com/jaespinmora)) +- Adds show/hide AnimationTypes 'SimplyAppear' and 'SimplyDisappear' i.e., 'None' [\#198](https://github.com/dogo/SCLAlertView/pull/198) ([AmitaiB](https://github.com/AmitaiB)) + +## [1.0.2](https://github.com/dogo/SCLAlertView/tree/1.0.2) (2016-03-16) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.1...1.0.2) + +## [1.0.1](https://github.com/dogo/SCLAlertView/tree/1.0.1) (2016-03-08) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.0...1.0.1) + +## [1.0.0](https://github.com/dogo/SCLAlertView/tree/1.0.0) (2016-03-07) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.9.3...1.0.0) + +**Closed issues:** + +- Is SCLAlertView version indicated? [\#188](https://github.com/dogo/SCLAlertView/issues/188) +- Add DSL for simple setup [\#186](https://github.com/dogo/SCLAlertView/issues/186) +- second button no working [\#184](https://github.com/dogo/SCLAlertView/issues/184) +- when I pop multi-SCLAlertViews at the same time,then the window will become entirely black. [\#159](https://github.com/dogo/SCLAlertView/issues/159) + +**Merged pull requests:** + +- fluent: show block added [\#195](https://github.com/dogo/SCLAlertView/pull/195) ([lolgear](https://github.com/lolgear)) +- Fluent style support extension [\#194](https://github.com/dogo/SCLAlertView/pull/194) ([lolgear](https://github.com/lolgear)) +- Devlop [\#190](https://github.com/dogo/SCLAlertView/pull/190) ([changcode](https://github.com/changcode)) +- Fluent style support [\#189](https://github.com/dogo/SCLAlertView/pull/189) ([lolgear](https://github.com/lolgear)) + +## [0.9.3](https://github.com/dogo/SCLAlertView/tree/0.9.3) (2016-03-03) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.9.2...0.9.3) + +**Implemented enhancements:** + +- Add bounce animation to all slides [\#116](https://github.com/dogo/SCLAlertView/issues/116) + +## [0.9.2](https://github.com/dogo/SCLAlertView/tree/0.9.2) (2016-03-03) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.9.1...0.9.2) + +**Closed issues:** + +- Vertical spacing broken on 0.9.0 [\#183](https://github.com/dogo/SCLAlertView/issues/183) + +## [0.9.1](https://github.com/dogo/SCLAlertView/tree/0.9.1) (2016-02-15) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.9.0...0.9.1) + +## [0.9.0](https://github.com/dogo/SCLAlertView/tree/0.9.0) (2016-02-10) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.8.2...0.9.0) + +**Implemented enhancements:** + +- Tickbox enhancement [\#40](https://github.com/dogo/SCLAlertView/issues/40) +- Switch Alert feature [\#177](https://github.com/dogo/SCLAlertView/pull/177) ([andre-felipe](https://github.com/andre-felipe)) + +**Closed issues:** + +- Anyway to set the popup position? Like height to top? [\#180](https://github.com/dogo/SCLAlertView/issues/180) +- Show alert while running a block [\#176](https://github.com/dogo/SCLAlertView/issues/176) +- Button actionBlocks not working [\#175](https://github.com/dogo/SCLAlertView/issues/175) +- Lag when showing view for first time [\#174](https://github.com/dogo/SCLAlertView/issues/174) +- title width enhancement? [\#166](https://github.com/dogo/SCLAlertView/issues/166) +- Dismiss method? [\#157](https://github.com/dogo/SCLAlertView/issues/157) + +**Merged pull requests:** + +- Change play sound class [\#171](https://github.com/dogo/SCLAlertView/pull/171) ([Liqiankun](https://github.com/Liqiankun)) + +## [0.8.2](https://github.com/dogo/SCLAlertView/tree/0.8.2) (2016-01-22) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.8.1...0.8.2) + +**Closed issues:** + +- Memory leak using new window way to display [\#142](https://github.com/dogo/SCLAlertView/issues/142) + +## [0.8.1](https://github.com/dogo/SCLAlertView/tree/0.8.1) (2016-01-21) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.8.0...0.8.1) + +**Fixed bugs:** + +- Subtitle does not appear if title is set to nil or empty [\#99](https://github.com/dogo/SCLAlertView/issues/99) + +**Closed issues:** + +- when iOS8,use [\#172](https://github.com/dogo/SCLAlertView/issues/172) +- No Subtitle visible with iOS8.1 [\#164](https://github.com/dogo/SCLAlertView/issues/164) +- Multitasking Split Screen Bug [\#158](https://github.com/dogo/SCLAlertView/issues/158) + +## [0.8.0](https://github.com/dogo/SCLAlertView/tree/0.8.0) (2015-12-29) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.9...0.8.0) + +**Fixed bugs:** + +- iPad pro split screen support [\#149](https://github.com/dogo/SCLAlertView/issues/149) + +**Closed issues:** + +- Adding a new SCLAlertViewStyle: Question [\#161](https://github.com/dogo/SCLAlertView/issues/161) +- alignment of BodyText.. [\#160](https://github.com/dogo/SCLAlertView/issues/160) +- Is this compatible with retina displays? [\#156](https://github.com/dogo/SCLAlertView/issues/156) +- keyboard bug [\#155](https://github.com/dogo/SCLAlertView/issues/155) +- How do I add SCLAlertView to TheOs project? [\#151](https://github.com/dogo/SCLAlertView/issues/151) +- Make the bounce animation a separate animation [\#150](https://github.com/dogo/SCLAlertView/issues/150) +- SCLAlertView is not working!!!!!!! [\#148](https://github.com/dogo/SCLAlertView/issues/148) +- background does not update if rotate device [\#145](https://github.com/dogo/SCLAlertView/issues/145) + +**Merged pull requests:** + +- Fix for \#164 no Subtitles with iOS8 [\#165](https://github.com/dogo/SCLAlertView/pull/165) ([jusefjames](https://github.com/jusefjames)) +- Develop [\#163](https://github.com/dogo/SCLAlertView/pull/163) ([jusefjames](https://github.com/jusefjames)) +- Prevent viewText scrollable [\#154](https://github.com/dogo/SCLAlertView/pull/154) ([AzulesM](https://github.com/AzulesM)) +- Fixing centering problem when used in iPad split view [\#153](https://github.com/dogo/SCLAlertView/pull/153) ([abbasmousavi](https://github.com/abbasmousavi)) +- To get the correct subtitle height [\#152](https://github.com/dogo/SCLAlertView/pull/152) ([AzulesM](https://github.com/AzulesM)) + +## [0.7.9](https://github.com/dogo/SCLAlertView/tree/0.7.9) (2015-10-20) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.7...0.7.9) + +**Fixed bugs:** + +- Keyboard & rotation [\#52](https://github.com/dogo/SCLAlertView/issues/52) + +**Closed issues:** + +- Get rid of the icon [\#147](https://github.com/dogo/SCLAlertView/issues/147) +- Strong reference [\#126](https://github.com/dogo/SCLAlertView/issues/126) + +**Merged pull requests:** + +- Added status bar customization [\#146](https://github.com/dogo/SCLAlertView/pull/146) ([D-32](https://github.com/D-32)) +- Namespace SCLActionTypes to avoid conflicts [\#144](https://github.com/dogo/SCLAlertView/pull/144) ([mbelkin](https://github.com/mbelkin)) + +## [0.7.7](https://github.com/dogo/SCLAlertView/tree/0.7.7) (2015-09-17) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.6...0.7.7) + +**Closed issues:** + +- AlertView created by initWithNewWindow does not dismiss when touch outside [\#143](https://github.com/dogo/SCLAlertView/issues/143) +- Prepopulate alertview [\#138](https://github.com/dogo/SCLAlertView/issues/138) +- Modules enabled but still getting disabled error [\#136](https://github.com/dogo/SCLAlertView/issues/136) + +## [0.7.6](https://github.com/dogo/SCLAlertView/tree/0.7.6) (2015-09-15) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.5...0.7.6) + +## [0.7.5](https://github.com/dogo/SCLAlertView/tree/0.7.5) (2015-09-02) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.4...0.7.5) + +**Closed issues:** + +- Adding a countdown to a default button [\#113](https://github.com/dogo/SCLAlertView/issues/113) + +**Merged pull requests:** + +- Feature/countdown timer [\#140](https://github.com/dogo/SCLAlertView/pull/140) ([yatryan](https://github.com/yatryan)) +- Dynamically set button height to allow for multiple lines of text. [\#139](https://github.com/dogo/SCLAlertView/pull/139) ([yatryan](https://github.com/yatryan)) + +## [0.7.4](https://github.com/dogo/SCLAlertView/tree/0.7.4) (2015-07-29) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.3...0.7.4) + +**Closed issues:** + +- Parenthesis missing in SCLAlertView.m [\#133](https://github.com/dogo/SCLAlertView/issues/133) +- I can't see the added button [\#132](https://github.com/dogo/SCLAlertView/issues/132) +- Subtitle issue not showing properly - urgent [\#131](https://github.com/dogo/SCLAlertView/issues/131) +- adding more control method [\#130](https://github.com/dogo/SCLAlertView/issues/130) +- Swift use [\#129](https://github.com/dogo/SCLAlertView/issues/129) +- How to change default button label? [\#128](https://github.com/dogo/SCLAlertView/issues/128) +- Alertview without the round circle above. [\#125](https://github.com/dogo/SCLAlertView/issues/125) +- previous alert won't go away if new 1 appears [\#124](https://github.com/dogo/SCLAlertView/issues/124) +- when i rename AppDelegate.m to app AppDelegate.mm build error [\#121](https://github.com/dogo/SCLAlertView/issues/121) +- Unable to move alertView so keyboard covers the fields on the alert. [\#118](https://github.com/dogo/SCLAlertView/issues/118) +- with textfield how to set ok button status to disable when the textfiled input not valid [\#115](https://github.com/dogo/SCLAlertView/issues/115) + +**Merged pull requests:** + +- fix bug [\#135](https://github.com/dogo/SCLAlertView/pull/135) ([HuylensHu](https://github.com/HuylensHu)) +- fix bug [\#134](https://github.com/dogo/SCLAlertView/pull/134) ([HuylensHu](https://github.com/HuylensHu)) + +## [0.7.3](https://github.com/dogo/SCLAlertView/tree/0.7.3) (2015-06-10) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.2...0.7.3) + +**Closed issues:** + +- check TextField.text is empty. [\#122](https://github.com/dogo/SCLAlertView/issues/122) + +## [0.7.2](https://github.com/dogo/SCLAlertView/tree/0.7.2) (2015-05-29) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.1...0.7.2) + +**Fixed bugs:** + +- Long texts truncated when using custom font [\#84](https://github.com/dogo/SCLAlertView/issues/84) + +**Closed issues:** + +- Pod Install [\#114](https://github.com/dogo/SCLAlertView/issues/114) +- Using SCLAlertView with Swift [\#110](https://github.com/dogo/SCLAlertView/issues/110) +- XCode 6.3 Warning: roperty access is using 'setSubTitleHeight:' method which is deprecated [\#105](https://github.com/dogo/SCLAlertView/issues/105) +- Enhancement: Support iOS 8 Widget frame position [\#102](https://github.com/dogo/SCLAlertView/issues/102) + +**Merged pull requests:** + +- restore interactivePopGesture to previous state \#2 [\#120](https://github.com/dogo/SCLAlertView/pull/120) ([crowriot](https://github.com/crowriot)) +- If defaultBackgroundColor is preconfigured for button its not changed to... [\#109](https://github.com/dogo/SCLAlertView/pull/109) ([alex1704](https://github.com/alex1704)) + +## [0.7.1](https://github.com/dogo/SCLAlertView/tree/0.7.1) (2015-05-04) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.0...0.7.1) + +**Fixed bugs:** + +- SlideInFromCenter show animation with blur UI issue [\#92](https://github.com/dogo/SCLAlertView/issues/92) + +**Closed issues:** + +- When presenting with textField and 2 buttons keyboard cuts off bottom bottom. [\#108](https://github.com/dogo/SCLAlertView/issues/108) +- Using SCLAlert as HUD [\#106](https://github.com/dogo/SCLAlertView/issues/106) +- Does not work on iOS 8 App Extension - 2 Errors [\#101](https://github.com/dogo/SCLAlertView/issues/101) +- EXC\_BAD\_ACCESS [\#100](https://github.com/dogo/SCLAlertView/issues/100) +- Navigation bar not hiding [\#95](https://github.com/dogo/SCLAlertView/issues/95) +- Alert is behind the keyboard [\#80](https://github.com/dogo/SCLAlertView/issues/80) + +**Merged pull requests:** + +- Fix Crash for iOS 7 [\#104](https://github.com/dogo/SCLAlertView/pull/104) ([imkevinxu](https://github.com/imkevinxu)) +- ignore depreceted inside SCLAlertView [\#103](https://github.com/dogo/SCLAlertView/pull/103) ([jcavar](https://github.com/jcavar)) + +## [0.7.0](https://github.com/dogo/SCLAlertView/tree/0.7.0) (2015-04-01) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.6.1...0.7.0) + +**Fixed bugs:** + +- shouldDismissOnTapOutside not working [\#87](https://github.com/dogo/SCLAlertView/issues/87) +- Custom Icon Image's size is too small [\#86](https://github.com/dogo/SCLAlertView/issues/86) +- Rotate - rotate on Ipad [\#82](https://github.com/dogo/SCLAlertView/issues/82) +- SCLAlertView's button does not show up on iOS 7 [\#81](https://github.com/dogo/SCLAlertView/issues/81) + +**Closed issues:** + +- "use of @import when modules are disabled error" [\#77](https://github.com/dogo/SCLAlertView/issues/77) + +**Merged pull requests:** + +- fix screen stutter glitch with blur background [\#96](https://github.com/dogo/SCLAlertView/pull/96) ([felix-dumit](https://github.com/felix-dumit)) +- Fixes a bug where you could not set Font attributes on the attributed st... [\#88](https://github.com/dogo/SCLAlertView/pull/88) ([n1mda](https://github.com/n1mda)) + +## [0.6.1](https://github.com/dogo/SCLAlertView/tree/0.6.1) (2015-03-23) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.6.0...0.6.1) + +## [0.6.0](https://github.com/dogo/SCLAlertView/tree/0.6.0) (2015-03-22) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.9...0.6.0) + +**Closed issues:** + +- new alert flick [\#83](https://github.com/dogo/SCLAlertView/issues/83) + +**Merged pull requests:** + +- Automatically add a borderWidth to the button if borderColor is defined [\#85](https://github.com/dogo/SCLAlertView/pull/85) ([jeremygrenier](https://github.com/jeremygrenier)) + +## [0.5.9](https://github.com/dogo/SCLAlertView/tree/0.5.9) (2015-03-18) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.8...0.5.9) + +## [0.5.8](https://github.com/dogo/SCLAlertView/tree/0.5.8) (2015-03-17) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.7...0.5.8) + +**Implemented enhancements:** + +- Custom button height feature request [\#71](https://github.com/dogo/SCLAlertView/issues/71) + +## [0.5.7](https://github.com/dogo/SCLAlertView/tree/0.5.7) (2015-03-16) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.6...0.5.7) + +**Closed issues:** + +- Crash in background thread [\#76](https://github.com/dogo/SCLAlertView/issues/76) +- Add button feature - button type [\#75](https://github.com/dogo/SCLAlertView/issues/75) +- BOOL visibility of alert needed [\#73](https://github.com/dogo/SCLAlertView/issues/73) + +## [0.5.6](https://github.com/dogo/SCLAlertView/tree/0.5.6) (2015-03-05) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.5...0.5.6) + +**Fixed bugs:** + +- Latest Version Fails To Build [\#74](https://github.com/dogo/SCLAlertView/issues/74) + +## [0.5.5](https://github.com/dogo/SCLAlertView/tree/0.5.5) (2015-02-22) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.4...0.5.5) + +**Closed issues:** + +- Execute block on dismissal [\#69](https://github.com/dogo/SCLAlertView/issues/69) + +**Merged pull requests:** + +- Minor icon and button customization fixes [\#70](https://github.com/dogo/SCLAlertView/pull/70) ([wzs](https://github.com/wzs)) + +## [0.5.4](https://github.com/dogo/SCLAlertView/tree/0.5.4) (2015-02-13) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.3...0.5.4) + +**Implemented enhancements:** + +- AlertView does not disable Interactive Pop Gesture [\#66](https://github.com/dogo/SCLAlertView/issues/66) +- Blur background is wrong when shown from "UIModalPresentationFormSheet" [\#65](https://github.com/dogo/SCLAlertView/issues/65) +- Add custom view [\#62](https://github.com/dogo/SCLAlertView/issues/62) +- SCLAlertView color [\#57](https://github.com/dogo/SCLAlertView/issues/57) +- Long texts truncated [\#38](https://github.com/dogo/SCLAlertView/issues/38) + +**Fixed bugs:** + +- AlertView does not disable Interactive Pop Gesture [\#66](https://github.com/dogo/SCLAlertView/issues/66) +- Blur background is wrong when shown from "UIModalPresentationFormSheet" [\#65](https://github.com/dogo/SCLAlertView/issues/65) +- The white background view is too long [\#53](https://github.com/dogo/SCLAlertView/issues/53) + +## [0.5.3](https://github.com/dogo/SCLAlertView/tree/0.5.3) (2015-02-02) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.2...0.5.3) + +**Fixed bugs:** + +- Alert Moves Upwards When Switching Keyboards [\#45](https://github.com/dogo/SCLAlertView/issues/45) + +**Closed issues:** + +- textarea in alert [\#61](https://github.com/dogo/SCLAlertView/issues/61) + +## [0.5.2](https://github.com/dogo/SCLAlertView/tree/0.5.2) (2015-01-27) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.1...0.5.2) + +**Implemented enhancements:** + +- background none [\#54](https://github.com/dogo/SCLAlertView/issues/54) + +**Closed issues:** + +- ability to only show one alert [\#56](https://github.com/dogo/SCLAlertView/issues/56) + +## [0.5.1](https://github.com/dogo/SCLAlertView/tree/0.5.1) (2015-01-26) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.0...0.5.1) + +**Implemented enhancements:** + +- Without SubTitle? [\#18](https://github.com/dogo/SCLAlertView/issues/18) + +**Fixed bugs:** + +- Device rotations support [\#51](https://github.com/dogo/SCLAlertView/issues/51) + +**Closed issues:** + +- how to customize buttons separately? [\#55](https://github.com/dogo/SCLAlertView/issues/55) +- Rotating with keyboard [\#36](https://github.com/dogo/SCLAlertView/issues/36) + +## [0.5.0](https://github.com/dogo/SCLAlertView/tree/0.5.0) (2015-01-21) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.4.3...0.5.0) + +**Fixed bugs:** + +- Display in formsheet [\#50](https://github.com/dogo/SCLAlertView/issues/50) + +## [0.4.3](https://github.com/dogo/SCLAlertView/tree/0.4.3) (2015-01-20) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.4.2...0.4.3) + +**Closed issues:** + +- Change Title Size [\#42](https://github.com/dogo/SCLAlertView/issues/42) + +## [0.4.2](https://github.com/dogo/SCLAlertView/tree/0.4.2) (2015-01-20) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.4.1...0.4.2) + +**Closed issues:** + +- iPad vs iPhone NavigationBar [\#46](https://github.com/dogo/SCLAlertView/issues/46) +- does not work with UIPIckview [\#26](https://github.com/dogo/SCLAlertView/issues/26) + +## [0.4.1](https://github.com/dogo/SCLAlertView/tree/0.4.1) (2015-01-19) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.4.0...0.4.1) + +**Closed issues:** + +- Can i write the code anywhere? [\#49](https://github.com/dogo/SCLAlertView/issues/49) +- Landscape not working on iPad [\#48](https://github.com/dogo/SCLAlertView/issues/48) + +## [0.4.0](https://github.com/dogo/SCLAlertView/tree/0.4.0) (2015-01-19) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.9...0.4.0) + +**Fixed bugs:** + +- iPad landscape orientation for iOS \< 8 is not supported [\#41](https://github.com/dogo/SCLAlertView/issues/41) + +**Closed issues:** + +- Alert Moves After Keyboard Dismisses [\#44](https://github.com/dogo/SCLAlertView/issues/44) +- Change Edit Alert Color [\#43](https://github.com/dogo/SCLAlertView/issues/43) + +**Merged pull requests:** + +- fix \#44 [\#47](https://github.com/dogo/SCLAlertView/pull/47) ([portwatcher](https://github.com/portwatcher)) + +## [0.3.9](https://github.com/dogo/SCLAlertView/tree/0.3.9) (2015-01-15) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.8...0.3.9) + +## [0.3.8](https://github.com/dogo/SCLAlertView/tree/0.3.8) (2015-01-12) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.7...0.3.8) + +**Implemented enhancements:** + +- Improvement: progress dialog [\#15](https://github.com/dogo/SCLAlertView/issues/15) + +**Closed issues:** + +- alertview position issue [\#39](https://github.com/dogo/SCLAlertView/issues/39) + +## [0.3.7](https://github.com/dogo/SCLAlertView/tree/0.3.7) (2014-12-13) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.6...0.3.7) + +**Closed issues:** + +- Auto window height by subtitle height [\#29](https://github.com/dogo/SCLAlertView/issues/29) + +**Merged pull requests:** + +- New features [\#37](https://github.com/dogo/SCLAlertView/pull/37) ([michalciolek](https://github.com/michalciolek)) +- Last fix [\#35](https://github.com/dogo/SCLAlertView/pull/35) ([ancloid](https://github.com/ancloid)) +- Subtitle Height Setting [\#34](https://github.com/dogo/SCLAlertView/pull/34) ([ancloid](https://github.com/ancloid)) + +## [0.3.6](https://github.com/dogo/SCLAlertView/tree/0.3.6) (2014-12-09) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.5...0.3.6) + +**Closed issues:** + +- Alert Positioning in TableView [\#32](https://github.com/dogo/SCLAlertView/issues/32) +- slow [\#31](https://github.com/dogo/SCLAlertView/issues/31) +- Backbutton while SCLAlertView is shown causes zombie views [\#25](https://github.com/dogo/SCLAlertView/issues/25) + +**Merged pull requests:** + +- modified podspec file to support iOS6 [\#33](https://github.com/dogo/SCLAlertView/pull/33) ([shannonchou](https://github.com/shannonchou)) + +## [0.3.5](https://github.com/dogo/SCLAlertView/tree/0.3.5) (2014-11-28) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.4...0.3.5) + +**Implemented enhancements:** + +- typedef ValidationBlock name conflicting [\#27](https://github.com/dogo/SCLAlertView/issues/27) + +**Closed issues:** + +- Now broken on iOS6 [\#30](https://github.com/dogo/SCLAlertView/issues/30) +- EXC\_BAD\_ACCESS \(code=1\) [\#28](https://github.com/dogo/SCLAlertView/issues/28) + +## [0.3.4](https://github.com/dogo/SCLAlertView/tree/0.3.4) (2014-11-14) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.3...0.3.4) + +**Closed issues:** + +- Any way to show this from a UIView? [\#11](https://github.com/dogo/SCLAlertView/issues/11) + +## [0.3.3](https://github.com/dogo/SCLAlertView/tree/0.3.3) (2014-11-11) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.2...0.3.3) + +## [0.3.2](https://github.com/dogo/SCLAlertView/tree/0.3.2) (2014-11-05) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.1...0.3.2) + +**Fixed bugs:** + +- Alert view keep on moving upwards on different UIKeyboardType [\#23](https://github.com/dogo/SCLAlertView/issues/23) + +**Closed issues:** + +- Any of the showAnimationType not working [\#22](https://github.com/dogo/SCLAlertView/issues/22) + +## [0.3.1](https://github.com/dogo/SCLAlertView/tree/0.3.1) (2014-11-04) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.0...0.3.1) + +## [0.3.0](https://github.com/dogo/SCLAlertView/tree/0.3.0) (2014-11-04) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.6...0.3.0) + +**Implemented enhancements:** + +- Is possible to bind action on default button? [\#4](https://github.com/dogo/SCLAlertView/issues/4) + +**Fixed bugs:** + +- typedef ActionBlock name confliction [\#16](https://github.com/dogo/SCLAlertView/issues/16) +- crash on ios6.1 [\#13](https://github.com/dogo/SCLAlertView/issues/13) + +**Closed issues:** + +- hi, a suggestion of one line about subTitle's height [\#24](https://github.com/dogo/SCLAlertView/issues/24) +- Add image to Alertview? [\#21](https://github.com/dogo/SCLAlertView/issues/21) +- Position not always correct [\#20](https://github.com/dogo/SCLAlertView/issues/20) +- Issue when displaying alert view in landscape [\#14](https://github.com/dogo/SCLAlertView/issues/14) + +**Merged pull requests:** + +- fix showAnimation bug [\#19](https://github.com/dogo/SCLAlertView/pull/19) ([sanshanchuns](https://github.com/sanshanchuns)) + +## [0.2.6](https://github.com/dogo/SCLAlertView/tree/0.2.6) (2014-10-23) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.5...0.2.6) + +## [0.2.5](https://github.com/dogo/SCLAlertView/tree/0.2.5) (2014-10-23) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.4...0.2.5) + +## [0.2.4](https://github.com/dogo/SCLAlertView/tree/0.2.4) (2014-10-22) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.3...0.2.4) + +## [0.2.3](https://github.com/dogo/SCLAlertView/tree/0.2.3) (2014-10-21) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.2...0.2.3) + +## [0.2.2](https://github.com/dogo/SCLAlertView/tree/0.2.2) (2014-10-21) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.1...0.2.2) + +**Implemented enhancements:** + +- is possible button show touch down or touch up display? [\#10](https://github.com/dogo/SCLAlertView/issues/10) + +## [0.2.1](https://github.com/dogo/SCLAlertView/tree/0.2.1) (2014-10-20) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.0...0.2.1) + +**Closed issues:** + +- Podfile update? [\#12](https://github.com/dogo/SCLAlertView/issues/12) +- is possible to move top when keyboard show? [\#5](https://github.com/dogo/SCLAlertView/issues/5) + +**Merged pull requests:** + +- Add validation block [\#9](https://github.com/dogo/SCLAlertView/pull/9) ([mamaral](https://github.com/mamaral)) + +## [0.2.0](https://github.com/dogo/SCLAlertView/tree/0.2.0) (2014-10-18) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.1.2...0.2.0) + +**Implemented enhancements:** + +- Fade animation for 'Done' button... [\#3](https://github.com/dogo/SCLAlertView/issues/3) + +**Merged pull requests:** + +- Button dismiss fade bug [\#8](https://github.com/dogo/SCLAlertView/pull/8) ([mamaral](https://github.com/mamaral)) +- Easier form navigation [\#7](https://github.com/dogo/SCLAlertView/pull/7) ([mamaral](https://github.com/mamaral)) +- Custom icon and color [\#6](https://github.com/dogo/SCLAlertView/pull/6) ([mamaral](https://github.com/mamaral)) + +## [0.1.2](https://github.com/dogo/SCLAlertView/tree/0.1.2) (2014-10-13) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.1.1...0.1.2) + +**Closed issues:** + +- Within UINavigationController [\#2](https://github.com/dogo/SCLAlertView/issues/2) +- Issues with a side menu controller [\#1](https://github.com/dogo/SCLAlertView/issues/1) + +## [0.1.1](https://github.com/dogo/SCLAlertView/tree/0.1.1) (2014-10-09) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.1.0...0.1.1) + +## [0.1.0](https://github.com/dogo/SCLAlertView/tree/0.1.0) (2014-10-08) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.0.3...0.1.0) + +## [0.0.3](https://github.com/dogo/SCLAlertView/tree/0.0.3) (2014-10-03) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.0.2...0.0.3) + +## [0.0.2](https://github.com/dogo/SCLAlertView/tree/0.0.2) (2014-09-29) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.0.1...0.0.2) + +## [0.0.1](https://github.com/dogo/SCLAlertView/tree/0.0.1) (2014-09-29) + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file From d3d90a5e7610af2e809b4db6855a1a858c8651e8 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 28 Feb 2018 14:02:30 -0300 Subject: [PATCH 185/250] Add support to two lines title #259 --- SCLAlertView/SCLAlertView.m | 57 ++++++++++++++-------------- SCLAlertViewExample/ViewController.m | 4 +- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 463c52e..16284dd 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -58,6 +58,7 @@ @interface SCLAlertView () @property (nonatomic) CGFloat buttonsFontSize; @property (nonatomic) CGFloat windowHeight; @property (nonatomic) CGFloat windowWidth; +@property (nonatomic) CGFloat titleHeight; @property (nonatomic) CGFloat subTitleHeight; @property (nonatomic) CGFloat subTitleY; @@ -71,7 +72,6 @@ @implementation SCLAlertView CGFloat kCircleHeightBackground; CGFloat kActivityIndicatorHeight; CGFloat kTitleTop; -CGFloat kTitleHeight; // Timer NSTimer *durationTimer; @@ -158,7 +158,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth kCircleHeightBackground = 62.0f; kActivityIndicatorHeight = 40.0f; kTitleTop = 30.0f; - kTitleHeight = 40.0f; + self.titleHeight = 40.0f; self.subTitleY = 70.0f; self.subTitleHeight = 90.0f; self.circleIconHeight = 20.0f; @@ -220,10 +220,11 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _backgroundView.userInteractionEnabled = YES; // Title - _labelTitle.numberOfLines = 1; + _labelTitle.numberOfLines = 2; + _labelTitle.lineBreakMode = NSLineBreakByWordWrapping; _labelTitle.textAlignment = NSTextAlignmentCenter; _labelTitle.font = [UIFont fontWithName:_titleFontFamily size:_titleFontSize]; - _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); + _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, _titleHeight); // View text _viewText.editable = NO; @@ -337,10 +338,10 @@ - (void)viewWillLayoutSubviews _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; _circleIconImageView.frame = CGRectMake(kCircleHeight / 2 - _circleIconHeight / 2, kCircleHeight / 2 - _circleIconHeight / 2, _circleIconHeight, _circleIconHeight); - _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, kTitleHeight); + _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, _titleHeight); // Text fields - CGFloat y = (_labelTitle.text == nil) ? kTitleTop : kTitleTop + _labelTitle.frame.size.height; + CGFloat y = (_labelTitle.text == nil) ? kTitleTop : (_titleHeight - 10.0f) + _labelTitle.frame.size.height; _viewText.frame = CGRectMake(12.0f, y, _windowWidth - 24.0f, _subTitleHeight); if (!_labelTitle && !_viewText) { @@ -876,12 +877,21 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima } // Title - if([title stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length > 0) - { + if ([title stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length > 0) { self.labelTitle.text = title; - } - else - { + + // Adjust text view size, if necessary + CGSize sz = CGSizeMake(_windowWidth - 24.0f, CGFLOAT_MAX); + + CGSize size = [_labelTitle sizeThatFits:sz]; + + CGFloat ht = ceilf(size.height); + if (ht > _titleHeight) { + self.windowHeight += (ht - _titleHeight); + self.titleHeight = ht; + self.subTitleY += 20; + } + } else { // Title is nil, we can move the body message to center and remove it from superView self.windowHeight -= _labelTitle.frame.size.height; [_labelTitle removeFromSuperview]; @@ -891,15 +901,12 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima } // Subtitle - if([subTitle stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length > 0) - { + if ([subTitle stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length > 0) { + // No custom text - if (_attributedFormatBlock == nil) - { + if (_attributedFormatBlock == nil) { _viewText.text = subTitle; - } - else - { + } else { self.viewText.font = [UIFont fontWithName:_bodyTextFontFamily size:_bodyFontSize]; _viewText.attributedText = self.attributedFormatBlock(subTitle); } @@ -910,20 +917,14 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima CGSize size = [_viewText sizeThatFits:sz]; CGFloat ht = ceilf(size.height); - if (ht < _subTitleHeight) - { + if (ht < _subTitleHeight) { self.windowHeight -= (_subTitleHeight - ht); self.subTitleHeight = ht; - } - else - { + } else { self.windowHeight += (ht - _subTitleHeight); self.subTitleHeight = ht; } - _viewText.frame = CGRectMake(12.0f, _subTitleY, _windowWidth - 24.0f, _subTitleHeight); - } - else - { + } else { // Subtitle is nil, we can move the title to center and remove it from superView self.subTitleHeight = 0.0f; self.windowHeight -= _viewText.frame.size.height; @@ -931,7 +932,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima _viewText = nil; // Move up - _labelTitle.frame = CGRectMake(12.0f, 37.0f, _windowWidth - 24.0f, kTitleHeight); + _labelTitle.frame = CGRectMake(12.0f, 37.0f, _windowWidth - 24.0f, _titleHeight); } if (!_labelTitle && !_viewText) { diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController.m index 55893fa..ebcc0af 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController.m @@ -82,8 +82,8 @@ - (IBAction)showError:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - [alert showError:self title:@"Hold On..." - subTitle:@"You have not saved your Submission yet. Please save the Submission before accessing the Responses list. Blah de blah de blah, blah. Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah." + [alert showError:self title:@"An error with two title is presented ..." + subTitle:@"You have not saved your Submission yet. Please save the Submission before accessing the Responses list. Blah de blah de blah, blah. Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, End." closeButtonTitle:@"OK" duration:0.0f]; } From 481b94680972ad561bc36736a651e804de913fa9 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 11 Apr 2018 09:42:04 -0300 Subject: [PATCH 186/250] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..43b9b81 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at diautilio@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ From 8c733dabf5a85bfde8f031e6a2f348a666445096 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 11 Apr 2018 09:45:55 -0300 Subject: [PATCH 187/250] Create CONTRIBUTING.md --- CONTRIBUTING.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..501a7d8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. From 6f0c8159a6c02790bc5e2749bbdf1d1f4a93ab5a Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Tue, 19 Jun 2018 10:49:10 +0300 Subject: [PATCH 188/250] core: annoying warnings have been fixed. --- SCLAlertView/SCLAlertView.m | 54 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 16284dd..f83966e 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1353,12 +1353,12 @@ - (void)fadeOutWithDuration:(NSTimeInterval)duration [self.view removeFromSuperview]; [self removeFromParentViewController]; - if (_usingNewWindow) { + if (self.usingNewWindow) { // Remove current window [self.SCLAlertWindow setHidden:YES]; self.SCLAlertWindow = nil; } - if ( _dismissAnimationCompletionBlock ){ + if ( self.dismissAnimationCompletionBlock ){ self.dismissAnimationCompletionBlock(); } }]; @@ -1434,7 +1434,7 @@ - (void)slideOutFromCenter - (void)simplyDisappear { - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; self.view.alpha = 1.0f; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ @@ -1454,11 +1454,11 @@ - (void)fadeIn delay:0.0f options:UIViewAnimationOptionCurveEaseIn animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; self.view.alpha = 1.0f; } completion:^(BOOL finished) { - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }]; @@ -1474,7 +1474,7 @@ - (void)slideInFromTop self.view.frame = frame; [UIView animateWithDuration:0.3f animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; //To Frame CGRect frame = self.backgroundView.frame; @@ -1484,9 +1484,9 @@ - (void)slideInFromTop self.view.alpha = 1.0f; } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ - self.view.center = _backgroundView.center; + self.view.center = self.backgroundView.center; } completion:^(BOOL finished) { - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }]; @@ -1499,7 +1499,7 @@ - (void)slideInFromTop self.view.frame = frame; [UIView animateWithDuration:0.5f delay:0.0f usingSpringWithDamping:0.6f initialSpringVelocity:0.5f options:0 animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; //To Frame CGRect frame = self.backgroundView.frame; @@ -1508,7 +1508,7 @@ - (void)slideInFromTop self.view.alpha = 1.0f; } completion:^(BOOL finished) { - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }]; @@ -1523,7 +1523,7 @@ - (void)slideInFromBottom self.view.frame = frame; [UIView animateWithDuration:0.3f animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; //To Frame CGRect frame = self.backgroundView.frame; @@ -1533,9 +1533,9 @@ - (void)slideInFromBottom self.view.alpha = 1.0f; } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ - self.view.center = _backgroundView.center; + self.view.center = self.backgroundView.center; } completion:^(BOOL finished) { - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }]; @@ -1550,7 +1550,7 @@ - (void)slideInFromLeft self.view.frame = frame; [UIView animateWithDuration:0.3f animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; //To Frame CGRect frame = self.backgroundView.frame; @@ -1560,9 +1560,9 @@ - (void)slideInFromLeft self.view.alpha = 1.0f; } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ - self.view.center = _backgroundView.center; + self.view.center = self.backgroundView.center; } completion:^(BOOL finished) { - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }]; @@ -1577,7 +1577,7 @@ - (void)slideInFromRight self.view.frame = frame; [UIView animateWithDuration:0.3f animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; //To Frame CGRect frame = self.backgroundView.frame; @@ -1587,9 +1587,9 @@ - (void)slideInFromRight self.view.alpha = 1.0f; } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ - self.view.center = _backgroundView.center; + self.view.center = self.backgroundView.center; } completion:^(BOOL finished) { - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }]; @@ -1604,7 +1604,7 @@ - (void)slideInFromCenter self.view.alpha = 0.0f; [UIView animateWithDuration:0.3f animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; //To Frame self.view.transform = CGAffineTransformConcat(CGAffineTransformIdentity, @@ -1612,9 +1612,9 @@ - (void)slideInFromCenter self.view.alpha = 1.0f; } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ - self.view.center = _backgroundView.center; + self.view.center = self.backgroundView.center; } completion:^(BOOL finished) { - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }]; @@ -1629,7 +1629,7 @@ - (void)slideInToCenter self.view.alpha = 0.0f; [UIView animateWithDuration:0.3f animations:^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; //To Frame self.view.transform = CGAffineTransformConcat(CGAffineTransformIdentity, @@ -1637,9 +1637,9 @@ - (void)slideInToCenter self.view.alpha = 1.0f; } completion:^(BOOL completed) { [UIView animateWithDuration:0.2f animations:^{ - self.view.center = _backgroundView.center; + self.view.center = self.backgroundView.center; } completion:^(BOOL finished) { - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }]; @@ -1652,9 +1652,9 @@ - (void)simplyAppear self.view.alpha = 0.0f; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - self.backgroundView.alpha = _backgroundOpacity; + self.backgroundView.alpha = self.backgroundOpacity; self.view.alpha = 1.0f; - if ( _showAnimationCompletionBlock ){ + if ( self.showAnimationCompletionBlock ){ self.showAnimationCompletionBlock(); } }); From 6528f5a33711b137480f6afcc595f702ee6cffd7 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Tue, 19 Jun 2018 11:03:07 +0300 Subject: [PATCH 189/250] core: alert view fluent style cleanup. --- SCLAlertView/SCLAlertView.h | 12 +- SCLAlertView/SCLAlertView.m | 821 +++++++++++------------------------- 2 files changed, 264 insertions(+), 569 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 5868b62..13325ba 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -469,7 +469,11 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @end -@interface SCLAlertViewShowBuilder : NSObject +@protocol SCLItemsBuilder__Protocol__Fluent +- (void)setupFluent; +@end + +@interface SCLAlertViewShowBuilder : NSObject @property(weak, nonatomic, readonly) UIViewController *parameterViewController; @property(copy, nonatomic, readonly) UIImage *parameterImage; @@ -497,7 +501,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic, readonly) void (^show)(SCLAlertView *view, UIViewController *controller); @end -@interface SCLALertViewTextFieldBuilder : NSObject +@interface SCLALertViewTextFieldBuilder : NSObject #pragma mark - Available later after adding @property(weak, nonatomic, readonly) SCLTextView *textField; @@ -507,7 +511,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @end -@interface SCLALertViewButtonBuilder : NSObject +@interface SCLALertViewButtonBuilder : NSObject #pragma mark - Available later after adding @property(weak, nonatomic, readonly) SCLButton *button; @@ -521,7 +525,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @end -@interface SCLAlertViewBuilder : NSObject +@interface SCLAlertViewBuilder : NSObject #pragma mark - Parameters @property (strong, nonatomic, readonly) SCLAlertView *alertView; diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index f83966e..cd01ba3 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1675,15 +1675,19 @@ @interface SCLALertViewTextFieldBuilder() @end @implementation SCLALertViewTextFieldBuilder -- (SCLALertViewTextFieldBuilder *(^) (NSString *title))title { - if (!_title) { - __weak typeof(self) weakSelf = self; - _title = ^(NSString *title){ - weakSelf.parameterTitle = title; - return weakSelf; - }; +- (void)setupFluent { + __weak __auto_type weakSelf = self; + self.title = ^(NSString *title){ + weakSelf.parameterTitle = title; + return weakSelf; + }; +} + +- (instancetype)init { + if (self = [super init]) { + [self setupFluent]; } - return _title; + return self; } @end @@ -1709,56 +1713,37 @@ @interface SCLALertViewButtonBuilder() @end @implementation SCLALertViewButtonBuilder -- (SCLALertViewButtonBuilder *(^) (NSString *title))title { - if (!_title) { - __weak typeof(self) weakSelf = self; - _title = ^(NSString *title){ - weakSelf.parameterTitle = title; - return weakSelf; - }; - } - return _title; -} -- (SCLALertViewButtonBuilder *(^) (id target))target { - if (!_target) { - __weak typeof(self) weakSelf = self; - _target = ^(id target){ - weakSelf.parameterTarget = target; - return weakSelf; - }; - } - return _target; -} -- (SCLALertViewButtonBuilder *(^) (SEL selector))selector { - if (!_selector) { - __weak typeof(self) weakSelf = self; - _selector = ^(SEL selector){ - weakSelf.parameterSelector = selector; - return weakSelf; - }; - } - return _selector; -} -- (SCLALertViewButtonBuilder *(^) (void(^actionBlock)(void)))actionBlock { - if (!_actionBlock) { - __weak typeof(self) weakSelf = self; - _actionBlock = ^(void(^actionBlock)(void)){ - weakSelf.parameterActionBlock = actionBlock; - return weakSelf; - }; - } - return _actionBlock; -} -- (SCLALertViewButtonBuilder *(^) (BOOL(^validationBlock)(void)))validationBlock { - if (!_validationBlock) { - __weak typeof(self) weakSelf = self; - _validationBlock = ^(BOOL(^validationBlock)(void)){ - weakSelf.parameterValidationBlock = validationBlock; - return weakSelf; - }; - } - return _validationBlock; +- (void)setupFluent { + __weak __auto_type weakSelf = self; + self.title = ^(NSString *title){ + weakSelf.parameterTitle = title; + return weakSelf; + }; + self.target = ^(id target){ + weakSelf.parameterTarget = target; + return weakSelf; + }; + self.selector = ^(SEL selector){ + weakSelf.parameterSelector = selector; + return weakSelf; + }; + self.actionBlock = ^(void(^actionBlock)(void)){ + weakSelf.parameterActionBlock = actionBlock; + return weakSelf; + }; + self.validationBlock = ^(BOOL(^validationBlock)(void)){ + weakSelf.parameterValidationBlock = validationBlock; + return weakSelf; + }; +} + +- (instancetype)init { + if (self = [super init]) { + [self setupFluent]; + } + return self; } + @end @@ -1770,6 +1755,178 @@ @interface SCLAlertViewBuilder() @implementation SCLAlertViewBuilder +- (void)setupFluent { + __weak __auto_type weakSelf = self; + self.cornerRadius = ^(CGFloat cornerRadius) { + weakSelf.alertView.cornerRadius = cornerRadius; + return weakSelf; + }; + self.tintTopCircle = ^(BOOL tintTopCircle) { + weakSelf.alertView.tintTopCircle = tintTopCircle; + return weakSelf; + }; + self.useLargerIcon = ^(BOOL useLargerIcon) { + weakSelf.alertView.useLargerIcon = useLargerIcon; + return weakSelf; + }; + self.labelTitle = ^(UILabel *labelTitle) { + weakSelf.alertView.labelTitle = labelTitle; + return weakSelf; + }; + self.viewText = ^(UITextView *viewText) { + weakSelf.alertView.viewText = viewText; + return weakSelf; + }; + self.activityIndicatorView = ^(UIActivityIndicatorView *activityIndicatorView) { + weakSelf.alertView.activityIndicatorView = activityIndicatorView; + return weakSelf; + }; + self.shouldDismissOnTapOutside = ^(BOOL shouldDismissOnTapOutside) { + weakSelf.alertView.shouldDismissOnTapOutside = shouldDismissOnTapOutside; + return weakSelf; + }; + self.soundURL = ^(NSURL *soundURL) { + weakSelf.alertView.soundURL = soundURL; + return weakSelf; + }; + self.attributedFormatBlock = ^(SCLAttributedFormatBlock attributedFormatBlock) { + weakSelf.alertView.attributedFormatBlock = attributedFormatBlock; + return weakSelf; + }; + self.completeButtonFormatBlock = ^(CompleteButtonFormatBlock completeButtonFormatBlock) { + weakSelf.alertView.completeButtonFormatBlock = completeButtonFormatBlock; + return weakSelf; + }; + self.buttonFormatBlock = ^(ButtonFormatBlock buttonFormatBlock) { + weakSelf.alertView.buttonFormatBlock = buttonFormatBlock; + return weakSelf; + }; + self.forceHideBlock = ^(SCLForceHideBlock forceHideBlock) { + weakSelf.alertView.forceHideBlock = forceHideBlock; + return weakSelf; + }; + self.hideAnimationType = ^(SCLAlertViewHideAnimation hideAnimationType) { + weakSelf.alertView.hideAnimationType = hideAnimationType; + return weakSelf; + }; + self.showAnimationType = ^(SCLAlertViewShowAnimation showAnimationType) { + weakSelf.alertView.showAnimationType = showAnimationType; + return weakSelf; + }; + self.backgroundType = ^(SCLAlertViewBackground backgroundType) { + weakSelf.alertView.backgroundType = backgroundType; + return weakSelf; + }; + self.customViewColor = ^(UIColor *customViewColor) { + weakSelf.alertView.customViewColor = customViewColor; + return weakSelf; + }; + self.backgroundViewColor = ^(UIColor *backgroundViewColor) { + weakSelf.alertView.backgroundViewColor = backgroundViewColor; + return weakSelf; + }; + self.iconTintColor = ^(UIColor *iconTintColor) { + weakSelf.alertView.iconTintColor = iconTintColor; + return weakSelf; + }; + self.circleIconHeight = ^(CGFloat circleIconHeight) { + weakSelf.alertView.circleIconHeight = circleIconHeight; + return weakSelf; + }; + self.extensionBounds = ^(CGRect extensionBounds) { + weakSelf.alertView.extensionBounds = extensionBounds; + return weakSelf; + }; + self.statusBarHidden = ^(BOOL statusBarHidden) { + weakSelf.alertView.statusBarHidden = statusBarHidden; + return weakSelf; + }; + self.statusBarStyle = ^(UIStatusBarStyle statusBarStyle) { + weakSelf.alertView.statusBarStyle = statusBarStyle; + return weakSelf; + }; + self.alertIsDismissed = ^(SCLDismissBlock dismissBlock) { + [weakSelf.alertView alertIsDismissed:dismissBlock]; + return weakSelf; + }; + self.alertDismissAnimationIsCompleted = ^(SCLDismissAnimationCompletionBlock dismissAnimationCompletionBlock) { + [weakSelf.alertView alertDismissAnimationIsCompleted:dismissAnimationCompletionBlock]; + return weakSelf; + }; + self.alertShowAnimationIsCompleted = ^(SCLShowAnimationCompletionBlock showAnimationCompletionBlock) { + [weakSelf.alertView alertShowAnimationIsCompleted:showAnimationCompletionBlock]; + return weakSelf; + }; + self.removeTopCircle = ^(void) { + [weakSelf.alertView removeTopCircle]; + return weakSelf; + }; + self.addCustomView = ^(UIView *view) { + [weakSelf.alertView addCustomView:view]; + return weakSelf; + }; + self.addTextField = ^(NSString *title) { + [weakSelf.alertView addTextField:title]; + return weakSelf; + }; + self.addCustomTextField = ^(UITextField *textField) { + [weakSelf.alertView addCustomTextField:textField]; + return weakSelf; + }; + self.addSwitchViewWithLabelTitle = ^(NSString *title) { + [weakSelf.alertView addSwitchViewWithLabel:title]; + return weakSelf; + }; + self.addTimerToButtonIndex = ^(NSInteger buttonIndex, BOOL reverse) { + [weakSelf.alertView addTimerToButtonIndex:buttonIndex reverse:reverse]; + return weakSelf; + }; + self.setTitleFontFamily = ^(NSString *titleFontFamily, CGFloat size) { + [weakSelf.alertView setTitleFontFamily:titleFontFamily withSize:size]; + return weakSelf; + }; + self.setBodyTextFontFamily = ^(NSString *bodyTextFontFamily, CGFloat size) { + [weakSelf.alertView setBodyTextFontFamily:bodyTextFontFamily withSize:size]; + return weakSelf; + }; + self.setButtonsTextFontFamily = ^(NSString *buttonsFontFamily, CGFloat size) { + [weakSelf.alertView setButtonsTextFontFamily:buttonsFontFamily withSize:size]; + return weakSelf; + }; + self.addButtonWithActionBlock = ^(NSString *title, SCLActionBlock action) { + [weakSelf.alertView addButton:title actionBlock:action]; + return weakSelf; + }; + self.addButtonWithValidationBlock = ^(NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action) { + [weakSelf.alertView addButton:title validationBlock:validationBlock actionBlock:action]; + return weakSelf; + }; + self.addButtonWithTarget = ^(NSString *title, id target, SEL selector) { + [weakSelf.alertView addButton:title target:target selector:selector]; + return weakSelf; + }; + + self.addButtonWithBuilder = ^(SCLALertViewButtonBuilder *builder){ + SCLButton *button = nil; + if (builder.parameterTarget && builder.parameterSelector) { + button = [weakSelf.alertView addButton:builder.parameterTitle target:builder.parameterTarget selector:builder.parameterSelector]; + } + else if (builder.parameterValidationBlock && builder.parameterActionBlock) { + button = [weakSelf.alertView addButton:builder.parameterTitle validationBlock:builder.parameterValidationBlock actionBlock:builder.parameterActionBlock]; + } + else if (builder.parameterActionBlock) { + button = [weakSelf.alertView addButton:builder.parameterTitle actionBlock:builder.parameterActionBlock]; + } + builder.button = button; + return weakSelf; + }; + + self.addTextFieldWithBuilder = ^(SCLALertViewTextFieldBuilder *builder){ + builder.textField = [weakSelf.alertView addTextField:builder.parameterTitle]; + return weakSelf; + }; +} + #pragma mark - Init - (instancetype)init { @@ -1794,413 +1951,6 @@ - (instancetype)initWithNewWindowWidth:(CGFloat)width { } return self; } - -#pragma mark - Properties -- (SCLAlertViewBuilder *(^) (CGFloat cornerRadius))cornerRadius { - if (!_cornerRadius) { - __weak typeof(self) weakSelf = self; - _cornerRadius = ^(CGFloat cornerRadius) { - weakSelf.alertView.cornerRadius = cornerRadius; - return weakSelf; - }; - } - return _cornerRadius; -} - -- (SCLAlertViewBuilder *(^) (BOOL tintTopCircle))tintTopCircle { - if (!_tintTopCircle) { - __weak typeof(self) weakSelf = self; - _tintTopCircle = ^(BOOL tintTopCircle) { - weakSelf.alertView.tintTopCircle = tintTopCircle; - return weakSelf; - }; - } - return _tintTopCircle; -} -- (SCLAlertViewBuilder *(^) (BOOL useLargerIcon))useLargerIcon { - if (!_useLargerIcon) { - __weak typeof(self) weakSelf = self; - _useLargerIcon = ^(BOOL useLargerIcon) { - weakSelf.alertView.useLargerIcon = useLargerIcon; - return weakSelf; - }; - } - return _useLargerIcon; -} -- (SCLAlertViewBuilder *(^) (UILabel *labelTitle))labelTitle { - if (!_labelTitle) { - __weak typeof(self) weakSelf = self; - _labelTitle = ^(UILabel *labelTitle) { - weakSelf.alertView.labelTitle = labelTitle; - return weakSelf; - }; - } - return _labelTitle; -} -- (SCLAlertViewBuilder *(^) (UITextView *viewText))viewText { - if (!_viewText) { - __weak typeof(self) weakSelf = self; - _viewText = ^(UITextView *viewText) { - weakSelf.alertView.viewText = viewText; - return weakSelf; - }; - } - return _viewText; -} -- (SCLAlertViewBuilder *(^) (UIActivityIndicatorView *activityIndicatorView))activityIndicatorView { - if (!_activityIndicatorView) { - __weak typeof(self) weakSelf = self; - _activityIndicatorView = ^(UIActivityIndicatorView *activityIndicatorView) { - weakSelf.alertView.activityIndicatorView = activityIndicatorView; - return weakSelf; - }; - } - return _activityIndicatorView; -} -- (SCLAlertViewBuilder *(^) (BOOL shouldDismissOnTapOutside))shouldDismissOnTapOutside { - if (!_shouldDismissOnTapOutside) { - __weak typeof(self) weakSelf = self; - _shouldDismissOnTapOutside = ^(BOOL shouldDismissOnTapOutside) { - weakSelf.alertView.shouldDismissOnTapOutside = shouldDismissOnTapOutside; - return weakSelf; - }; - } - return _shouldDismissOnTapOutside; -} -- (SCLAlertViewBuilder *(^) (NSURL *soundURL))soundURL { - if (!_soundURL) { - __weak typeof(self) weakSelf = self; - _soundURL = ^(NSURL *soundURL) { - weakSelf.alertView.soundURL = soundURL; - return weakSelf; - }; - } - return _soundURL; -} -- (SCLAlertViewBuilder *(^) (SCLAttributedFormatBlock attributedFormatBlock))attributedFormatBlock { - if (!_attributedFormatBlock) { - __weak typeof(self) weakSelf = self; - _attributedFormatBlock = ^(SCLAttributedFormatBlock attributedFormatBlock) { - weakSelf.alertView.attributedFormatBlock = attributedFormatBlock; - return weakSelf; - }; - } - return _attributedFormatBlock; -} -- (SCLAlertViewBuilder *(^) (CompleteButtonFormatBlock completeButtonFormatBlock))completeButtonFormatBlock { - if (!_completeButtonFormatBlock) { - __weak typeof(self) weakSelf = self; - _completeButtonFormatBlock = ^(CompleteButtonFormatBlock completeButtonFormatBlock) { - weakSelf.alertView.completeButtonFormatBlock = completeButtonFormatBlock; - return weakSelf; - }; - } - return _completeButtonFormatBlock; -} -- (SCLAlertViewBuilder *(^) (ButtonFormatBlock buttonFormatBlock))buttonFormatBlock { - if (!_buttonFormatBlock) { - __weak typeof(self) weakSelf = self; - _buttonFormatBlock = ^(ButtonFormatBlock buttonFormatBlock) { - weakSelf.alertView.buttonFormatBlock = buttonFormatBlock; - return weakSelf; - }; - } - return _buttonFormatBlock; -} -- (SCLAlertViewBuilder *(^) (SCLForceHideBlock forceHideBlock))forceHideBlock { - if (!_forceHideBlock) { - __weak typeof(self) weakSelf = self; - _forceHideBlock = ^(SCLForceHideBlock forceHideBlock) { - weakSelf.alertView.forceHideBlock = forceHideBlock; - return weakSelf; - }; - } - return _forceHideBlock; -} -- (SCLAlertViewBuilder *(^) (SCLAlertViewHideAnimation hideAnimationType))hideAnimationType { - if (!_hideAnimationType) { - __weak typeof(self) weakSelf = self; - _hideAnimationType = ^(SCLAlertViewHideAnimation hideAnimationType) { - weakSelf.alertView.hideAnimationType = hideAnimationType; - return weakSelf; - }; - } - return _hideAnimationType; -} -- (SCLAlertViewBuilder *(^) (SCLAlertViewShowAnimation showAnimationType))showAnimationType { - if (!_showAnimationType) { - __weak typeof(self) weakSelf = self; - _showAnimationType = ^(SCLAlertViewShowAnimation showAnimationType) { - weakSelf.alertView.showAnimationType = showAnimationType; - return weakSelf; - }; - } - return _showAnimationType; -} -- (SCLAlertViewBuilder *(^) (SCLAlertViewBackground backgroundType))backgroundType { - if (!_backgroundType) { - __weak typeof(self) weakSelf = self; - _backgroundType = ^(SCLAlertViewBackground backgroundType) { - weakSelf.alertView.backgroundType = backgroundType; - return weakSelf; - }; - } - return _backgroundType; -} -- (SCLAlertViewBuilder *(^) (UIColor *customViewColor))customViewColor { - if (!_customViewColor) { - __weak typeof(self) weakSelf = self; - _customViewColor = ^(UIColor *customViewColor) { - weakSelf.alertView.customViewColor = customViewColor; - return weakSelf; - }; - } - return _customViewColor; -} -- (SCLAlertViewBuilder *(^) (UIColor *backgroundViewColor))backgroundViewColor { - if (!_backgroundViewColor) { - __weak typeof(self) weakSelf = self; - _backgroundViewColor = ^(UIColor *backgroundViewColor) { - weakSelf.alertView.backgroundViewColor = backgroundViewColor; - return weakSelf; - }; - } - return _backgroundViewColor; -} -- (SCLAlertViewBuilder *(^) (UIColor *iconTintColor))iconTintColor { - if (!_iconTintColor) { - __weak typeof(self) weakSelf = self; - _iconTintColor = ^(UIColor *iconTintColor) { - weakSelf.alertView.iconTintColor = iconTintColor; - return weakSelf; - }; - } - return _iconTintColor; -} -- (SCLAlertViewBuilder *(^) (CGFloat circleIconHeight))circleIconHeight { - if (!_circleIconHeight) { - __weak typeof(self) weakSelf = self; - _circleIconHeight = ^(CGFloat circleIconHeight) { - weakSelf.alertView.circleIconHeight = circleIconHeight; - return weakSelf; - }; - } - return _circleIconHeight; -} -- (SCLAlertViewBuilder *(^) (CGRect extensionBounds))extensionBounds { - if (!_extensionBounds) { - __weak typeof(self) weakSelf = self; - _extensionBounds = ^(CGRect extensionBounds) { - weakSelf.alertView.extensionBounds = extensionBounds; - return weakSelf; - }; - } - return _extensionBounds; -} -- (SCLAlertViewBuilder *(^) (BOOL statusBarHidden))statusBarHidden { - if (!_statusBarHidden) { - __weak typeof(self) weakSelf = self; - _statusBarHidden = ^(BOOL statusBarHidden) { - weakSelf.alertView.statusBarHidden = statusBarHidden; - return weakSelf; - }; - } - return _statusBarHidden; -} -- (SCLAlertViewBuilder *(^) (UIStatusBarStyle statusBarStyle))statusBarStyle { - if (!_statusBarStyle) { - __weak typeof(self) weakSelf = self; - _statusBarStyle = ^(UIStatusBarStyle statusBarStyle) { - weakSelf.alertView.statusBarStyle = statusBarStyle; - return weakSelf; - }; - } - return _statusBarStyle; -} - -#pragma mark - Custom Setters -- (SCLAlertViewBuilder *(^) (SCLDismissBlock dismissBlock))alertIsDismissed { - if (!_alertIsDismissed) { - __weak typeof(self) weakSelf = self; - _alertIsDismissed = ^(SCLDismissBlock dismissBlock) { - [weakSelf.alertView alertIsDismissed:dismissBlock]; - return weakSelf; - }; - } - return _alertIsDismissed; -} --(SCLAlertViewBuilder *(^)(SCLDismissAnimationCompletionBlock))alertDismissAnimationIsCompleted{ - if (!_alertDismissAnimationIsCompleted) { - __weak typeof(self) weakSelf = self; - _alertDismissAnimationIsCompleted = ^(SCLDismissAnimationCompletionBlock dismissAnimationCompletionBlock) { - [weakSelf.alertView alertDismissAnimationIsCompleted:dismissAnimationCompletionBlock]; - return weakSelf; - }; - } - return _alertDismissAnimationIsCompleted; -} --(SCLAlertViewBuilder *(^)(SCLShowAnimationCompletionBlock))alertShowAnimationIsCompleted{ - if (!_alertShowAnimationIsCompleted) { - __weak typeof(self) weakSelf = self; - _alertShowAnimationIsCompleted = ^(SCLShowAnimationCompletionBlock showAnimationCompletionBlock) { - [weakSelf.alertView alertShowAnimationIsCompleted:showAnimationCompletionBlock]; - return weakSelf; - }; - } - return _alertShowAnimationIsCompleted; -} -- (SCLAlertViewBuilder *(^) (void))removeTopCircle { - if (!_removeTopCircle) { - __weak typeof(self) weakSelf = self; - _removeTopCircle = ^(void) { - [weakSelf.alertView removeTopCircle]; - return weakSelf; - }; - } - return _removeTopCircle; -} -- (SCLAlertViewBuilder *(^) (UIView *view))addCustomView { - if (!_addCustomView) { - __weak typeof(self) weakSelf = self; - _addCustomView = ^(UIView *view) { - [weakSelf.alertView addCustomView:view]; - return weakSelf; - }; - } - return _addCustomView; -} -- (SCLAlertViewBuilder *(^) (NSString *title))addTextField { - if (!_addTextField) { - __weak typeof(self) weakSelf = self; - _addTextField = ^(NSString *title) { - [weakSelf.alertView addTextField:title]; - return weakSelf; - }; - } - return _addTextField; -} -- (SCLAlertViewBuilder *(^) (UITextField *textField))addCustomTextField { - if (!_addCustomTextField) { - __weak typeof(self) weakSelf = self; - _addCustomTextField = ^(UITextField *textField) { - [weakSelf.alertView addCustomTextField:textField]; - return weakSelf; - }; - } - return _addCustomTextField; -} -- (SCLAlertViewBuilder *(^) (NSString *title))addSwitchViewWithLabelTitle { - if (!_addSwitchViewWithLabelTitle) { - __weak typeof(self) weakSelf = self; - _addSwitchViewWithLabelTitle = ^(NSString *title) { - [weakSelf.alertView addSwitchViewWithLabel:title]; - return weakSelf; - }; - } - return _addSwitchViewWithLabelTitle; -} -- (SCLAlertViewBuilder *(^) (NSInteger buttonIndex, BOOL reverse))addTimerToButtonIndex { - if (!_addTimerToButtonIndex) { - __weak typeof(self) weakSelf = self; - _addTimerToButtonIndex = ^(NSInteger buttonIndex, BOOL reverse) { - [weakSelf.alertView addTimerToButtonIndex:buttonIndex reverse:reverse]; - return weakSelf; - }; - } - return _addTimerToButtonIndex; -} -- (SCLAlertViewBuilder *(^) (NSString *titleFontFamily, CGFloat size))setTitleFontFamily { - if (!_setTitleFontFamily) { - __weak typeof(self) weakSelf = self; - _setTitleFontFamily = ^(NSString *titleFontFamily, CGFloat size) { - [weakSelf.alertView setTitleFontFamily:titleFontFamily withSize:size]; - return weakSelf; - }; - } - return _setTitleFontFamily; -} -- (SCLAlertViewBuilder *(^) (NSString *bodyTextFontFamily, CGFloat size))setBodyTextFontFamily { - if (!_setBodyTextFontFamily) { - __weak typeof(self) weakSelf = self; - _setBodyTextFontFamily = ^(NSString *bodyTextFontFamily, CGFloat size) { - [weakSelf.alertView setBodyTextFontFamily:bodyTextFontFamily withSize:size]; - return weakSelf; - }; - } - return _setBodyTextFontFamily; -} -- (SCLAlertViewBuilder *(^) (NSString *buttonsFontFamily, CGFloat size))setButtonsTextFontFamily { - if (!_setButtonsTextFontFamily) { - __weak typeof(self) weakSelf = self; - _setButtonsTextFontFamily = ^(NSString *buttonsFontFamily, CGFloat size) { - [weakSelf.alertView setButtonsTextFontFamily:buttonsFontFamily withSize:size]; - return weakSelf; - }; - } - return _setButtonsTextFontFamily; -} -- (SCLAlertViewBuilder *(^) (NSString *title, SCLActionBlock action))addButtonWithActionBlock { - if (!_addButtonWithActionBlock) { - __weak typeof(self) weakSelf = self; - _addButtonWithActionBlock = ^(NSString *title, SCLActionBlock action) { - [weakSelf.alertView addButton:title actionBlock:action]; - return weakSelf; - }; - } - return _addButtonWithActionBlock; -} -- (SCLAlertViewBuilder *(^) (NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action))addButtonWithValidationBlock { - if (!_addButtonWithValidationBlock) { - __weak typeof(self) weakSelf = self; - _addButtonWithValidationBlock = ^(NSString *title, SCLValidationBlock validationBlock, SCLActionBlock action) { - [weakSelf.alertView addButton:title validationBlock:validationBlock actionBlock:action]; - return weakSelf; - }; - } - return _addButtonWithValidationBlock; -} -- (SCLAlertViewBuilder *(^) (NSString *title, id target, SEL selector))addButtonWithTarget { - if (!_addButtonWithTarget) { - __weak typeof(self) weakSelf = self; - _addButtonWithTarget = ^(NSString *title, id target, SEL selector) { - [weakSelf.alertView addButton:title target:target selector:selector]; - return weakSelf; - }; - } - return _addButtonWithTarget; -} - -#pragma mark - Builders -- (SCLAlertViewBuilder *(^)(SCLALertViewButtonBuilder *builder))addButtonWithBuilder { - if (!_addButtonWithBuilder) { - __weak typeof(self) weakSelf = self; - _addButtonWithBuilder = ^(SCLALertViewButtonBuilder *builder){ - SCLButton *button = nil; - if (builder.parameterTarget && builder.parameterSelector) { - button = [weakSelf.alertView addButton:builder.parameterTitle target:builder.parameterTarget selector:builder.parameterSelector]; - } - else if (builder.parameterValidationBlock && builder.parameterActionBlock) { - button = [weakSelf.alertView addButton:builder.parameterTitle validationBlock:builder.parameterValidationBlock actionBlock:builder.parameterActionBlock]; - } - else if (builder.parameterActionBlock) { - button = [weakSelf.alertView addButton:builder.parameterTitle actionBlock:builder.parameterActionBlock]; - } - builder.button = button; - return weakSelf; - }; - } - return _addButtonWithBuilder; -} -- (SCLAlertViewBuilder *(^)(SCLALertViewTextFieldBuilder *builder))addTextFieldWithBuilder { - if (!_addTextFieldWithBuilder) { - __weak typeof(self) weakSelf = self; - _addTextFieldWithBuilder = ^(SCLALertViewTextFieldBuilder *builder){ - builder.textField = [weakSelf.alertView addTextField:builder.parameterTitle]; - return weakSelf; - }; - } - return _addTextFieldWithBuilder; -} @end @interface SCLAlertViewShowBuilder() @@ -2232,99 +1982,50 @@ @interface SCLAlertViewShowBuilder() @implementation SCLAlertViewShowBuilder +- (void)setupFluent { + __weak __auto_type weakSelf = self; + self.viewController = ^(UIViewController *viewController){ + weakSelf.parameterViewController = viewController; + return weakSelf; + }; + self.image = ^(UIImage *image) { + weakSelf.parameterImage = image; + return weakSelf; + }; + self.color = ^(UIColor *color) { + weakSelf.parameterColor = color; + return weakSelf; + }; + self.title = ^(NSString *title){ + weakSelf.parameterTitle = title; + return weakSelf; + }; + self.subTitle = ^(NSString *subTitle){ + weakSelf.parameterSubTitle = subTitle; + return weakSelf; + }; + self.completeText = ^(NSString *completeText){ + weakSelf.parameterCompleteText = completeText; + return weakSelf; + }; + self.style = ^(SCLAlertViewStyle style){ + weakSelf.parameterStyle = style; + return weakSelf; + }; + self.closeButtonTitle = ^(NSString *closeButtonTitle){ + weakSelf.parameterCloseButtonTitle = closeButtonTitle; + return weakSelf; + }; + self.duration = ^(NSTimeInterval duration){ + weakSelf.parameterDuration = duration; + return weakSelf; + }; + self.show = ^(SCLAlertView *view, UIViewController *controller) { + [weakSelf showAlertView:view onViewController:controller]; + }; +} #pragma mark - Setters -- (SCLAlertViewShowBuilder *(^)(UIViewController *viewController))viewController { - if (!_viewController) { - __weak typeof(self) weakSelf = self; - _viewController = ^(UIViewController *viewController){ - weakSelf.parameterViewController = viewController; - return weakSelf; - }; - } - return _viewController; -} -- (SCLAlertViewShowBuilder *(^)(UIImage *image))image { - if (!_image) { - __weak typeof(self) weakSelf = self; - _image = ^(UIImage *image) { - weakSelf.parameterImage = image; - return weakSelf; - }; - } - return _image; -} -- (SCLAlertViewShowBuilder *(^)(UIColor *color))color { - if (!_color) { - __weak typeof(self) weakSelf = self; - _color = ^(UIColor *color) { - weakSelf.parameterColor = color; - return weakSelf; - }; - } - return _color; -} -- (SCLAlertViewShowBuilder *(^)(NSString *title))title { - if (!_title) { - __weak typeof(self) weakSelf = self; - _title = ^(NSString *title){ - weakSelf.parameterTitle = title; - return weakSelf; - }; - } - return _title; -} -- (SCLAlertViewShowBuilder *(^)(NSString *subTitle))subTitle { - if (!_subTitle) { - __weak typeof(self) weakSelf = self; - _subTitle = ^(NSString *subTitle){ - weakSelf.parameterSubTitle = subTitle; - return weakSelf; - }; - } - return _subTitle; -} -- (SCLAlertViewShowBuilder *(^)(NSString *completeText))completeText { - if (!_completeText) { - __weak typeof(self) weakSelf = self; - _completeText = ^(NSString *completeText){ - weakSelf.parameterCompleteText = completeText; - return weakSelf; - }; - } - return _completeText; -} - -- (SCLAlertViewShowBuilder *(^)(SCLAlertViewStyle style))style { - if (!_style) { - __weak typeof(self) weakSelf = self; - _style = ^(SCLAlertViewStyle style){ - weakSelf.parameterStyle = style; - return weakSelf; - }; - } - return _style; -} -- (SCLAlertViewShowBuilder *(^)(NSString *closeButtonTitle))closeButtonTitle { - if (!_closeButtonTitle) { - __weak typeof(self) weakSelf = self; - _closeButtonTitle = ^(NSString *closeButtonTitle){ - weakSelf.parameterCloseButtonTitle = closeButtonTitle; - return weakSelf; - }; - } - return _closeButtonTitle; -} -- (SCLAlertViewShowBuilder *(^)(NSTimeInterval duration))duration { - if (!_duration) { - __weak typeof(self) weakSelf = self; - _duration = ^(NSTimeInterval duration){ - weakSelf.parameterDuration = duration; - return weakSelf; - }; - } - return _duration; -} - (void)showAlertView:(SCLAlertView *)alertView { [self showAlertView:alertView onViewController:self.parameterViewController]; @@ -2341,14 +2042,4 @@ - (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewControll } } -- (void (^)(SCLAlertView *view, UIViewController *controller))show { - if (!_show) { - __weak typeof(self) weakSelf = self; - _show = ^(SCLAlertView *view, UIViewController *controller) { - [weakSelf showAlertView:view onViewController:controller]; - }; - } - return _show; -} - @end From 2749b1f5cdf054ff5e5c93fef9ef197b1a0b3679 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Tue, 19 Jun 2018 11:03:32 +0300 Subject: [PATCH 190/250] project: updated. --- SCLAlertView.xcodeproj/project.pbxproj | 14 +++++++++----- .../xcschemes/SCLAlertViewFramework.xcscheme | 4 +--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index 7178e22..392f6fd 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -332,7 +332,7 @@ DDB15F9519D5B7C600173158 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = "AnyKey Entertainment"; TargetAttributes = { DDB15F9C19D5B7C600173158 = { @@ -471,12 +471,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -503,7 +505,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -523,12 +525,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -548,7 +552,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -562,7 +566,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -575,7 +579,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme index dc021f3..2dfa8f0 100644 --- a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme +++ b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme @@ -1,6 +1,6 @@ @@ -37,7 +36,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" From 14f01a1eddb4c1045b39c5bd96152c4f5289f6b3 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 19 Jun 2018 09:29:17 -0300 Subject: [PATCH 191/250] Add Xcode annoying file --- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 SCLAlertView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/SCLAlertView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SCLAlertView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SCLAlertView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From a8ab63255218982d62caa87b3479b65f3b745057 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 19 Jun 2018 09:41:18 -0300 Subject: [PATCH 192/250] Bump version --- 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 db94af2..429bce3 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 = "1.1.3" + spec.version = "1.1.4" 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" From 2e1d0fb47ff2baaf544b8b0799939335b66cf35d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 19 Jun 2018 09:42:37 -0300 Subject: [PATCH 193/250] Update Changelog --- CHANGELOG.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6792310..2022b3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,23 @@ # Change Log -## [Unreleased](https://github.com/dogo/SCLAlertView/tree/HEAD) - -[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.3...HEAD) +## [1.1.4](https://github.com/dogo/SCLAlertView/tree/1.1.4) (2018-06-19) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.3...1.1.4) **Closed issues:** +- Eliminate warnings [\#270](https://github.com/dogo/SCLAlertView/issues/270) +- How to add in multiple subtitle in an alert view? [\#266](https://github.com/dogo/SCLAlertView/issues/266) - SCLAlertViewHideAnimation wrong animations [\#262](https://github.com/dogo/SCLAlertView/issues/262) +- Title truncated [\#259](https://github.com/dogo/SCLAlertView/issues/259) - Use the builder pattern to build a SCLAlertView? [\#256](https://github.com/dogo/SCLAlertView/issues/256) - Carthage Support [\#255](https://github.com/dogo/SCLAlertView/issues/255) +**Merged pull requests:** + +- Fluent style project cleanup. [\#269](https://github.com/dogo/SCLAlertView/pull/269) ([lolgear](https://github.com/lolgear)) +- Create CONTRIBUTING.md [\#265](https://github.com/dogo/SCLAlertView/pull/265) ([dogo](https://github.com/dogo)) +- Create CODE\_OF\_CONDUCT.md [\#264](https://github.com/dogo/SCLAlertView/pull/264) ([dogo](https://github.com/dogo)) + ## [1.1.3](https://github.com/dogo/SCLAlertView/tree/1.1.3) (2018-01-17) [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.2...1.1.3) From a9cf31d9c4d01c0709b781fe7ca0c00b8848f470 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Thu, 21 Jun 2018 16:37:18 +0300 Subject: [PATCH 194/250] core: base builder with fluent has been added. --- SCLAlertView/SCLAlertView.h | 10 ++++++---- SCLAlertView/SCLAlertView.m | 24 ++++++++++-------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 13325ba..3a7be90 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -473,7 +473,9 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) - (void)setupFluent; @end -@interface SCLAlertViewShowBuilder : NSObject +@interface SCLAlertViewBuilder__WithFluent: NSObject @end + +@interface SCLAlertViewShowBuilder : SCLAlertViewBuilder__WithFluent @property(weak, nonatomic, readonly) UIViewController *parameterViewController; @property(copy, nonatomic, readonly) UIImage *parameterImage; @@ -501,7 +503,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic, readonly) void (^show)(SCLAlertView *view, UIViewController *controller); @end -@interface SCLALertViewTextFieldBuilder : NSObject +@interface SCLALertViewTextFieldBuilder : SCLAlertViewBuilder__WithFluent #pragma mark - Available later after adding @property(weak, nonatomic, readonly) SCLTextView *textField; @@ -511,7 +513,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @end -@interface SCLALertViewButtonBuilder : NSObject +@interface SCLALertViewButtonBuilder : SCLAlertViewBuilder__WithFluent #pragma mark - Available later after adding @property(weak, nonatomic, readonly) SCLButton *button; @@ -525,7 +527,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @end -@interface SCLAlertViewBuilder : NSObject +@interface SCLAlertViewBuilder : SCLAlertViewBuilder__WithFluent #pragma mark - Parameters @property (strong, nonatomic, readonly) SCLAlertView *alertView; diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index cd01ba3..6317b76 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -1663,6 +1663,16 @@ - (void)simplyAppear @end +@implementation SCLAlertViewBuilder__WithFluent +- (instancetype)init { + if (self = [super init]) { + [self setupFluent]; + } + return self; +} +- (void)setupFluent {} +@end + @interface SCLALertViewTextFieldBuilder() #pragma mark - Parameters @property(copy, nonatomic) NSString *parameterTitle; @@ -1682,13 +1692,6 @@ - (void)setupFluent { return weakSelf; }; } - -- (instancetype)init { - if (self = [super init]) { - [self setupFluent]; - } - return self; -} @end @interface SCLALertViewButtonBuilder() @@ -1737,13 +1740,6 @@ - (void)setupFluent { }; } -- (instancetype)init { - if (self = [super init]) { - [self setupFluent]; - } - return self; -} - @end From ac5b4b55cb8f35f80bb192137db1c9fb643d82e1 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 22 Jun 2018 19:05:22 -0300 Subject: [PATCH 195/250] Bump version --- 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 429bce3..28ebfe4 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 = "1.1.4" + spec.version = "1.1.5" 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" From d7c506efaf99e983b62b31850ada022ee31e23a5 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 28 Jun 2018 07:54:48 -0300 Subject: [PATCH 196/250] Add config for StaleBot StaleBot https://github.com/apps/stale --- .github/stale.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..df9fcbf --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,18 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 30 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - enhancement + - bug + - help wanted +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false From bf422e2f5d7020f99127d1c521739b35722c7408 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 28 Jun 2018 07:57:23 -0300 Subject: [PATCH 197/250] Update stale.yml --- .github/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/stale.yml b/.github/stale.yml index df9fcbf..05d02c5 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -15,4 +15,4 @@ markComment: > recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false +closeComment: true From d2cfeb6070c5a14f987b233c2bd8cfdff63b98bd Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 15 Sep 2018 11:54:56 -0300 Subject: [PATCH 198/250] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 29 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 17 +++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..83e0d86 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..066b2d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From b51763e7c3227719f269c711f2a53ff2701a6346 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 15 Sep 2018 11:55:13 -0300 Subject: [PATCH 199/250] Delete ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 46753da..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,17 +0,0 @@ -- [ ] I have verified there are no duplicate active or recent bugs, questions, or requests - -###### Include the following: - - SCLAlertView version: `1.0.3` - - Device OS version: `6.0` - - Device Name: `iPhone 6` - -###### Reproduction Steps - 1. - 2. - 3. - -###### Expected Result - -###### Actual Result - -### Tell us what could be improved: From 6930f77b5de0db97cce1580e0547e2603a47c9d2 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 14 Oct 2018 19:45:00 -0300 Subject: [PATCH 200/250] Update stale.yml --- .github/stale.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 05d02c5..9d23fb5 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -4,15 +4,14 @@ daysUntilStale: 30 daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - - enhancement - - bug - - help wanted + - pinned + - security # Label to use when marking an issue as stale -staleLabel: stale +staleLabel: wontfix # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable -closeComment: true +closeComment: false From ac323e6eba921206526f8e9c98d2a98366ae7931 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 14 Oct 2018 20:39:31 -0300 Subject: [PATCH 201/250] Update stale.yml --- .github/stale.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 9d23fb5..cb82aa4 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -4,8 +4,9 @@ daysUntilStale: 30 daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - - pinned - - security + - enhancement + - bug + - help wanted # Label to use when marking an issue as stale staleLabel: wontfix # Comment to post when marking an issue as stale. Set to `false` to disable From 0360d223fd649e15c7972e525d87c411b8ea4b82 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 14 Oct 2018 20:46:13 -0300 Subject: [PATCH 202/250] Set iOS deployment target to 8.0 Drop support to iOS 6.x and 7.x --- SCLAlertView-Objective-C.podspec | 2 +- SCLAlertView/SCLAlertView.m | 76 +++++++---------------------- SCLAlertView/UIImage+ImageEffects.m | 21 ++------ 3 files changed, 24 insertions(+), 75 deletions(-) diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index 28ebfe4..86dcfe7 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.frameworks = "UIKit", "AudioToolbox", "Accelerate", "CoreGraphics" - spec.ios.deployment_target = '6.0' + spec.ios.deployment_target = '8.0' spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => spec.version.to_s } spec.source_files = "SCLAlertView/*" spec.requires_arc = true diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 6317b76..e148a2a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -232,13 +232,9 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _viewText.textAlignment = NSTextAlignmentCenter; _viewText.font = [UIFont fontWithName:_bodyTextFontFamily size:_bodyFontSize]; _viewText.frame = CGRectMake(12.0f, _subTitleY, _windowWidth - 24.0f, _subTitleHeight); - - if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) - { - _viewText.textContainerInset = UIEdgeInsetsZero; - _viewText.textContainer.lineFragmentPadding = 0; - self.automaticallyAdjustsScrollViewInsets = NO; - } + _viewText.textContainerInset = UIEdgeInsetsZero; + _viewText.textContainer.lineFragmentPadding = 0; + self.automaticallyAdjustsScrollViewInsets = NO; // Content View _contentView.backgroundColor = [UIColor whiteColor]; @@ -308,14 +304,6 @@ - (void)viewWillLayoutSubviews sz = _rootViewController.view.frame.size; } - if (SYSTEM_VERSION_LESS_THAN(@"8.0")) { - // iOS versions before 7.0 did not switch the width and height on device roration - if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { - CGSize ssz = sz; - sz = CGSizeMake(ssz.height, ssz.width); - } - } - // Set new main frame CGRect r; if (self.view.superview != nil) { @@ -1466,53 +1454,25 @@ - (void)fadeIn - (void)slideInFromTop { - if (SYSTEM_VERSION_LESS_THAN(@"7.0")) - { - //From Frame - CGRect frame = self.backgroundView.frame; - frame.origin.y = -self.backgroundView.frame.size.height; - self.view.frame = frame; + //From Frame + CGRect frame = self.backgroundView.frame; + frame.origin.y = -self.backgroundView.frame.size.height; + self.view.frame = frame; + + [UIView animateWithDuration:0.5f delay:0.0f usingSpringWithDamping:0.6f initialSpringVelocity:0.5f options:0 animations:^{ + self.backgroundView.alpha = self.backgroundOpacity; - [UIView animateWithDuration:0.3f animations:^{ - self.backgroundView.alpha = self.backgroundOpacity; - - //To Frame - CGRect frame = self.backgroundView.frame; - frame.origin.y = 0.0f; - self.view.frame = frame; - - self.view.alpha = 1.0f; - } completion:^(BOOL completed) { - [UIView animateWithDuration:0.2f animations:^{ - self.view.center = self.backgroundView.center; - } completion:^(BOOL finished) { - if ( self.showAnimationCompletionBlock ){ - self.showAnimationCompletionBlock(); - } - }]; - }]; - } - else { - //From Frame + //To Frame CGRect frame = self.backgroundView.frame; - frame.origin.y = -self.backgroundView.frame.size.height; + frame.origin.y = 0.0f; self.view.frame = frame; - [UIView animateWithDuration:0.5f delay:0.0f usingSpringWithDamping:0.6f initialSpringVelocity:0.5f options:0 animations:^{ - self.backgroundView.alpha = self.backgroundOpacity; - - //To Frame - CGRect frame = self.backgroundView.frame; - frame.origin.y = 0.0f; - self.view.frame = frame; - - self.view.alpha = 1.0f; - } completion:^(BOOL finished) { - if ( self.showAnimationCompletionBlock ){ - self.showAnimationCompletionBlock(); - } - }]; - } + self.view.alpha = 1.0f; + } completion:^(BOOL finished) { + if ( self.showAnimationCompletionBlock ){ + self.showAnimationCompletionBlock(); + } + }]; } - (void)slideInFromBottom diff --git a/SCLAlertView/UIImage+ImageEffects.m b/SCLAlertView/UIImage+ImageEffects.m index 280560e..121e0e6 100755 --- a/SCLAlertView/UIImage+ImageEffects.m +++ b/SCLAlertView/UIImage+ImageEffects.m @@ -312,22 +312,11 @@ + (UIImage *)convertViewToImage:(UIView *)view CGFloat scale = [UIScreen mainScreen].scale; UIImage *capturedScreen; - if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) - { - //Optimized/fast method for rendering a UIView as image on iOS 7 and later versions. - UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, scale); - [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:NO]; - capturedScreen = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - } - else - { - //For devices running on earlier iOS versions. - UIGraphicsBeginImageContextWithOptions(view.bounds.size,YES, scale); - [view.layer renderInContext:UIGraphicsGetCurrentContext()]; - capturedScreen = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - } + //Optimized/fast method for rendering a UIView as image on iOS 7 and later versions. + UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, scale); + [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:NO]; + capturedScreen = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); return capturedScreen; } From 7f355e7f79ba38a85d03c555476c94e58c66b5c1 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 14 Oct 2018 20:55:06 -0300 Subject: [PATCH 203/250] Bump version --- 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 86dcfe7..70e06da 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 = "1.1.5" + spec.version = "1.1.6" 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" From b601af8680e7ae8f8357d82866b9f40d9e345f8e Mon Sep 17 00:00:00 2001 From: kingste <649925026@qq.com> Date: Fri, 12 Jun 2020 17:58:43 +0800 Subject: [PATCH 204/250] Fix break a strong reference cycle --- SCLAlertView/SCLAlertView.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index e148a2a..3e02483 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -984,8 +984,9 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima { SCLButton *btn = _buttons[buttonTimer.buttonIndex]; btn.timer = buttonTimer; + __weak __typeof(self) weakSelf = self; [buttonTimer startTimerWithTimeLimit:duration completed:^{ - [self buttonTapped:btn]; + [weakSelf buttonTapped:btn]; }]; } else From 34f15eb864e1c04c4fea8bc4f305923383a106c2 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 31 Oct 2020 16:09:57 -0300 Subject: [PATCH 205/250] Drop support of iOS 8.x and set target to 9.x Fix iOS 9.x warnings --- SCLAlertView-Objective-C.podspec | 2 +- SCLAlertView.xcodeproj/project.pbxproj | 87 ++++++++++++++----- .../xcschemes/SCLAlertViewFramework.xcscheme | 6 +- .../{ => AppDelegate}/AppDelegate.h | 0 .../{ => AppDelegate}/AppDelegate.m | 0 .../Category/UIViewController+Alert.h | 22 +++++ .../Category/UIViewController+Alert.m | 32 +++++++ .../{ => ViewController}/ViewController.h | 0 .../{ => ViewController}/ViewController.m | 51 +++++++---- 9 files changed, 154 insertions(+), 46 deletions(-) rename SCLAlertViewExample/{ => AppDelegate}/AppDelegate.h (100%) rename SCLAlertViewExample/{ => AppDelegate}/AppDelegate.m (100%) create mode 100644 SCLAlertViewExample/Category/UIViewController+Alert.h create mode 100644 SCLAlertViewExample/Category/UIViewController+Alert.m rename SCLAlertViewExample/{ => ViewController}/ViewController.h (100%) rename SCLAlertViewExample/{ => ViewController}/ViewController.m (88%) diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index 70e06da..dcf418e 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.frameworks = "UIKit", "AudioToolbox", "Accelerate", "CoreGraphics" - spec.ios.deployment_target = '8.0' + spec.ios.deployment_target = '9.0' spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => spec.version.to_s } spec.source_files = "SCLAlertView/*" spec.requires_arc = true diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index 392f6fd..1d41bc0 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -22,9 +22,10 @@ DD4B77E41D8C580B00CF97C7 /* SCLAlertViewFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 44E430DB1D889255002FE849 /* SCLAlertViewFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; DD4BA9C119DED8EF008D73EB /* right_answer.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */; }; DD7282B919D6087C00077F54 /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD7282B719D6087C00077F54 /* Storyboard.storyboard */; }; + DDAD0113254DEABA00270C67 /* UIViewController+Alert.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD0111254DEABA00270C67 /* UIViewController+Alert.m */; }; + DDAD011D254DEAEC00270C67 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD0119254DEAEC00270C67 /* AppDelegate.m */; }; + DDAD011E254DEAEC00270C67 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD011B254DEAEC00270C67 /* ViewController.m */; }; DDB15FBD19D5B7C600173158 /* SCLAlertViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FBC19D5B7C600173158 /* SCLAlertViewTests.m */; }; - DDB15FCA19D5B88A00173158 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FC719D5B88A00173158 /* AppDelegate.m */; }; - DDB15FCB19D5B88A00173158 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FC919D5B88A00173158 /* ViewController.m */; }; DDB15FD019D5B8BF00173158 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDB15FCF19D5B8BF00173158 /* Images.xcassets */; }; DDB15FD419D5B8DB00173158 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FD319D5B8DB00173158 /* main.m */; }; DDB15FD719D5B96500173158 /* SCLAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB15FD619D5B96500173158 /* SCLAlertView.m */; }; @@ -73,14 +74,16 @@ DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = right_answer.mp3; sourceTree = ""; }; DD4BA9C219DEDD8E008D73EB /* SCLAlertView-Objective-C-prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SCLAlertView-Objective-C-prefix.pch"; path = "SCLAlertViewExample/SCLAlertView-Objective-C-prefix.pch"; sourceTree = SOURCE_ROOT; }; DD7282B819D6087C00077F54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = SCLAlertViewExample/Base.lproj/Storyboard.storyboard; sourceTree = SOURCE_ROOT; }; + DDAD0111254DEABA00270C67 /* UIViewController+Alert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Alert.m"; sourceTree = ""; }; + DDAD0112254DEABA00270C67 /* UIViewController+Alert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Alert.h"; sourceTree = ""; }; + DDAD0118254DEAEC00270C67 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + DDAD0119254DEAEC00270C67 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + DDAD011B254DEAEC00270C67 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + DDAD011C254DEAEC00270C67 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; DDB15F9D19D5B7C600173158 /* SCLAlertView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SCLAlertView.app; sourceTree = BUILT_PRODUCTS_DIR; }; DDB15FB619D5B7C600173158 /* SCLAlertViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCLAlertViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; DDB15FBB19D5B7C600173158 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DDB15FBC19D5B7C600173158 /* SCLAlertViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SCLAlertViewTests.m; sourceTree = ""; }; - DDB15FC619D5B88A00173158 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = SCLAlertViewExample/AppDelegate.h; sourceTree = SOURCE_ROOT; }; - DDB15FC719D5B88A00173158 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = SCLAlertViewExample/AppDelegate.m; sourceTree = SOURCE_ROOT; }; - DDB15FC819D5B88A00173158 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewController.h; path = SCLAlertViewExample/ViewController.h; sourceTree = SOURCE_ROOT; }; - DDB15FC919D5B88A00173158 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ViewController.m; path = SCLAlertViewExample/ViewController.m; sourceTree = SOURCE_ROOT; }; DDB15FCF19D5B8BF00173158 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SCLAlertViewExample/Images.xcassets; sourceTree = SOURCE_ROOT; }; DDB15FD319D5B8DB00173158 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = SCLAlertViewExample/main.m; sourceTree = SOURCE_ROOT; }; DDB15FD619D5B96500173158 /* SCLAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCLAlertView.m; sourceTree = ""; }; @@ -147,6 +150,36 @@ path = SCLAlertViewExample/Sounds; sourceTree = SOURCE_ROOT; }; + DDAD0110254DEABA00270C67 /* Category */ = { + isa = PBXGroup; + children = ( + DDAD0111254DEABA00270C67 /* UIViewController+Alert.m */, + DDAD0112254DEABA00270C67 /* UIViewController+Alert.h */, + ); + name = Category; + path = SCLAlertViewExample/Category; + sourceTree = SOURCE_ROOT; + }; + DDAD0117254DEAEC00270C67 /* AppDelegate */ = { + isa = PBXGroup; + children = ( + DDAD0118254DEAEC00270C67 /* AppDelegate.h */, + DDAD0119254DEAEC00270C67 /* AppDelegate.m */, + ); + name = AppDelegate; + path = SCLAlertViewExample/AppDelegate; + sourceTree = SOURCE_ROOT; + }; + DDAD011A254DEAEC00270C67 /* ViewController */ = { + isa = PBXGroup; + children = ( + DDAD011C254DEAEC00270C67 /* ViewController.h */, + DDAD011B254DEAEC00270C67 /* ViewController.m */, + ); + name = ViewController; + path = SCLAlertViewExample/ViewController; + sourceTree = SOURCE_ROOT; + }; DDB15F9419D5B7C600173158 = { isa = PBXGroup; children = ( @@ -173,12 +206,11 @@ isa = PBXGroup; children = ( DDB15FCF19D5B8BF00173158 /* Images.xcassets */, - DDB15FC619D5B88A00173158 /* AppDelegate.h */, - DDB15FC719D5B88A00173158 /* AppDelegate.m */, - DDB15FC819D5B88A00173158 /* ViewController.h */, - DDB15FC919D5B88A00173158 /* ViewController.m */, - DDB15FA019D5B7C600173158 /* Supporting Files */, DD7282B719D6087C00077F54 /* Storyboard.storyboard */, + DDAD0117254DEAEC00270C67 /* AppDelegate */, + DDAD0110254DEABA00270C67 /* Category */, + DDB15FA019D5B7C600173158 /* Supporting Files */, + DDAD011A254DEAEC00270C67 /* ViewController */, ); name = SCLAlertViewExample; path = SCLAlertView; @@ -332,11 +364,12 @@ DDB15F9519D5B7C600173158 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = "AnyKey Entertainment"; TargetAttributes = { DDB15F9C19D5B7C600173158 = { CreatedOnToolsVersion = 6.0.1; + LastSwiftMigration = 1200; }; DDB15FB519D5B7C600173158 = { CreatedOnToolsVersion = 6.0.1; @@ -349,7 +382,7 @@ }; buildConfigurationList = DDB15F9819D5B7C600173158 /* Build configuration list for PBXProject "SCLAlertView" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -400,16 +433,17 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DDAD011D254DEAEC00270C67 /* AppDelegate.m in Sources */, DD2E172A19FA84B800CBAEC3 /* UIImage+ImageEffects.m in Sources */, - DDB15FCB19D5B88A00173158 /* ViewController.m in Sources */, DDB15FD419D5B8DB00173158 /* main.m in Sources */, CF6FB1241C5926FC009715F3 /* SCLSwitchView.m in Sources */, DDB15FE119D5D85B00173158 /* SCLAlertViewStyleKit.m in Sources */, + DDAD0113254DEABA00270C67 /* UIViewController+Alert.m in Sources */, + DDAD011E254DEAEC00270C67 /* ViewController.m in Sources */, DD24453C1BAC383600892117 /* SCLTextView.m in Sources */, 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */, DDB15FD719D5B96500173158 /* SCLAlertView.m in Sources */, DDB15FDB19D5BAA000173158 /* SCLButton.m in Sources */, - DDB15FCA19D5B88A00173158 /* AppDelegate.m in Sources */, DDB15FDE19D5BCF400173158 /* SCLAlertViewResponder.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -481,6 +515,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -505,7 +540,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -535,6 +570,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -552,7 +588,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -565,11 +601,14 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -578,11 +617,13 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -636,11 +677,13 @@ GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = SCLAlertViewFramework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = br.com.anykey.SCLAlertViewFramework; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -661,11 +704,13 @@ GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = SCLAlertViewFramework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = br.com.anykey.SCLAlertViewFramework; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; diff --git a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme index 2dfa8f0..ad82d58 100644 --- a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme +++ b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertViewFramework.xcscheme @@ -1,6 +1,6 @@ - - - - +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface UIViewController (Alert) + +typedef void (^ActionBlock)(void); + +- (void)showAlertWithTitle:(NSString *)title message:(NSString *)message actionBlock:(nullable ActionBlock)actionBlock; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SCLAlertViewExample/Category/UIViewController+Alert.m b/SCLAlertViewExample/Category/UIViewController+Alert.m new file mode 100644 index 0000000..ecb3b22 --- /dev/null +++ b/SCLAlertViewExample/Category/UIViewController+Alert.m @@ -0,0 +1,32 @@ +// +// UIViewController+Alert.m +// SCLAlertView +// +// Created by Diogo Autilio on 31/10/20. +// Copyright © 2020 AnyKey Entertainment. All rights reserved. +// + +#import "UIViewController+Alert.h" + +@implementation UIViewController (Alert) + +- (void)showAlertWithTitle:(NSString *)title message:(NSString *)message actionBlock:(nullable ActionBlock)actionBlock +{ + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title + message:message + preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + [alertController dismissViewControllerAnimated:YES completion:nil]; + if (actionBlock) { + actionBlock(); + } + }]; + [alertController addAction:okAction]; + + [self presentViewController:alertController animated:YES completion:nil]; +} + +@end diff --git a/SCLAlertViewExample/ViewController.h b/SCLAlertViewExample/ViewController/ViewController.h similarity index 100% rename from SCLAlertViewExample/ViewController.h rename to SCLAlertViewExample/ViewController/ViewController.h diff --git a/SCLAlertViewExample/ViewController.m b/SCLAlertViewExample/ViewController/ViewController.m similarity index 88% rename from SCLAlertViewExample/ViewController.m rename to SCLAlertViewExample/ViewController/ViewController.m index ebcc0af..c21ed16 100644 --- a/SCLAlertViewExample/ViewController.m +++ b/SCLAlertViewExample/ViewController/ViewController.m @@ -8,6 +8,7 @@ #import "ViewController.h" #import "SCLAlertView.h" +#import "UIViewController+Alert.h" @interface ViewController () @@ -271,19 +272,23 @@ - (IBAction)showValidation:(id)sender SCLTextView *oddField = [alert addTextField:@"Enter an odd number"]; oddField.keyboardType = UIKeyboardTypeNumberPad; - + + __weak __typeof(self) weakSelf = self; + [alert addButton:@"Test Validation" validationBlock:^BOOL{ if (evenField.text.length == 0) { - [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"You forgot to add an even number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; - [evenField becomeFirstResponder]; + [weakSelf showAlertWithTitle:@"Whoops!" message:@"You forgot to add an even number." actionBlock:^{ + [evenField becomeFirstResponder]; + }]; return NO; } if (oddField.text.length == 0) { - [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"You forgot to add an odd number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; - [oddField becomeFirstResponder]; + [weakSelf showAlertWithTitle:@"Whoops!" message:@"You forgot to add an odd number." actionBlock:^{ + [oddField becomeFirstResponder]; + }]; return NO; } @@ -292,8 +297,9 @@ - (IBAction)showValidation:(id)sender if (!evenFieldPassedValidation) { - [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"That is not an even number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; - [evenField becomeFirstResponder]; + [weakSelf showAlertWithTitle:@"Whoops!" message:@"That is not an even number." actionBlock:^{ + [evenField becomeFirstResponder]; + }]; return NO; } @@ -302,13 +308,14 @@ - (IBAction)showValidation:(id)sender if (!oddFieldPassedValidation) { - [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"That is not an odd number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; - [oddField becomeFirstResponder]; + [weakSelf showAlertWithTitle:@"Whoops!" message:@"That is not an odd number." actionBlock:^{ + [oddField becomeFirstResponder]; + }]; return NO; } return YES; } actionBlock:^{ - [[[UIAlertView alloc] initWithTitle:@"Great Job!" message:@"Thanks for playing." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + [weakSelf showAlertWithTitle:@"Great Job!" message:@"Thanks for playing." actionBlock:nil]; }]; [alert showEdit:self title:@"Validation" subTitle:@"Ensure the data is correct before dismissing!" closeButtonTitle:@"Cancel" duration:0]; @@ -324,19 +331,23 @@ - (IBAction)showValidationWithHorizontalButtons:(id)sender SCLTextView *oddField = [alert addTextField:@"Enter an odd number"]; oddField.keyboardType = UIKeyboardTypeNumberPad; + + __weak __typeof(self) weakSelf = self; [alert addButton:@"Test Validation" validationBlock:^BOOL{ if (evenField.text.length == 0) { - [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"You forgot to add an even number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; - [evenField becomeFirstResponder]; + [weakSelf showAlertWithTitle:@"Whoops!" message:@"You forgot to add an even number." actionBlock:^{ + [evenField becomeFirstResponder]; + }]; return NO; } if (oddField.text.length == 0) { - [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"You forgot to add an odd number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; - [oddField becomeFirstResponder]; + [weakSelf showAlertWithTitle:@"Whoops!" message:@"You forgot to add an odd number." actionBlock:^{ + [oddField becomeFirstResponder]; + }]; return NO; } @@ -345,8 +356,9 @@ - (IBAction)showValidationWithHorizontalButtons:(id)sender if (!evenFieldPassedValidation) { - [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"That is not an even number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; - [evenField becomeFirstResponder]; + [weakSelf showAlertWithTitle:@"Whoops!" message:@"That is not an even number." actionBlock:^{ + [evenField becomeFirstResponder]; + }]; return NO; } @@ -355,13 +367,14 @@ - (IBAction)showValidationWithHorizontalButtons:(id)sender if (!oddFieldPassedValidation) { - [[[UIAlertView alloc] initWithTitle:@"Whoops!" message:@"That is not an odd number." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; - [oddField becomeFirstResponder]; + [weakSelf showAlertWithTitle:@"Whoops!" message:@"That is not an odd number." actionBlock:^{ + [oddField becomeFirstResponder]; + }]; return NO; } return YES; } actionBlock:^{ - [[[UIAlertView alloc] initWithTitle:@"Great Job!" message:@"Thanks for playing." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + [weakSelf showAlertWithTitle:@"Great Job!" message:@"Thanks for playing." actionBlock:nil]; }]; [alert showEdit:self title:@"Validation" subTitle:@"Ensure the data is correct before dismissing!" closeButtonTitle:@"Cancel" duration:0]; From 50926c0b2646fa6055390e7a4a047fce0424aaa4 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 31 Oct 2020 16:10:40 -0300 Subject: [PATCH 206/250] Bump version --- 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 dcf418e..cfb5881 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 = "1.1.6" + spec.version = "1.2.0" 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" From b5e3aaf62ab4efa56cc9cd4716a48bc03bbcbff3 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 31 Oct 2020 16:11:54 -0300 Subject: [PATCH 207/250] Update Ruby to 2.6.5 (was 2.3.1) --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index 2bf1c1c..57cf282 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.1 +2.6.5 From 0b20b774b74f6266c7ed2b9b5cc3ddb6f1c39f09 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 31 Oct 2020 16:13:54 -0300 Subject: [PATCH 208/250] Add Gemfile --- Gemfile | 8 +++++ Gemfile.lock | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 Gemfile create mode 100644 Gemfile.lock diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..2096226 --- /dev/null +++ b/Gemfile @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +source "https://rubygems.org" +ruby "2.6.5" + +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + +gem "cocoapods" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..382d349 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,96 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.2) + activesupport (5.2.4.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + claide (1.0.3) + cocoapods (1.10.0) + addressable (~> 2.6) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.10.0) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.6.6) + nap (~> 1.0) + ruby-macho (~> 1.4) + xcodeproj (>= 1.19.0, < 2.0) + cocoapods-core (1.10.0) + activesupport (> 5.0, < 6) + addressable (~> 2.6) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.4) + cocoapods-downloader (1.4.0) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.0) + cocoapods-trunk (1.5.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored2 (3.1.2) + concurrent-ruby (1.1.7) + escape (0.0.4) + ethon (0.12.0) + ffi (>= 1.3.0) + ffi (1.13.1) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (1.8.5) + concurrent-ruby (~> 1.0) + json (2.3.1) + minitest (5.14.2) + molinillo (0.6.6) + nanaimo (0.3.0) + nap (1.1.0) + netrc (0.11.0) + public_suffix (4.0.6) + ruby-macho (1.4.0) + thread_safe (0.3.6) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (1.2.7) + thread_safe (~> 0.1) + xcodeproj (1.19.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + +PLATFORMS + ruby + +DEPENDENCIES + cocoapods + +RUBY VERSION + ruby 2.6.5p114 + +BUNDLED WITH + 2.1.4 From dd9e5f5a783cdb8e87d51bbe59b835ddf6c19bed Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 31 Oct 2020 16:20:57 -0300 Subject: [PATCH 209/250] Replace Travis with Github Action --- .github/scripts/build_app.sh | 8 ++ .github/workflows/Build.yml | 16 ++++ .travis.yml | 7 -- .../xcschemes/SCLAlertView.xcscheme | 88 +++++++++++++++++++ 4 files changed, 112 insertions(+), 7 deletions(-) create mode 100755 .github/scripts/build_app.sh create mode 100755 .github/workflows/Build.yml delete mode 100644 .travis.yml create mode 100644 SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertView.xcscheme diff --git a/.github/scripts/build_app.sh b/.github/scripts/build_app.sh new file mode 100755 index 0000000..41a9d56 --- /dev/null +++ b/.github/scripts/build_app.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -eo pipefail + +xcodebuild -project SCLAlertView.xcodeproj \ + -scheme SCLAlertView \ + -destination platform=iOS\ Simulator,OS=14.0,name=iPhone\ 11 \ + clean build | xcpretty diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml new file mode 100755 index 0000000..510aeaa --- /dev/null +++ b/.github/workflows/Build.yml @@ -0,0 +1,16 @@ +name: Building +on: [push, pull_request] + +jobs: + build: + name: Building SCLAlertView + runs-on: macOS-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Xcode version + uses: maxim-lobanov/setup-xcode@v1.1 + with: + xcode-version: 12.0.0 + - name: Building iOS app + run: exec ./.github/scripts/build_app.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9158c8b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -# reference: http://www.objc.io/issue-6/travis-ci.html - -language: objective-c -osx_image: xcode8.3 - -script: -- xcodebuild -project SCLAlertView.xcodeproj -target SCLAlertView -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO \ No newline at end of file diff --git a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertView.xcscheme b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertView.xcscheme new file mode 100644 index 0000000..aafb128 --- /dev/null +++ b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertView.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 59ec8066711cdbdeaa4f11fb0175a4d866ee87ae Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 31 Oct 2020 16:24:01 -0300 Subject: [PATCH 210/250] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b00e19..d4427ef 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ SCLAlertView-Objective-C Animated Alert View written in Swift but ported to Objective-C, which can be used as a `UIAlertView` or `UIAlertController` replacement. -[![Build Status](https://travis-ci.org/dogo/SCLAlertView.svg?branch=master)](https://travis-ci.org/dogo/SCLAlertView) +![Build Status](https://github.com/dogo/SCLAlertView/workflows/Building/badge.svg) [![Cocoapods](http://img.shields.io/cocoapods/v/SCLAlertView-Objective-C.svg)](http://cocoapods.org/?q=SCLAlertView-Objective-C) [![Pod License](http://img.shields.io/cocoapods/l/SCLAlertView-Objective-C.svg)](https://github.com/dogo/SCLAlertView/blob/master/LICENSE) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) From 4cc166ec252c4f0f4f9733cdb2bd3169b917bcac Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 31 Oct 2020 16:27:05 -0300 Subject: [PATCH 211/250] Update README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index d4427ef..6b41551 100644 --- a/README.md +++ b/README.md @@ -112,10 +112,6 @@ SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindowWidth:300.0f]; ``` -### New Window: Known issues - -1. SCLAlert animation is wrong in landscape. (iOS 6.X and 7.X) - ### Add buttons ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; From 624dcb1e9f528121636062e38c7df9c3ec20d70b Mon Sep 17 00:00:00 2001 From: syto203 <26351342+syto203@users.noreply.github.com> Date: Sun, 22 Nov 2020 16:18:46 +0200 Subject: [PATCH 212/250] set a Default Value for a Text Field --- SCLAlertView/SCLAlertView.h | 4 ++-- SCLAlertView/SCLAlertView.m | 25 +++++++++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 3a7be90..33ec029 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -289,7 +289,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) * * @param title The text displayed on the textfield. */ -- (SCLTextView *)addTextField:(NSString *)title; +- (SCLTextView *)addTextField:(NSString *)title setDefaultText:(NSString *)defaultText; /** Add a custom Text Field * @@ -567,7 +567,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic) SCLAlertViewBuilder *(^alertShowAnimationIsCompleted) (SCLShowAnimationCompletionBlock showAnimationCompletionBlock); @property(copy, nonatomic) SCLAlertViewBuilder *(^removeTopCircle)(void); @property(copy, nonatomic) SCLAlertViewBuilder *(^addCustomView)(UIView *view); -@property(copy, nonatomic) SCLAlertViewBuilder *(^addTextField)(NSString *title); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addTextField)(NSString *title, NSString *defaultText); @property(copy, nonatomic) SCLAlertViewBuilder *(^addCustomTextField)(UITextField *textField); @property(copy, nonatomic) SCLAlertViewBuilder *(^addSwitchViewWithLabelTitle)(NSString *title); @property(copy, nonatomic) SCLAlertViewBuilder *(^addTimerToButtonIndex)(NSInteger buttonIndex, BOOL reverse); diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 3e02483..20a22dc 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -561,7 +561,7 @@ - (SCLSwitchView *)addSwitchViewWithLabel:(NSString *)label #pragma mark - TextField -- (SCLTextView *)addTextField:(NSString *)title +- (SCLTextView *)addTextField:(NSString *)title setDefaultText:(NSString *)defaultText { [self addObservers]; @@ -577,6 +577,10 @@ - (SCLTextView *)addTextField:(NSString *)title { txt.placeholder = title; } + if (defaultText != nil) + { + txt.text = defaultText; + } [_contentView addSubview:txt]; [_inputs addObject:txt]; @@ -1637,12 +1641,14 @@ - (void)setupFluent {} @interface SCLALertViewTextFieldBuilder() #pragma mark - Parameters @property(copy, nonatomic) NSString *parameterTitle; +@property(copy, nonatomic) NSString *parameterDefaultText; #pragma mark - Available later after adding @property(weak, nonatomic) SCLTextView *textField; #pragma mark - Setters @property(copy, nonatomic) SCLALertViewTextFieldBuilder *(^title) (NSString *title); +@property(copy, nonatomic) SCLALertViewTextFieldBuilder *(^defaultText) (NSString *defaultText); @end @implementation SCLALertViewTextFieldBuilder @@ -1652,6 +1658,10 @@ - (void)setupFluent { weakSelf.parameterTitle = title; return weakSelf; }; + self.defaultText = ^(NSString *defaultText){ + weakSelf.parameterDefaultText = defaultText; + return weakSelf; + }; } @end @@ -1659,6 +1669,7 @@ @interface SCLALertViewButtonBuilder() #pragma mark - Parameters @property(copy, nonatomic) NSString *parameterTitle; +@property(copy, nonatomic) NSString *parameterDefaultText; @property(weak, nonatomic) id parameterTarget; @property(assign, nonatomic) SEL parameterSelector; @property(copy, nonatomic) void(^parameterActionBlock)(void); @@ -1669,6 +1680,7 @@ @interface SCLALertViewButtonBuilder() #pragma mark - Setters @property(copy, nonatomic) SCLALertViewButtonBuilder *(^title) (NSString *title); +@property(copy, nonatomic) SCLALertViewButtonBuilder *(^defaultText) (NSString *defaultText); @property(copy, nonatomic) SCLALertViewButtonBuilder *(^target) (id target); @property(copy, nonatomic) SCLALertViewButtonBuilder *(^selector) (SEL selector); @property(copy, nonatomic) SCLALertViewButtonBuilder *(^actionBlock) (void(^actionBlock)(void)); @@ -1683,6 +1695,10 @@ - (void)setupFluent { weakSelf.parameterTitle = title; return weakSelf; }; + self.defaultText = ^(NSString *defaultText){ + weakSelf.parameterDefaultText = defaultText; + return weakSelf; + }; self.target = ^(id target){ weakSelf.parameterTarget = target; return weakSelf; @@ -1822,8 +1838,8 @@ - (void)setupFluent { [weakSelf.alertView addCustomView:view]; return weakSelf; }; - self.addTextField = ^(NSString *title) { - [weakSelf.alertView addTextField:title]; + self.addTextField = ^(NSString *title, NSString *defaultText) { + [weakSelf.alertView addTextField:title setDefaultText:defaultText]; return weakSelf; }; self.addCustomTextField = ^(UITextField *textField) { @@ -1879,7 +1895,7 @@ - (void)setupFluent { }; self.addTextFieldWithBuilder = ^(SCLALertViewTextFieldBuilder *builder){ - builder.textField = [weakSelf.alertView addTextField:builder.parameterTitle]; + builder.textField = [weakSelf.alertView addTextField:builder.parameterTitle setDefaultText:builder.parameterDefaultText]; return weakSelf; }; } @@ -1916,6 +1932,7 @@ @interface SCLAlertViewShowBuilder() @property(copy, nonatomic) UIImage *parameterImage; @property(copy, nonatomic) UIColor *parameterColor; @property(copy, nonatomic) NSString *parameterTitle; +@property(copy, nonatomic) NSString *parameterDefaultText; @property(copy, nonatomic) NSString *parameterSubTitle; @property(copy, nonatomic) NSString *parameterCompleteText; @property(copy, nonatomic) NSString *parameterCloseButtonTitle; From 06eadefbcbdc29af9632bd71daaa1c037ac217e8 Mon Sep 17 00:00:00 2001 From: syto203 <26351342+syto203@users.noreply.github.com> Date: Sun, 22 Nov 2020 16:25:50 +0200 Subject: [PATCH 213/250] set a Default Value for a Text Field --- .../ViewController/ViewController.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/SCLAlertViewExample/ViewController/ViewController.m b/SCLAlertViewExample/ViewController/ViewController.m index c21ed16..567938c 100644 --- a/SCLAlertViewExample/ViewController/ViewController.m +++ b/SCLAlertViewExample/ViewController/ViewController.m @@ -119,7 +119,7 @@ - (IBAction)showEdit:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - SCLTextView *textField = [alert addTextField:@"Enter your name"]; + SCLTextView *textField = [alert addTextField:@"Enter your name" setDefaultText:nil]; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); }]; @@ -132,7 +132,7 @@ - (IBAction)showEditWithHorizontalButtons:(id)sender SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert setHorizontalButtons:YES]; - SCLTextView *textField = [alert addTextField:@"Enter your name"]; + SCLTextView *textField = [alert addTextField:@"Enter your name" setDefaultText:nil]; alert.hideAnimationType = SCLAlertViewHideAnimationSimplyDisappear; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); @@ -157,7 +157,7 @@ - (IBAction)showAdvanced:(id)sender NSLog(@"Second button tapped"); }]; - SCLTextView *textField = [alert addTextField:@"Enter your name"]; + SCLTextView *textField = [alert addTextField:@"Enter your name" setDefaultText:nil]; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); @@ -211,7 +211,7 @@ - (IBAction)ShowAdvancedWithHorizontalButtons:(id)sender NSLog(@"Second button tapped"); }]; - SCLTextView *textField = [alert addTextField:@"Enter your name"]; + SCLTextView *textField = [alert addTextField:@"Enter your name" setDefaultText:nil]; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); @@ -267,10 +267,10 @@ - (IBAction)showValidation:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - SCLTextView *evenField = [alert addTextField:@"Enter an even number"]; + SCLTextView *evenField = [alert addTextField:@"Enter an even number" setDefaultText:nil]; evenField.keyboardType = UIKeyboardTypeNumberPad; - SCLTextView *oddField = [alert addTextField:@"Enter an odd number"]; + SCLTextView *oddField = [alert addTextField:@"Enter an odd number" setDefaultText:nil]; oddField.keyboardType = UIKeyboardTypeNumberPad; __weak __typeof(self) weakSelf = self; @@ -326,10 +326,10 @@ - (IBAction)showValidationWithHorizontalButtons:(id)sender SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert setHorizontalButtons:YES]; - SCLTextView *evenField = [alert addTextField:@"Enter an even number"]; + SCLTextView *evenField = [alert addTextField:@"Enter an even number" setDefaultText:nil]; evenField.keyboardType = UIKeyboardTypeNumberPad; - SCLTextView *oddField = [alert addTextField:@"Enter an odd number"]; + SCLTextView *oddField = [alert addTextField:@"Enter an odd number" setDefaultText:nil]; oddField.keyboardType = UIKeyboardTypeNumberPad; __weak __typeof(self) weakSelf = self; From 531cb22a59651abfa456a3bbc428c5a3fc3d5c34 Mon Sep 17 00:00:00 2001 From: syto203 <26351342+syto203@users.noreply.github.com> Date: Sun, 22 Nov 2020 16:31:38 +0200 Subject: [PATCH 214/250] update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b41551..001df7c 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ alert.attributedFormatBlock = ^NSAttributedString* (NSString *value) ```Objective-C SCLAlertView *alert = [[SCLAlertView alloc] init]; -UITextField *textField = [alert addTextField:@"Enter your name"]; +UITextField *textField = [alert addTextField:@"Enter your name" setDefaultText:nil]; [alert addButton:@"Show Name" actionBlock:^(void) { NSLog(@"Text value: %@", textField.text); From 663f8325056356b7315bd266a1fbeed80200b0bc Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Thu, 26 Aug 2021 11:36:32 -0300 Subject: [PATCH 215/250] Update Gems --- Gemfile.lock | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 382d349..ed6b39b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,23 +1,23 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.2) - activesupport (5.2.4.4) + CFPropertyList (3.0.3) + activesupport (5.2.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) claide (1.0.3) - cocoapods (1.10.0) + cocoapods (1.10.2) addressable (~> 2.6) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.10.0) + cocoapods-core (= 1.10.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.4.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -32,7 +32,7 @@ GEM nap (~> 1.0) ruby-macho (~> 1.4) xcodeproj (>= 1.19.0, < 2.0) - cocoapods-core (1.10.0) + cocoapods-core (1.10.2) activesupport (> 5.0, < 6) addressable (~> 2.6) algoliasearch (~> 1.0) @@ -42,46 +42,48 @@ GEM netrc (~> 0.11) public_suffix typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.4) + cocoapods-deintegrate (1.0.5) cocoapods-downloader (1.4.0) cocoapods-plugins (1.0.0) nap - cocoapods-search (1.0.0) + cocoapods-search (1.0.1) cocoapods-trunk (1.5.0) nap (>= 0.8, < 2.0) netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.1.7) + concurrent-ruby (1.1.9) escape (0.0.4) - ethon (0.12.0) - ffi (>= 1.3.0) - ffi (1.13.1) + ethon (0.14.0) + ffi (>= 1.15.0) + ffi (1.15.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) - i18n (1.8.5) + i18n (1.8.10) concurrent-ruby (~> 1.0) - json (2.3.1) - minitest (5.14.2) + json (2.5.1) + minitest (5.14.4) molinillo (0.6.6) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) public_suffix (4.0.6) + rexml (3.2.5) ruby-macho (1.4.0) thread_safe (0.3.6) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.7) + tzinfo (1.2.9) thread_safe (~> 0.1) - xcodeproj (1.19.0) + xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) + rexml (~> 3.2.4) PLATFORMS ruby From 0fadd6d8b5a3d4358c3a1821dfe1d22e4d36ef17 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 14 Sep 2021 00:05:45 -0300 Subject: [PATCH 216/250] Fix incompatible animation type --- SCLAlertViewExample/ViewController/ViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCLAlertViewExample/ViewController/ViewController.m b/SCLAlertViewExample/ViewController/ViewController.m index 567938c..cdb1128 100644 --- a/SCLAlertViewExample/ViewController/ViewController.m +++ b/SCLAlertViewExample/ViewController/ViewController.m @@ -384,7 +384,7 @@ - (IBAction)showWaiting:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - alert.showAnimationType = SCLAlertViewHideAnimationSlideOutToCenter; + alert.showAnimationType = SCLAlertViewShowAnimationSlideInToCenter; alert.hideAnimationType = SCLAlertViewHideAnimationSlideOutFromCenter; alert.backgroundType = SCLAlertViewBackgroundTransparent; From 7f5ce2cb88ec5ad5440f3b96cb3b28ec3e00b06e Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 5 Apr 2022 20:56:47 -0300 Subject: [PATCH 217/250] Update CocoaPods to 1.11.3 (was 1.10.2) --- Gemfile.lock | 60 +++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ed6b39b..979d6ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,23 +1,25 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.3) - activesupport (5.2.6) + CFPropertyList (3.0.5) + rexml + activesupport (6.1.5) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) - claide (1.0.3) - cocoapods (1.10.2) - addressable (~> 2.6) + claide (1.1.0) + cocoapods (1.11.3) + addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.10.2) + cocoapods-core (= 1.11.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.4.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -28,55 +30,54 @@ GEM escape (~> 0.0.4) fourflusher (>= 2.3.0, < 3.0) gh_inspector (~> 1.0) - molinillo (~> 0.6.6) + molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (~> 1.4) - xcodeproj (>= 1.19.0, < 2.0) - cocoapods-core (1.10.2) - activesupport (> 5.0, < 6) - addressable (~> 2.6) + ruby-macho (>= 1.0, < 3.0) + xcodeproj (>= 1.21.0, < 2.0) + cocoapods-core (1.11.3) + activesupport (>= 5.0, < 7) + addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) fuzzy_match (~> 2.0.4) nap (~> 1.0) netrc (~> 0.11) - public_suffix + public_suffix (~> 4.0) typhoeus (~> 1.0) cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.4.0) + cocoapods-downloader (1.6.3) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.1) - cocoapods-trunk (1.5.0) + cocoapods-trunk (1.6.0) nap (>= 0.8, < 2.0) netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) escape (0.0.4) - ethon (0.14.0) + ethon (0.15.0) ffi (>= 1.15.0) - ffi (1.15.3) + ffi (1.15.5) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.10.0) concurrent-ruby (~> 1.0) - json (2.5.1) - minitest (5.14.4) - molinillo (0.6.6) + json (2.6.1) + minitest (5.15.0) + molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) public_suffix (4.0.6) rexml (3.2.5) - ruby-macho (1.4.0) - thread_safe (0.3.6) + ruby-macho (2.5.1) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) @@ -84,6 +85,7 @@ GEM colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) + zeitwerk (2.5.4) PLATFORMS ruby From 09cb09292a405a61f45e2d501a94b766ad9ab3b5 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 5 Apr 2022 20:59:58 -0300 Subject: [PATCH 218/250] Update Build.yml --- .github/workflows/Build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 510aeaa..1633568 100755 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -7,10 +7,10 @@ jobs: runs-on: macOS-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Xcode version - uses: maxim-lobanov/setup-xcode@v1.1 + uses: maxim-lobanov/setup-xcode@v1.41 with: - xcode-version: 12.0.0 + xcode-version: 13.2.1 - name: Building iOS app run: exec ./.github/scripts/build_app.sh From cba50880becd075632cbcc370e228772991236e5 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 5 Apr 2022 21:00:59 -0300 Subject: [PATCH 219/250] Update Build.yml --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 1633568..d89814b 100755 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -9,7 +9,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Setup Xcode version - uses: maxim-lobanov/setup-xcode@v1.41 + uses: maxim-lobanov/setup-xcode@v1.4.1 with: xcode-version: 13.2.1 - name: Building iOS app From 09245fdcc5d699269fd18af4bd0eb4d471291c66 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 5 Apr 2022 21:02:53 -0300 Subject: [PATCH 220/250] Update build_app.sh --- .github/scripts/build_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/build_app.sh b/.github/scripts/build_app.sh index 41a9d56..746dab3 100755 --- a/.github/scripts/build_app.sh +++ b/.github/scripts/build_app.sh @@ -4,5 +4,5 @@ set -eo pipefail xcodebuild -project SCLAlertView.xcodeproj \ -scheme SCLAlertView \ - -destination platform=iOS\ Simulator,OS=14.0,name=iPhone\ 11 \ + -destination platform=iOS\ Simulator,OS=15.2,name=iPhone\ 11 \ clean build | xcpretty From c4505d41a15518f4c72f5fbe5a1cd6965038ad27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Mar 2023 05:44:49 +0000 Subject: [PATCH 221/250] Bump activesupport from 6.1.5 to 6.1.7.3 Bumps [activesupport](https://github.com/rails/rails) from 6.1.5 to 6.1.7.3. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.0.4.3/activesupport/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v6.1.5...v6.1.7.3) --- updated-dependencies: - dependency-name: activesupport dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 979d6ac..b8495cb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ GEM specs: CFPropertyList (3.0.5) rexml - activesupport (6.1.5) + activesupport (6.1.7.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -54,7 +54,7 @@ GEM netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.1.10) + concurrent-ruby (1.2.2) escape (0.0.4) ethon (0.15.0) ffi (>= 1.15.0) @@ -63,10 +63,10 @@ GEM fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) json (2.6.1) - minitest (5.15.0) + minitest (5.18.0) molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) @@ -76,7 +76,7 @@ GEM ruby-macho (2.5.1) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (2.0.4) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) @@ -85,7 +85,7 @@ GEM colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) - zeitwerk (2.5.4) + zeitwerk (2.6.7) PLATFORMS ruby From adcecb29ee087e7e26cface97ff0500226e4f21e Mon Sep 17 00:00:00 2001 From: Fernando Reynoso Date: Thu, 8 Jun 2023 15:04:18 -0700 Subject: [PATCH 222/250] Add initWithWidth method for setting the width of the object. --- SCLAlertView/SCLAlertView.h | 6 ++++++ SCLAlertView/SCLAlertView.m | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 33ec029..1df8008 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -230,6 +230,12 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ @property (nonatomic) BOOL horizontalButtons; +/** Initialize SCLAlertView using specific width. + * + * Init instance + */ +- (instancetype)initWithWidth:(CGFloat)width; + /** Initialize SCLAlertView using a new window. * * Init with new window diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 20a22dc..909b907 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -96,6 +96,16 @@ - (instancetype)init return self; } +- (instancetype)initWithWidth:(CGFloat)width +{ + self = [super init]; + if (self) + { + [self setupViewWindowWidth:width]; + } + return self; +} + - (instancetype)initWithWindowWidth:(CGFloat)windowWidth { self = [super init]; From 757534a89140489a6b4df6dadb83df831d188df2 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 15 Oct 2023 10:00:47 -0300 Subject: [PATCH 223/250] Update gems --- Gemfile.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b8495cb..18ef867 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,30 +1,30 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.5) + CFPropertyList (3.0.6) rexml - activesupport (6.1.7.3) + activesupport (6.1.7.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) claide (1.1.0) - cocoapods (1.11.3) + cocoapods (1.13.0) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.11.3) + cocoapods-core (= 1.13.0) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-downloader (>= 1.6.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) @@ -32,10 +32,10 @@ GEM gh_inspector (~> 1.0) molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (>= 1.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.11.3) - activesupport (>= 5.0, < 7) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.13.0) + activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) @@ -56,36 +56,36 @@ GEM colored2 (3.1.2) concurrent-ruby (1.2.2) escape (0.0.4) - ethon (0.15.0) + ethon (0.16.0) ffi (>= 1.15.0) - ffi (1.15.5) + ffi (1.16.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) - i18n (1.12.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) - json (2.6.1) - minitest (5.18.0) + json (2.6.3) + minitest (5.20.0) molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) - public_suffix (4.0.6) - rexml (3.2.5) + public_suffix (4.0.7) + rexml (3.2.6) ruby-macho (2.5.1) typhoeus (1.4.0) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.21.0) + xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) - zeitwerk (2.6.7) + zeitwerk (2.6.12) PLATFORMS ruby From 7d46070721870b91dcbe4b46b0ef961cec62038f Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 19 Dec 2023 21:04:04 -0300 Subject: [PATCH 224/250] Update Ruby to 3.1.2 (was 2.6.5) Update CocoaPods to 1.14.3 (was 1.13.0) --- .tool-versions | 1 + Gemfile | 4 ++-- Gemfile.lock | 38 ++++++++++++++++++++++++-------------- 3 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..0b2d858 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.1.2 diff --git a/Gemfile b/Gemfile index 2096226..5bc1f49 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ # frozen_string_literal: true - source "https://rubygems.org" -ruby "2.6.5" + +ruby "3.1.2" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } diff --git a/Gemfile.lock b/Gemfile.lock index 18ef867..b87ed7b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,25 +3,31 @@ GEM specs: CFPropertyList (3.0.6) rexml - activesupport (6.1.7.6) + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) + base64 (0.2.0) + bigdecimal (3.1.5) claide (1.1.0) - cocoapods (1.13.0) + cocoapods (1.14.3) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.13.0) + cocoapods-core (= 1.14.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.6.0, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-trunk (>= 1.6.0, < 2.0) @@ -34,7 +40,7 @@ GEM nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.13.0) + cocoapods-core (1.14.3) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -45,7 +51,7 @@ GEM public_suffix (~> 4.0) typhoeus (~> 1.0) cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.6.3) + cocoapods-downloader (2.1) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.1) @@ -55,6 +61,9 @@ GEM cocoapods-try (1.2.0) colored2 (3.1.2) concurrent-ruby (1.2.2) + connection_pool (2.4.1) + drb (2.2.0) + ruby2_keywords escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) @@ -65,16 +74,18 @@ GEM httpclient (2.8.3) i18n (1.14.1) concurrent-ruby (~> 1.0) - json (2.6.3) + json (2.7.1) minitest (5.20.0) molinillo (0.8.0) + mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) public_suffix (4.0.7) rexml (3.2.6) ruby-macho (2.5.1) - typhoeus (1.4.0) + ruby2_keywords (0.0.5) + typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -85,16 +96,15 @@ GEM colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) - zeitwerk (2.6.12) PLATFORMS - ruby + x86_64-darwin-23 DEPENDENCIES cocoapods RUBY VERSION - ruby 2.6.5p114 + ruby 3.1.2p20 BUNDLED WITH - 2.1.4 + 2.3.7 From f73760811dc3ead001e7ae15a28963b3d6e51175 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 19 Dec 2023 21:05:52 -0300 Subject: [PATCH 225/250] Bump version to 1.3.0 --- 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 cfb5881..5e2f0a3 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 = "1.2.0" + spec.version = "1.3.0" 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" From ba55241ac70ab8cc949ea3a1da4a992c7f144693 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 19 Dec 2023 21:26:34 -0300 Subject: [PATCH 226/250] Update LICENSE --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index cb4203d..740d024 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2014 SCLAlertView-Objective-C by Diogo Autilio +Copyright (c) 2013-2023 SCLAlertView-Objective-C by Diogo Autilio Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. From 550686b31fd2a640ecec9ab883ff11677cf1efa4 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Wed, 20 Dec 2023 09:23:59 -0300 Subject: [PATCH 227/250] Update changelog --- CHANGELOG.md | 159 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 147 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2022b3b..9f668f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,79 @@ -# Change Log +# Changelog + +## [1.3.0](https://github.com/dogo/SCLAlertView/tree/1.3.0) (2023-12-20) + +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.2.0...1.3.0) + +**Closed issues:** + +- Android system can use it even better [\#307](https://github.com/dogo/SCLAlertView/issues/307) +- showCustom 的时候如何自定义 closeButton样式 [\#302](https://github.com/dogo/SCLAlertView/issues/302) +- Cannot find ChangesLog for version 1.2.0 [\#299](https://github.com/dogo/SCLAlertView/issues/299) +- Is this an SCLAlertView bug, or an Apple bug? [\#296](https://github.com/dogo/SCLAlertView/issues/296) +- SCLAlertView \*alert = \[\[SCLAlertView alloc\] initWithNewWindowWidth:300.0f\]; self.username = @"zaxo"; self.password = @"pass"; UITextField \*usernameTextField = \[alert addTextField:@"username"\]; UITextField \*passwordTextField = \[alert addTextField:@"password"\]; passwordTextField.secureTextEntry = YES; \[alert addButton:@"Login" actionBlock: ^\(void\){ BOOL isUsersEqual = \[self.username isEqualToString:\[self.usernameTextField text\]\]; BOOL isPasswordsEqual = \[self.password isEqualToString:\[self.passwordTextField text\]\]; if\(isUsersEqual && isPasswordsEqual\){ NSLog\(@"Successful"\); } else { NSLog\(@"frailer"\); } @@@@@@@@ Why I can't compile it I even have set the @Property \(nonatomic, strong\) NSString \*username; in SCLALertView.m but I still errors do im doing anthing please can you help Tweak.xm:350:1: error: use of undeclared identifier 'self' self.username = @"zaxo"; [\#293](https://github.com/dogo/SCLAlertView/issues/293) + +**Merged pull requests:** + +- Add initWithWidth method for setting the width of the object. [\#310](https://github.com/dogo/SCLAlertView/pull/310) ([FernandoReynoso](https://github.com/FernandoReynoso)) +- Bump activesupport from 6.1.5 to 6.1.7.3 [\#308](https://github.com/dogo/SCLAlertView/pull/308) ([dependabot[bot]](https://github.com/apps/dependabot)) +- default value for a textfield [\#295](https://github.com/dogo/SCLAlertView/pull/295) ([syto203](https://github.com/syto203)) + +## [1.2.0](https://github.com/dogo/SCLAlertView/tree/1.2.0) (2020-10-31) + +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.6...1.2.0) + +**Closed issues:** + +- alertView with textfield moves up twice\(too much\) when textfield become first responder and the keyboard shows [\#291](https://github.com/dogo/SCLAlertView/issues/291) +- 设置富文本后不居中显示了 变成了居左。 [\#288](https://github.com/dogo/SCLAlertView/issues/288) +- Good day, as you can implement the verification key which is located on the website .txt document? Roughly speaking to make check on a key if the key is correct, then there is a start. [\#286](https://github.com/dogo/SCLAlertView/issues/286) +- How to hidden top image with OC? [\#285](https://github.com/dogo/SCLAlertView/issues/285) + +**Merged pull requests:** + +- Fix: break a strong reference cycle [\#290](https://github.com/dogo/SCLAlertView/pull/290) ([kingste](https://github.com/kingste)) +- Merge [\#279](https://github.com/dogo/SCLAlertView/pull/279) ([dogo](https://github.com/dogo)) +- Add Stale config [\#275](https://github.com/dogo/SCLAlertView/pull/275) ([dogo](https://github.com/dogo)) + +## [1.1.6](https://github.com/dogo/SCLAlertView/tree/1.1.6) (2018-10-14) + +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.5...1.1.6) + +**Implemented enhancements:** + +- ButtonTimer: Enable button once timer elapsed [\#181](https://github.com/dogo/SCLAlertView/issues/181) + +**Fixed bugs:** + +- UIStatusBarStyle always appears as 'UIStatusBarStyleDefault' [\#274](https://github.com/dogo/SCLAlertView/issues/274) +- Alert view height problem when using it with long text in body [\#127](https://github.com/dogo/SCLAlertView/issues/127) + +**Closed issues:** + +- handleNavigationTransition Bug [\#276](https://github.com/dogo/SCLAlertView/issues/276) +- Could you release fixed version? [\#273](https://github.com/dogo/SCLAlertView/issues/273) +- Accessibility: implement - \(BOOL\)accessibilityPerformEscape [\#271](https://github.com/dogo/SCLAlertView/issues/271) +- How to solve the problem of overlapping multiple calls in a controller?(如何解决在一个控制器中,连续多次调用,会出现重叠的情况?) [\#267](https://github.com/dogo/SCLAlertView/issues/267) +- TextView height problem when text entered with the long body \(it need to expend it's height \) [\#258](https://github.com/dogo/SCLAlertView/issues/258) +- i need to add on the preloaded text in the text field before textfield Alert pop up [\#254](https://github.com/dogo/SCLAlertView/issues/254) +- Problem in increasing height of TextField & customize the Alert view colour & image & button [\#253](https://github.com/dogo/SCLAlertView/issues/253) +- Custom TextField not adding Keyboard Observers [\#250](https://github.com/dogo/SCLAlertView/issues/250) +- Portrait or Landscape fixed [\#201](https://github.com/dogo/SCLAlertView/issues/201) +- \[Bug\] when changing keyboard... [\#200](https://github.com/dogo/SCLAlertView/issues/200) +- If new alert is displayed before 1st waiting alert is closed by duration, then 1st alert will never automatically close [\#178](https://github.com/dogo/SCLAlertView/issues/178) +- Add support to show only one alert view at the same time. [\#141](https://github.com/dogo/SCLAlertView/issues/141) +- UITextField Return/Done Action \(UIControlEventEditingDidEndOnExit\) [\#123](https://github.com/dogo/SCLAlertView/issues/123) + +## [1.1.5](https://github.com/dogo/SCLAlertView/tree/1.1.5) (2018-06-22) + +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.4...1.1.5) + +**Merged pull requests:** + +- core: base builder with fluent has been added. [\#272](https://github.com/dogo/SCLAlertView/pull/272) ([lolgear](https://github.com/lolgear)) ## [1.1.4](https://github.com/dogo/SCLAlertView/tree/1.1.4) (2018-06-19) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.3...1.1.4) **Closed issues:** @@ -19,6 +92,7 @@ - Create CODE\_OF\_CONDUCT.md [\#264](https://github.com/dogo/SCLAlertView/pull/264) ([dogo](https://github.com/dogo)) ## [1.1.3](https://github.com/dogo/SCLAlertView/tree/1.1.3) (2018-01-17) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.2...1.1.3) **Fixed bugs:** @@ -43,6 +117,7 @@ - clerical error [\#249](https://github.com/dogo/SCLAlertView/pull/249) ([amisare](https://github.com/amisare)) ## [1.1.2](https://github.com/dogo/SCLAlertView/tree/1.1.2) (2017-04-11) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.1...1.1.2) **Closed issues:** @@ -56,6 +131,7 @@ - Command failed due to signal: Segmentation fault: 11 swift 3 [\#221](https://github.com/dogo/SCLAlertView/issues/221) ## [1.1.1](https://github.com/dogo/SCLAlertView/tree/1.1.1) (2017-02-16) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.1.0...1.1.1) **Closed issues:** @@ -72,6 +148,7 @@ - Dismiss Animation Completion Block [\#239](https://github.com/dogo/SCLAlertView/pull/239) ([hydr93](https://github.com/hydr93)) ## [1.1.0](https://github.com/dogo/SCLAlertView/tree/1.1.0) (2016-12-07) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.6...1.1.0) **Closed issues:** @@ -83,11 +160,12 @@ **Merged pull requests:** -- Add button custom font support when use buttonConfig block [\#232](https://github.com/dogo/SCLAlertView/pull/232) ([marcoslacerda](https://github.com/marcoslacerda)) +- Add button custom font support when use buttonConfig block [\#232](https://github.com/dogo/SCLAlertView/pull/232) ([maclacerda](https://github.com/maclacerda)) - fix the bug: dismiss SCLAlertViewHideAnimationSimplyDisappear hideAni… [\#230](https://github.com/dogo/SCLAlertView/pull/230) ([JoakimLiu](https://github.com/JoakimLiu)) - Change auto-capitalisation to sentence only [\#229](https://github.com/dogo/SCLAlertView/pull/229) ([idrougge](https://github.com/idrougge)) ## [1.0.6](https://github.com/dogo/SCLAlertView/tree/1.0.6) (2016-10-27) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.5...1.0.6) **Fixed bugs:** @@ -112,6 +190,7 @@ - Changed constants names to avoid name collision [\#224](https://github.com/dogo/SCLAlertView/pull/224) ([damarte](https://github.com/damarte)) ## [1.0.5](https://github.com/dogo/SCLAlertView/tree/1.0.5) (2016-09-13) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.4...1.0.5) **Closed issues:** @@ -123,11 +202,12 @@ **Merged pull requests:** -- Add umbrella header to exclude warnings during framework building [\#220](https://github.com/dogo/SCLAlertView/pull/220) ([alokard](https://github.com/alokard)) -- Add Carthage support [\#210](https://github.com/dogo/SCLAlertView/pull/210) ([alokard](https://github.com/alokard)) +- Add umbrella header to exclude warnings during framework building [\#220](https://github.com/dogo/SCLAlertView/pull/220) ([goncharik](https://github.com/goncharik)) +- Add Carthage support [\#210](https://github.com/dogo/SCLAlertView/pull/210) ([goncharik](https://github.com/goncharik)) - docs: nativescript integration mention [\#209](https://github.com/dogo/SCLAlertView/pull/209) ([NathanWalker](https://github.com/NathanWalker)) ## [1.0.4](https://github.com/dogo/SCLAlertView/tree/1.0.4) (2016-06-21) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.3...1.0.4) **Closed issues:** @@ -137,6 +217,7 @@ - ShowWaiting timer error [\#202](https://github.com/dogo/SCLAlertView/issues/202) ## [1.0.3](https://github.com/dogo/SCLAlertView/tree/1.0.3) (2016-05-03) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.2...1.0.3) **Closed issues:** @@ -151,12 +232,15 @@ - Adds show/hide AnimationTypes 'SimplyAppear' and 'SimplyDisappear' i.e., 'None' [\#198](https://github.com/dogo/SCLAlertView/pull/198) ([AmitaiB](https://github.com/AmitaiB)) ## [1.0.2](https://github.com/dogo/SCLAlertView/tree/1.0.2) (2016-03-16) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.1...1.0.2) ## [1.0.1](https://github.com/dogo/SCLAlertView/tree/1.0.1) (2016-03-08) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/1.0.0...1.0.1) ## [1.0.0](https://github.com/dogo/SCLAlertView/tree/1.0.0) (2016-03-07) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.9.3...1.0.0) **Closed issues:** @@ -174,6 +258,7 @@ - Fluent style support [\#189](https://github.com/dogo/SCLAlertView/pull/189) ([lolgear](https://github.com/lolgear)) ## [0.9.3](https://github.com/dogo/SCLAlertView/tree/0.9.3) (2016-03-03) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.9.2...0.9.3) **Implemented enhancements:** @@ -181,6 +266,7 @@ - Add bounce animation to all slides [\#116](https://github.com/dogo/SCLAlertView/issues/116) ## [0.9.2](https://github.com/dogo/SCLAlertView/tree/0.9.2) (2016-03-03) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.9.1...0.9.2) **Closed issues:** @@ -188,9 +274,11 @@ - Vertical spacing broken on 0.9.0 [\#183](https://github.com/dogo/SCLAlertView/issues/183) ## [0.9.1](https://github.com/dogo/SCLAlertView/tree/0.9.1) (2016-02-15) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.9.0...0.9.1) ## [0.9.0](https://github.com/dogo/SCLAlertView/tree/0.9.0) (2016-02-10) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.8.2...0.9.0) **Implemented enhancements:** @@ -212,6 +300,7 @@ - Change play sound class [\#171](https://github.com/dogo/SCLAlertView/pull/171) ([Liqiankun](https://github.com/Liqiankun)) ## [0.8.2](https://github.com/dogo/SCLAlertView/tree/0.8.2) (2016-01-22) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.8.1...0.8.2) **Closed issues:** @@ -219,6 +308,7 @@ - Memory leak using new window way to display [\#142](https://github.com/dogo/SCLAlertView/issues/142) ## [0.8.1](https://github.com/dogo/SCLAlertView/tree/0.8.1) (2016-01-21) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.8.0...0.8.1) **Fixed bugs:** @@ -232,6 +322,7 @@ - Multitasking Split Screen Bug [\#158](https://github.com/dogo/SCLAlertView/issues/158) ## [0.8.0](https://github.com/dogo/SCLAlertView/tree/0.8.0) (2015-12-29) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.9...0.8.0) **Fixed bugs:** @@ -255,9 +346,9 @@ - Develop [\#163](https://github.com/dogo/SCLAlertView/pull/163) ([jusefjames](https://github.com/jusefjames)) - Prevent viewText scrollable [\#154](https://github.com/dogo/SCLAlertView/pull/154) ([AzulesM](https://github.com/AzulesM)) - Fixing centering problem when used in iPad split view [\#153](https://github.com/dogo/SCLAlertView/pull/153) ([abbasmousavi](https://github.com/abbasmousavi)) -- To get the correct subtitle height [\#152](https://github.com/dogo/SCLAlertView/pull/152) ([AzulesM](https://github.com/AzulesM)) ## [0.7.9](https://github.com/dogo/SCLAlertView/tree/0.7.9) (2015-10-20) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.7...0.7.9) **Fixed bugs:** @@ -275,6 +366,7 @@ - Namespace SCLActionTypes to avoid conflicts [\#144](https://github.com/dogo/SCLAlertView/pull/144) ([mbelkin](https://github.com/mbelkin)) ## [0.7.7](https://github.com/dogo/SCLAlertView/tree/0.7.7) (2015-09-17) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.6...0.7.7) **Closed issues:** @@ -284,9 +376,11 @@ - Modules enabled but still getting disabled error [\#136](https://github.com/dogo/SCLAlertView/issues/136) ## [0.7.6](https://github.com/dogo/SCLAlertView/tree/0.7.6) (2015-09-15) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.5...0.7.6) ## [0.7.5](https://github.com/dogo/SCLAlertView/tree/0.7.5) (2015-09-02) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.4...0.7.5) **Closed issues:** @@ -299,6 +393,7 @@ - Dynamically set button height to allow for multiple lines of text. [\#139](https://github.com/dogo/SCLAlertView/pull/139) ([yatryan](https://github.com/yatryan)) ## [0.7.4](https://github.com/dogo/SCLAlertView/tree/0.7.4) (2015-07-29) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.3...0.7.4) **Closed issues:** @@ -321,6 +416,7 @@ - fix bug [\#134](https://github.com/dogo/SCLAlertView/pull/134) ([HuylensHu](https://github.com/HuylensHu)) ## [0.7.3](https://github.com/dogo/SCLAlertView/tree/0.7.3) (2015-06-10) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.2...0.7.3) **Closed issues:** @@ -328,6 +424,7 @@ - check TextField.text is empty. [\#122](https://github.com/dogo/SCLAlertView/issues/122) ## [0.7.2](https://github.com/dogo/SCLAlertView/tree/0.7.2) (2015-05-29) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.1...0.7.2) **Fixed bugs:** @@ -347,6 +444,7 @@ - If defaultBackgroundColor is preconfigured for button its not changed to... [\#109](https://github.com/dogo/SCLAlertView/pull/109) ([alex1704](https://github.com/alex1704)) ## [0.7.1](https://github.com/dogo/SCLAlertView/tree/0.7.1) (2015-05-04) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.7.0...0.7.1) **Fixed bugs:** @@ -368,6 +466,7 @@ - ignore depreceted inside SCLAlertView [\#103](https://github.com/dogo/SCLAlertView/pull/103) ([jcavar](https://github.com/jcavar)) ## [0.7.0](https://github.com/dogo/SCLAlertView/tree/0.7.0) (2015-04-01) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.6.1...0.7.0) **Fixed bugs:** @@ -385,25 +484,26 @@ - fix screen stutter glitch with blur background [\#96](https://github.com/dogo/SCLAlertView/pull/96) ([felix-dumit](https://github.com/felix-dumit)) - Fixes a bug where you could not set Font attributes on the attributed st... [\#88](https://github.com/dogo/SCLAlertView/pull/88) ([n1mda](https://github.com/n1mda)) +- Automatically add a borderWidth to the button if borderColor is defined [\#85](https://github.com/dogo/SCLAlertView/pull/85) ([jeremygrenier](https://github.com/jeremygrenier)) ## [0.6.1](https://github.com/dogo/SCLAlertView/tree/0.6.1) (2015-03-23) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.6.0...0.6.1) ## [0.6.0](https://github.com/dogo/SCLAlertView/tree/0.6.0) (2015-03-22) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.9...0.6.0) **Closed issues:** - new alert flick [\#83](https://github.com/dogo/SCLAlertView/issues/83) -**Merged pull requests:** - -- Automatically add a borderWidth to the button if borderColor is defined [\#85](https://github.com/dogo/SCLAlertView/pull/85) ([jeremygrenier](https://github.com/jeremygrenier)) - ## [0.5.9](https://github.com/dogo/SCLAlertView/tree/0.5.9) (2015-03-18) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.8...0.5.9) ## [0.5.8](https://github.com/dogo/SCLAlertView/tree/0.5.8) (2015-03-17) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.7...0.5.8) **Implemented enhancements:** @@ -411,6 +511,7 @@ - Custom button height feature request [\#71](https://github.com/dogo/SCLAlertView/issues/71) ## [0.5.7](https://github.com/dogo/SCLAlertView/tree/0.5.7) (2015-03-16) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.6...0.5.7) **Closed issues:** @@ -420,6 +521,7 @@ - BOOL visibility of alert needed [\#73](https://github.com/dogo/SCLAlertView/issues/73) ## [0.5.6](https://github.com/dogo/SCLAlertView/tree/0.5.6) (2015-03-05) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.5...0.5.6) **Fixed bugs:** @@ -427,6 +529,7 @@ - Latest Version Fails To Build [\#74](https://github.com/dogo/SCLAlertView/issues/74) ## [0.5.5](https://github.com/dogo/SCLAlertView/tree/0.5.5) (2015-02-22) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.4...0.5.5) **Closed issues:** @@ -438,6 +541,7 @@ - Minor icon and button customization fixes [\#70](https://github.com/dogo/SCLAlertView/pull/70) ([wzs](https://github.com/wzs)) ## [0.5.4](https://github.com/dogo/SCLAlertView/tree/0.5.4) (2015-02-13) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.3...0.5.4) **Implemented enhancements:** @@ -450,11 +554,10 @@ **Fixed bugs:** -- AlertView does not disable Interactive Pop Gesture [\#66](https://github.com/dogo/SCLAlertView/issues/66) -- Blur background is wrong when shown from "UIModalPresentationFormSheet" [\#65](https://github.com/dogo/SCLAlertView/issues/65) - The white background view is too long [\#53](https://github.com/dogo/SCLAlertView/issues/53) ## [0.5.3](https://github.com/dogo/SCLAlertView/tree/0.5.3) (2015-02-02) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.2...0.5.3) **Fixed bugs:** @@ -466,6 +569,7 @@ - textarea in alert [\#61](https://github.com/dogo/SCLAlertView/issues/61) ## [0.5.2](https://github.com/dogo/SCLAlertView/tree/0.5.2) (2015-01-27) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.1...0.5.2) **Implemented enhancements:** @@ -477,6 +581,7 @@ - ability to only show one alert [\#56](https://github.com/dogo/SCLAlertView/issues/56) ## [0.5.1](https://github.com/dogo/SCLAlertView/tree/0.5.1) (2015-01-26) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.5.0...0.5.1) **Implemented enhancements:** @@ -493,6 +598,7 @@ - Rotating with keyboard [\#36](https://github.com/dogo/SCLAlertView/issues/36) ## [0.5.0](https://github.com/dogo/SCLAlertView/tree/0.5.0) (2015-01-21) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.4.3...0.5.0) **Fixed bugs:** @@ -500,6 +606,7 @@ - Display in formsheet [\#50](https://github.com/dogo/SCLAlertView/issues/50) ## [0.4.3](https://github.com/dogo/SCLAlertView/tree/0.4.3) (2015-01-20) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.4.2...0.4.3) **Closed issues:** @@ -507,6 +614,7 @@ - Change Title Size [\#42](https://github.com/dogo/SCLAlertView/issues/42) ## [0.4.2](https://github.com/dogo/SCLAlertView/tree/0.4.2) (2015-01-20) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.4.1...0.4.2) **Closed issues:** @@ -515,6 +623,7 @@ - does not work with UIPIckview [\#26](https://github.com/dogo/SCLAlertView/issues/26) ## [0.4.1](https://github.com/dogo/SCLAlertView/tree/0.4.1) (2015-01-19) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.4.0...0.4.1) **Closed issues:** @@ -523,6 +632,7 @@ - Landscape not working on iPad [\#48](https://github.com/dogo/SCLAlertView/issues/48) ## [0.4.0](https://github.com/dogo/SCLAlertView/tree/0.4.0) (2015-01-19) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.9...0.4.0) **Fixed bugs:** @@ -539,9 +649,11 @@ - fix \#44 [\#47](https://github.com/dogo/SCLAlertView/pull/47) ([portwatcher](https://github.com/portwatcher)) ## [0.3.9](https://github.com/dogo/SCLAlertView/tree/0.3.9) (2015-01-15) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.8...0.3.9) ## [0.3.8](https://github.com/dogo/SCLAlertView/tree/0.3.8) (2015-01-12) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.7...0.3.8) **Implemented enhancements:** @@ -553,6 +665,7 @@ - alertview position issue [\#39](https://github.com/dogo/SCLAlertView/issues/39) ## [0.3.7](https://github.com/dogo/SCLAlertView/tree/0.3.7) (2014-12-13) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.6...0.3.7) **Closed issues:** @@ -566,6 +679,7 @@ - Subtitle Height Setting [\#34](https://github.com/dogo/SCLAlertView/pull/34) ([ancloid](https://github.com/ancloid)) ## [0.3.6](https://github.com/dogo/SCLAlertView/tree/0.3.6) (2014-12-09) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.5...0.3.6) **Closed issues:** @@ -579,6 +693,7 @@ - modified podspec file to support iOS6 [\#33](https://github.com/dogo/SCLAlertView/pull/33) ([shannonchou](https://github.com/shannonchou)) ## [0.3.5](https://github.com/dogo/SCLAlertView/tree/0.3.5) (2014-11-28) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.4...0.3.5) **Implemented enhancements:** @@ -591,6 +706,7 @@ - EXC\_BAD\_ACCESS \(code=1\) [\#28](https://github.com/dogo/SCLAlertView/issues/28) ## [0.3.4](https://github.com/dogo/SCLAlertView/tree/0.3.4) (2014-11-14) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.3...0.3.4) **Closed issues:** @@ -598,9 +714,11 @@ - Any way to show this from a UIView? [\#11](https://github.com/dogo/SCLAlertView/issues/11) ## [0.3.3](https://github.com/dogo/SCLAlertView/tree/0.3.3) (2014-11-11) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.2...0.3.3) ## [0.3.2](https://github.com/dogo/SCLAlertView/tree/0.3.2) (2014-11-05) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.1...0.3.2) **Fixed bugs:** @@ -612,9 +730,11 @@ - Any of the showAnimationType not working [\#22](https://github.com/dogo/SCLAlertView/issues/22) ## [0.3.1](https://github.com/dogo/SCLAlertView/tree/0.3.1) (2014-11-04) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.3.0...0.3.1) ## [0.3.0](https://github.com/dogo/SCLAlertView/tree/0.3.0) (2014-11-04) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.6...0.3.0) **Implemented enhancements:** @@ -638,18 +758,23 @@ - fix showAnimation bug [\#19](https://github.com/dogo/SCLAlertView/pull/19) ([sanshanchuns](https://github.com/sanshanchuns)) ## [0.2.6](https://github.com/dogo/SCLAlertView/tree/0.2.6) (2014-10-23) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.5...0.2.6) ## [0.2.5](https://github.com/dogo/SCLAlertView/tree/0.2.5) (2014-10-23) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.4...0.2.5) ## [0.2.4](https://github.com/dogo/SCLAlertView/tree/0.2.4) (2014-10-22) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.3...0.2.4) ## [0.2.3](https://github.com/dogo/SCLAlertView/tree/0.2.3) (2014-10-21) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.2...0.2.3) ## [0.2.2](https://github.com/dogo/SCLAlertView/tree/0.2.2) (2014-10-21) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.1...0.2.2) **Implemented enhancements:** @@ -657,6 +782,7 @@ - is possible button show touch down or touch up display? [\#10](https://github.com/dogo/SCLAlertView/issues/10) ## [0.2.1](https://github.com/dogo/SCLAlertView/tree/0.2.1) (2014-10-20) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.2.0...0.2.1) **Closed issues:** @@ -669,6 +795,7 @@ - Add validation block [\#9](https://github.com/dogo/SCLAlertView/pull/9) ([mamaral](https://github.com/mamaral)) ## [0.2.0](https://github.com/dogo/SCLAlertView/tree/0.2.0) (2014-10-18) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.1.2...0.2.0) **Implemented enhancements:** @@ -682,6 +809,7 @@ - Custom icon and color [\#6](https://github.com/dogo/SCLAlertView/pull/6) ([mamaral](https://github.com/mamaral)) ## [0.1.2](https://github.com/dogo/SCLAlertView/tree/0.1.2) (2014-10-13) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.1.1...0.1.2) **Closed issues:** @@ -690,18 +818,25 @@ - Issues with a side menu controller [\#1](https://github.com/dogo/SCLAlertView/issues/1) ## [0.1.1](https://github.com/dogo/SCLAlertView/tree/0.1.1) (2014-10-09) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.1.0...0.1.1) ## [0.1.0](https://github.com/dogo/SCLAlertView/tree/0.1.0) (2014-10-08) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.0.3...0.1.0) ## [0.0.3](https://github.com/dogo/SCLAlertView/tree/0.0.3) (2014-10-03) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.0.2...0.0.3) ## [0.0.2](https://github.com/dogo/SCLAlertView/tree/0.0.2) (2014-09-29) + [Full Changelog](https://github.com/dogo/SCLAlertView/compare/0.0.1...0.0.2) ## [0.0.1](https://github.com/dogo/SCLAlertView/tree/0.0.1) (2014-09-29) +[Full Changelog](https://github.com/dogo/SCLAlertView/compare/49477fbc62f611ec0dd04590afa3d29972b60d22...0.0.1) + + -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* From ba85bbad0d1a828fb19f32897f40bcbe24d48d8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 21:48:17 +0000 Subject: [PATCH 228/250] Bump rexml from 3.2.6 to 3.2.8 Bumps [rexml](https://github.com/ruby/rexml) from 3.2.6 to 3.2.8. - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](https://github.com/ruby/rexml/compare/v3.2.6...v3.2.8) --- updated-dependencies: - dependency-name: rexml dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b87ed7b..4b57bda 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,9 +82,11 @@ GEM nap (1.1.0) netrc (0.11.0) public_suffix (4.0.7) - rexml (3.2.6) + rexml (3.2.8) + strscan (>= 3.0.9) ruby-macho (2.5.1) ruby2_keywords (0.0.5) + strscan (3.1.0) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) @@ -99,6 +101,7 @@ GEM PLATFORMS x86_64-darwin-23 + x86_64-linux DEPENDENCIES cocoapods From 5e7e2e897e091011ffec32cc83d948c512e79e11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:28:21 +0000 Subject: [PATCH 229/250] Bump rexml from 3.2.8 to 3.3.9 Bumps [rexml](https://github.com/ruby/rexml) from 3.2.8 to 3.3.9. - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](https://github.com/ruby/rexml/compare/v3.2.8...v3.3.9) --- updated-dependencies: - dependency-name: rexml dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4b57bda..573df91 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,22 +82,20 @@ GEM nap (1.1.0) netrc (0.11.0) public_suffix (4.0.7) - rexml (3.2.8) - strscan (>= 3.0.9) + rexml (3.3.9) ruby-macho (2.5.1) ruby2_keywords (0.0.5) - strscan (3.1.0) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.23.0) + xcodeproj (1.25.1) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) - rexml (~> 3.2.4) + rexml (>= 3.3.6, < 4.0) PLATFORMS x86_64-darwin-23 From 8d24b4263771792fce872e61b3b768bce250d7a3 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 15 Apr 2025 12:15:23 +0000 Subject: [PATCH 230/250] Update Build.yml --- .github/workflows/Build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index d89814b..d55e0a1 100755 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -4,13 +4,13 @@ on: [push, pull_request] jobs: build: name: Building SCLAlertView - runs-on: macOS-latest + runs-on: macos-13 steps: - name: Checkout repository uses: actions/checkout@v3 - name: Setup Xcode version - uses: maxim-lobanov/setup-xcode@v1.4.1 + uses: maxim-lobanov/setup-xcode@v1.6.0 with: - xcode-version: 13.2.1 + xcode-version: 15.0.1 - name: Building iOS app run: exec ./.github/scripts/build_app.sh From 4e9a4a7d52fa16c22ced8e55d6f93c135b2260f3 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 15 Apr 2025 12:17:26 +0000 Subject: [PATCH 231/250] Update build_app.sh --- .github/scripts/build_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/build_app.sh b/.github/scripts/build_app.sh index 746dab3..14ce85d 100755 --- a/.github/scripts/build_app.sh +++ b/.github/scripts/build_app.sh @@ -4,5 +4,5 @@ set -eo pipefail xcodebuild -project SCLAlertView.xcodeproj \ -scheme SCLAlertView \ - -destination platform=iOS\ Simulator,OS=15.2,name=iPhone\ 11 \ + -destination platform=iOS\ Simulator,OS=17.2,name=iPhone\ 15 \ clean build | xcpretty From 5f7ef783fcb845606800bf8da40269d611451734 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 15 Apr 2025 12:19:09 +0000 Subject: [PATCH 232/250] Update .ruby-version --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index 57cf282..ef538c2 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.5 +3.1.2 From 67a329c750e2b5194afc524234d947b5fd776997 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 18:39:47 +0000 Subject: [PATCH 233/250] Bump rexml from 3.3.9 to 3.4.2 Bumps [rexml](https://github.com/ruby/rexml) from 3.3.9 to 3.4.2. - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](https://github.com/ruby/rexml/compare/v3.3.9...v3.4.2) --- updated-dependencies: - dependency-name: rexml dependency-version: 3.4.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 573df91..a088a51 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,7 +82,7 @@ GEM nap (1.1.0) netrc (0.11.0) public_suffix (4.0.7) - rexml (3.3.9) + rexml (3.4.2) ruby-macho (2.5.1) ruby2_keywords (0.0.5) typhoeus (1.4.1) From eb527918a825eb7b93ff89132b1079ad74c43cef Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 7 Oct 2025 10:02:19 -0300 Subject: [PATCH 234/250] Update CocoaPods to 1.16.2 (was 1.14.3) --- Gemfile.lock | 70 ++++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a088a51..fe58e35 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,31 +1,36 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.6) + CFPropertyList (3.0.7) + base64 + nkf rexml - activesupport (7.1.2) + activesupport (7.2.2.2) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) - base64 (0.2.0) - bigdecimal (3.1.5) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.3.0) claide (1.1.0) - cocoapods (1.14.3) + cocoapods (1.16.2) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.14.3) + cocoapods-core (= 1.16.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -39,8 +44,8 @@ GEM molinillo (~> 0.8.0) nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.14.3) + xcodeproj (>= 1.27.0, < 2.0) + cocoapods-core (1.16.2) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -60,46 +65,47 @@ GEM netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.2.2) - connection_pool (2.4.1) - drb (2.2.0) - ruby2_keywords + concurrent-ruby (1.3.5) + connection_pool (2.5.4) + drb (2.2.3) escape (0.0.4) - ethon (0.16.0) + ethon (0.15.0) ffi (>= 1.15.0) - ffi (1.16.3) + ffi (1.17.2-x86_64-darwin) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - httpclient (2.8.3) - i18n (1.14.1) + httpclient (2.9.0) + mutex_m + i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.7.1) - minitest (5.20.0) + json (2.15.1) + logger (1.7.0) + minitest (5.25.5) molinillo (0.8.0) - mutex_m (0.2.0) - nanaimo (0.3.0) + mutex_m (0.3.0) + nanaimo (0.4.0) nap (1.1.0) netrc (0.11.0) + nkf (0.2.0) public_suffix (4.0.7) - rexml (3.4.2) + rexml (3.4.4) ruby-macho (2.5.1) - ruby2_keywords (0.0.5) - typhoeus (1.4.1) - ethon (>= 0.9.0) + securerandom (0.4.1) + typhoeus (1.5.0) + ethon (>= 0.9.0, < 0.16.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.25.1) + xcodeproj (1.27.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) - nanaimo (~> 0.3.0) + nanaimo (~> 0.4.0) rexml (>= 3.3.6, < 4.0) PLATFORMS x86_64-darwin-23 - x86_64-linux DEPENDENCIES cocoapods From 788e0b859ef6ff44e0be4c3c7acec7e6d69495f0 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 7 Oct 2025 10:50:34 -0300 Subject: [PATCH 235/250] feat(alert): improve background blur capture for iOS 13+ scenes and iOS 26 safety Added SCLAlertView+WindowResolver category to resolve the active window via UIScene, replacing deprecated keyWindow. Updated makeBlurBackground to use new resolver and call layoutIfNeeded before snapshot. Replaced legacy snapshot code with UIGraphicsImageRenderer to prevent CGBitmapContext size={0,0} crash on iOS 26. --- SCLAlertView.xcodeproj/project.pbxproj | 26 ++++++++---- SCLAlertView/SCLAlertView+WindowResolver.h | 24 +++++++++++ SCLAlertView/SCLAlertView+WindowResolver.m | 45 ++++++++++++++++++++ SCLAlertView/SCLAlertView.m | 32 ++++++++++---- SCLAlertView/UIImage+ImageEffects.m | 49 ++++++++++++++++------ 5 files changed, 147 insertions(+), 29 deletions(-) create mode 100644 SCLAlertView/SCLAlertView+WindowResolver.h create mode 100644 SCLAlertView/SCLAlertView+WindowResolver.m diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index 1d41bc0..cc28820 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -21,6 +21,9 @@ DD2E172A19FA84B800CBAEC3 /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */; }; DD4B77E41D8C580B00CF97C7 /* SCLAlertViewFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 44E430DB1D889255002FE849 /* SCLAlertViewFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; DD4BA9C119DED8EF008D73EB /* right_answer.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */; }; + DD5F3E112E954CB700E91C60 /* SCLAlertView+WindowResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = DD5F3E102E954CB400E91C60 /* SCLAlertView+WindowResolver.h */; }; + DD5F3E132E954D3100E91C60 /* SCLAlertView+WindowResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = DD5F3E122E954D2F00E91C60 /* SCLAlertView+WindowResolver.m */; }; + DD5F3E142E954D3100E91C60 /* SCLAlertView+WindowResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = DD5F3E122E954D2F00E91C60 /* SCLAlertView+WindowResolver.m */; }; DD7282B919D6087C00077F54 /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD7282B719D6087C00077F54 /* Storyboard.storyboard */; }; DDAD0113254DEABA00270C67 /* UIViewController+Alert.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD0111254DEABA00270C67 /* UIViewController+Alert.m */; }; DDAD011D254DEAEC00270C67 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD0119254DEAEC00270C67 /* AppDelegate.m */; }; @@ -73,6 +76,8 @@ DD2F03171AAFA4E0007BC507 /* SCLMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCLMacros.h; sourceTree = ""; }; DD4BA9C019DED8EF008D73EB /* right_answer.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = right_answer.mp3; sourceTree = ""; }; DD4BA9C219DEDD8E008D73EB /* SCLAlertView-Objective-C-prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SCLAlertView-Objective-C-prefix.pch"; path = "SCLAlertViewExample/SCLAlertView-Objective-C-prefix.pch"; sourceTree = SOURCE_ROOT; }; + DD5F3E102E954CB400E91C60 /* SCLAlertView+WindowResolver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SCLAlertView+WindowResolver.h"; sourceTree = ""; }; + DD5F3E122E954D2F00E91C60 /* SCLAlertView+WindowResolver.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SCLAlertView+WindowResolver.m"; sourceTree = ""; }; DD7282B819D6087C00077F54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = SCLAlertViewExample/Base.lproj/Storyboard.storyboard; sourceTree = SOURCE_ROOT; }; DDAD0111254DEABA00270C67 /* UIViewController+Alert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Alert.m"; sourceTree = ""; }; DDAD0112254DEABA00270C67 /* UIViewController+Alert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Alert.h"; sourceTree = ""; }; @@ -248,23 +253,25 @@ DDB15FD519D5B96500173158 /* SCLAlertView */ = { isa = PBXGroup; children = ( - DD2E172819FA84B800CBAEC3 /* UIImage+ImageEffects.h */, - DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */, DDB15FD819D5B98800173158 /* SCLAlertView.h */, DDB15FD619D5B96500173158 /* SCLAlertView.m */, - DDB15FD919D5BAA000173158 /* SCLButton.h */, - DDB15FDA19D5BAA000173158 /* SCLButton.m */, + DD5F3E102E954CB400E91C60 /* SCLAlertView+WindowResolver.h */, + DD5F3E122E954D2F00E91C60 /* SCLAlertView+WindowResolver.m */, DDB15FDC19D5BCF400173158 /* SCLAlertViewResponder.h */, DDB15FDD19D5BCF400173158 /* SCLAlertViewResponder.m */, DDB15FDF19D5D85B00173158 /* SCLAlertViewStyleKit.h */, DDB15FE019D5D85B00173158 /* SCLAlertViewStyleKit.m */, + DDB15FD919D5BAA000173158 /* SCLButton.h */, + DDB15FDA19D5BAA000173158 /* SCLButton.m */, DD2F03171AAFA4E0007BC507 /* SCLMacros.h */, - 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */, - 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */, - DD24453A1BAC383600892117 /* SCLTextView.h */, - DD24453B1BAC383600892117 /* SCLTextView.m */, CF6FB1221C5926FC009715F3 /* SCLSwitchView.h */, CF6FB1231C5926FC009715F3 /* SCLSwitchView.m */, + DD24453A1BAC383600892117 /* SCLTextView.h */, + DD24453B1BAC383600892117 /* SCLTextView.m */, + 572BB1451B8383B3002DEE38 /* SCLTimerDisplay.h */, + 572BB1461B8383B3002DEE38 /* SCLTimerDisplay.m */, + DD2E172819FA84B800CBAEC3 /* UIImage+ImageEffects.h */, + DD2E172919FA84B800CBAEC3 /* UIImage+ImageEffects.m */, ); path = SCLAlertView; sourceTree = ""; @@ -299,6 +306,7 @@ 726C8FA81EF805620060F33B /* SCLTextView.h in Headers */, 726C8FA71EF805520060F33B /* SCLButton.h in Headers */, DD4B77E41D8C580B00CF97C7 /* SCLAlertViewFramework.h in Headers */, + DD5F3E112E954CB700E91C60 /* SCLAlertView+WindowResolver.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -443,6 +451,7 @@ DD24453C1BAC383600892117 /* SCLTextView.m in Sources */, 572BB1471B8383B3002DEE38 /* SCLTimerDisplay.m in Sources */, DDB15FD719D5B96500173158 /* SCLAlertView.m in Sources */, + DD5F3E132E954D3100E91C60 /* SCLAlertView+WindowResolver.m in Sources */, DDB15FDB19D5BAA000173158 /* SCLButton.m in Sources */, DDB15FDE19D5BCF400173158 /* SCLAlertViewResponder.m in Sources */, ); @@ -462,6 +471,7 @@ files = ( EF994B191D47AB4A00619DFF /* SCLAlertViewStyleKit.m in Sources */, EF994B1C1D47AB4A00619DFF /* SCLSwitchView.m in Sources */, + DD5F3E142E954D3100E91C60 /* SCLAlertView+WindowResolver.m in Sources */, EF994B1A1D47AB4A00619DFF /* SCLTimerDisplay.m in Sources */, EF994B161D47AB4A00619DFF /* SCLAlertView.m in Sources */, EF994B181D47AB4A00619DFF /* SCLAlertViewResponder.m in Sources */, diff --git a/SCLAlertView/SCLAlertView+WindowResolver.h b/SCLAlertView/SCLAlertView+WindowResolver.h new file mode 100644 index 0000000..ade6576 --- /dev/null +++ b/SCLAlertView/SCLAlertView+WindowResolver.h @@ -0,0 +1,24 @@ +// +// SCLAlertView+WindowResolver.h +// SCLAlertView +// +// Created by Diogo Autilio on 07/10/25. +// Copyright (c) 2025 AnyKey Entertainment. All rights reserved. +// + +#import "SCLAlertView.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface SCLAlertView (WindowResolver) + +/// Active window (iOS 13+ compatible with UIScene) ++ (nullable UIWindow *)scl_currentKeyWindow; + +/// Resolves the best app view for snapshot/blur. +/// If there is no valid window, returns the provided `fallback`. ++ (nullable UIView *)scl_resolveAppViewWithFallback:(nullable UIView *)fallback; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SCLAlertView/SCLAlertView+WindowResolver.m b/SCLAlertView/SCLAlertView+WindowResolver.m new file mode 100644 index 0000000..ede91a7 --- /dev/null +++ b/SCLAlertView/SCLAlertView+WindowResolver.m @@ -0,0 +1,45 @@ +// +// SCLAlertView+WindowResolver.m +// SCLAlertView +// +// Created by Diogo Autilio on 07/10/25. +// Copyright (c) 2025 AnyKey Entertainment. All rights reserved. +// + +#import "SCLAlertView+WindowResolver.h" +#import + +@implementation SCLAlertView (WindowResolver) + ++ (UIWindow *)scl_currentKeyWindow { + UIApplication *app = UIApplication.sharedApplication; + if (@available(iOS 13.0, *)) { + for (UIScene *scene in app.connectedScenes) { + if (scene.activationState == UISceneActivationStateForegroundActive && + [scene isKindOfClass:[UIWindowScene class]]) { + UIWindowScene *ws = (UIWindowScene *)scene; + for (UIWindow *w in ws.windows) { + if (w.isKeyWindow) return w; + } + if (ws.windows.firstObject) return ws.windows.firstObject; + } + } + for (UIScene *scene in app.connectedScenes) { + if ([scene isKindOfClass:[UIWindowScene class]]) { + UIWindowScene *ws = (UIWindowScene *)scene; + if (ws.windows.firstObject) return ws.windows.firstObject; + } + } + return nil; + } else { + return app.keyWindow; + } +} + ++ (UIView *)scl_resolveAppViewWithFallback:(UIView *)fallback { + UIWindow *key = [self scl_currentKeyWindow]; + if (key) return key; + return fallback; +} + +@end diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 909b907..7a9689c 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -10,6 +10,7 @@ #import "SCLAlertViewResponder.h" #import "SCLAlertViewStyleKit.h" #import "UIImage+ImageEffects.h" +#import "SCLAlertView+WindowResolver.h" #import "SCLTimerDisplay.h" #import "SCLMacros.h" @@ -1191,15 +1192,29 @@ - (void)makeShadowBackground - (void)makeBlurBackground { - UIView *appView = (_usingNewWindow) ? [UIApplication sharedApplication].keyWindow.subviews.lastObject : _rootViewController.view; - UIImage *image = [UIImage convertViewToImage:appView]; - UIImage *blurSnapshotImage = [image applyBlurWithRadius:5.0f - tintColor:[UIColor colorWithWhite:0.2f - alpha:0.7f] - saturationDeltaFactor:1.8f - maskImage:nil]; + UIView *fallbackView = _rootViewController.view; + UIView *appView = _usingNewWindow ? (UIView *)[SCLAlertView scl_currentKeyWindow] : fallbackView; - _backgroundView.image = blurSnapshotImage; + // final fallback in case it still comes as nil + if (!appView) { + appView = [SCLAlertView scl_resolveAppViewWithFallback:fallbackView]; + } + + [appView layoutIfNeeded]; + + UIImage *snapshot = [UIImage convertViewToImage:appView]; + if (snapshot) { + UIImage *blurSnapshotImage = [snapshot applyBlurWithRadius:5.0f + tintColor:[UIColor colorWithWhite:0.2f + alpha:0.7f] + saturationDeltaFactor:1.8f + maskImage:nil]; + + _backgroundView.image = blurSnapshotImage; + } else { + _backgroundView.image = nil; + _backgroundView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.4f]; + } _backgroundView.alpha = 0.0f; _backgroundOpacity = 1.0f; } @@ -2027,3 +2042,4 @@ - (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewControll } @end + diff --git a/SCLAlertView/UIImage+ImageEffects.m b/SCLAlertView/UIImage+ImageEffects.m index 121e0e6..7c27fbb 100755 --- a/SCLAlertView/UIImage+ImageEffects.m +++ b/SCLAlertView/UIImage+ImageEffects.m @@ -102,7 +102,7 @@ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF #import #endif #import - +#import @implementation UIImage (ImageEffects) @@ -307,18 +307,41 @@ + (UIImage *)convertViewToImage return capturedScreen; } -+ (UIImage *)convertViewToImage:(UIView *)view -{ - CGFloat scale = [UIScreen mainScreen].scale; - UIImage *capturedScreen; - - //Optimized/fast method for rendering a UIView as image on iOS 7 and later versions. - UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, scale); - [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:NO]; - capturedScreen = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - - return capturedScreen; ++ (UIImage *)convertViewToImage:(UIView *)view { + if (!view) { return nil; } + + [view layoutIfNeeded]; + + CGSize size = view.bounds.size; + if (size.width <= 0.0 || size.height <= 0.0) { + return nil; + } + + CGFloat scale = UIScreen.mainScreen.scale; + + if (@available(iOS 10.0, *)) { + UIGraphicsImageRendererFormat *fmt = [UIGraphicsImageRendererFormat defaultFormat]; + fmt.scale = scale; + fmt.opaque = YES; + UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:size format:fmt]; + return [renderer imageWithActions:^(__kindof UIGraphicsImageRendererContext * _Nonnull context) { + BOOL ok = [view drawViewHierarchyInRect:(CGRect){.origin = CGPointZero, .size = size} + afterScreenUpdates:NO]; + if (!ok) { + [view.layer renderInContext:context.CGContext]; + } + }]; + } else { + UIGraphicsBeginImageContextWithOptions(size, YES, scale); + BOOL ok = [view drawViewHierarchyInRect:(CGRect){.origin = CGPointZero, .size = size} + afterScreenUpdates:NO]; + if (!ok) { + [view.layer renderInContext:UIGraphicsGetCurrentContext()]; + } + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return image; + } } @end From 1aeb76792da54bce73b79799b2757dbc905f3f1d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 7 Oct 2025 10:51:30 -0300 Subject: [PATCH 236/250] Bump version to 1.3.1 --- 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 5e2f0a3..67c3b1a 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 = "1.3.0" + spec.version = "1.3.1" 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" From db869afcf85590f9fe8f79a7f1e71f8c9855791c Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 7 Oct 2025 11:38:46 -0300 Subject: [PATCH 237/250] chore: bump minimum iOS deployment target from 9.0 to 12.0 Xcode 16 no longer supports deployment targets below iOS 12. --- SCLAlertView-Objective-C.podspec | 2 +- SCLAlertView.xcodeproj/project.pbxproj | 16 +++++++++------- .../xcshareddata/xcschemes/SCLAlertView.xcscheme | 2 +- .../xcschemes/SCLAlertViewFramework.xcscheme | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index 67c3b1a..deda426 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.frameworks = "UIKit", "AudioToolbox", "Accelerate", "CoreGraphics" - spec.ios.deployment_target = '9.0' + spec.ios.deployment_target = '12.0' spec.source = { :git => "https://github.com/dogo/SCLAlertView.git", :tag => spec.version.to_s } spec.source_files = "SCLAlertView/*" spec.requires_arc = true diff --git a/SCLAlertView.xcodeproj/project.pbxproj b/SCLAlertView.xcodeproj/project.pbxproj index cc28820..fa74768 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -372,7 +372,7 @@ DDB15F9519D5B7C600173158 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1200; + LastUpgradeCheck = 2600; ORGANIZATIONNAME = "AnyKey Entertainment"; TargetAttributes = { DDB15F9C19D5B7C600173158 = { @@ -550,7 +550,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -598,7 +598,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -613,7 +613,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -629,7 +629,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -650,6 +650,7 @@ "$(inherited)", ); INFOPLIST_FILE = SCLAlertViewTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -666,6 +667,7 @@ "$(inherited)", ); INFOPLIST_FILE = SCLAlertViewTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "br.com.anykey.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -687,7 +689,7 @@ GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = SCLAlertViewFramework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = br.com.anykey.SCLAlertViewFramework; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -714,7 +716,7 @@ GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = SCLAlertViewFramework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = br.com.anykey.SCLAlertViewFramework; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertView.xcscheme b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertView.xcscheme index aafb128..5e094fc 100644 --- a/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertView.xcscheme +++ b/SCLAlertView.xcodeproj/xcshareddata/xcschemes/SCLAlertView.xcscheme @@ -1,6 +1,6 @@ Date: Tue, 7 Oct 2025 13:12:04 -0300 Subject: [PATCH 238/250] chore: project modernization --- SCLAlertView/SCLAlertView.h | 608 ++++++++---------- SCLAlertView/SCLAlertView.m | 162 +++-- SCLAlertView/SCLAlertViewResponder.h | 20 +- SCLAlertView/SCLAlertViewResponder.m | 19 +- SCLAlertView/SCLAlertViewStyleKit.m | 30 +- SCLAlertView/SCLButton.h | 138 ++-- SCLAlertView/SCLButton.m | 14 +- SCLAlertView/SCLMacros.h | 9 +- SCLAlertView/SCLSwitchView.h | 30 +- SCLAlertView/SCLSwitchView.m | 57 +- SCLAlertView/SCLTextView.h | 14 +- SCLAlertView/SCLTextView.m | 72 ++- SCLAlertView/SCLTimerDisplay.h | 65 +- SCLAlertView/SCLTimerDisplay.m | 159 ++++- .../Category/UIViewController+Alert.m | 4 +- .../ViewController/ViewController.m | 92 ++- SCLAlertViewFramework/SCLAlertViewFramework.h | 2 +- 17 files changed, 873 insertions(+), 622 deletions(-) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 1df8008..084fd1f 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -3,30 +3,25 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2025 AnyKey Entertainment. All rights reserved. // -#if defined(__has_feature) && __has_feature(modules) -@import UIKit; -#else #import -#endif #import "SCLButton.h" #import "SCLTextView.h" #import "SCLSwitchView.h" -typedef NSAttributedString* (^SCLAttributedFormatBlock)(NSString *value); +NS_ASSUME_NONNULL_BEGIN + +typedef NSAttributedString* _Nonnull (^SCLAttributedFormatBlock)(NSString *value); typedef void (^SCLDismissBlock)(void); typedef void (^SCLDismissAnimationCompletionBlock)(void); typedef void (^SCLShowAnimationCompletionBlock)(void); typedef void (^SCLForceHideBlock)(void); -@interface SCLAlertView : UIViewController +@interface SCLAlertView : UIViewController -/** Alert Styles - * - * Set SCLAlertView Style - */ +/** Predefined alert styles. */ typedef NS_ENUM(NSInteger, SCLAlertViewStyle) { SCLAlertViewStyleSuccess, @@ -40,10 +35,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewStyle) SCLAlertViewStyleCustom }; -/** Alert hide animation styles - * - * Set SCLAlertView hide animation type. - */ +/** Hide animation styles. */ typedef NS_ENUM(NSInteger, SCLAlertViewHideAnimation) { SCLAlertViewHideAnimationFadeOut, @@ -56,10 +48,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewHideAnimation) SCLAlertViewHideAnimationSimplyDisappear }; -/** Alert show animation styles - * - * Set SCLAlertView show animation type. - */ +/** Show animation styles. */ typedef NS_ENUM(NSInteger, SCLAlertViewShowAnimation) { SCLAlertViewShowAnimationFadeIn, @@ -72,10 +61,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewShowAnimation) SCLAlertViewShowAnimationSimplyAppear }; -/** Alert background styles - * - * Set SCLAlertView background type. - */ +/** Background styles. */ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) { SCLAlertViewBackgroundShadow, @@ -83,395 +69,369 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) SCLAlertViewBackgroundTransparent }; -/** Content view corner radius - * - * A float value that replaces the standard content viuew corner radius. - */ +/// Overrides the content view corner radius. @property CGFloat cornerRadius; -/** Tint top circle - * - * A boolean value that determines whether to tint the SCLAlertView top circle. - * (Default: YES) - */ +/// Whether the top circle is tinted with the alert color. (Default: YES) @property (assign, nonatomic) BOOL tintTopCircle; -/** Use larger icon - * - * A boolean value that determines whether to make the SCLAlertView top circle icon larger. - * (Default: NO) - */ +/// Whether to use a larger icon in the top circle. (Default: NO) @property (assign, nonatomic) BOOL useLargerIcon; - -/** Title Label - * - * The text displayed as title. - */ -@property (strong, nonatomic) UILabel *labelTitle; -/** Text view with the body message - * - * Holds the textview. - */ -@property (strong, nonatomic) UITextView *viewText; +/// Title label displayed at the top of the alert. +@property (strong, nonatomic, nullable) UILabel *labelTitle; -/** Activity Indicator - * - * Holds the activityIndicator. - */ -@property (strong, nonatomic) UIActivityIndicatorView *activityIndicatorView; +/// Text view containing the message body. +@property (strong, nonatomic, nullable) UITextView *viewText; -/** Dismiss on tap outside - * - * A boolean value that determines whether to dismiss when tapping outside the SCLAlertView. - * (Default: NO) - */ +/// Activity indicator used for Waiting style. +@property (strong, nonatomic, nullable) UIActivityIndicatorView *activityIndicatorView; + +/// If YES, tapping outside the alert dismisses it. (Default: NO) @property (assign, nonatomic) BOOL shouldDismissOnTapOutside; -/** Sound URL - * - * Holds the sound NSURL path. - */ -@property (strong, nonatomic) NSURL *soundURL; +/// URL of the sound to play. +@property (strong, nonatomic, nullable) NSURL *soundURL; -/** Set text attributed format block - * - * Holds the attributed string. - */ -@property (copy, nonatomic) SCLAttributedFormatBlock attributedFormatBlock; +/// Provides an attributed string for the body text. +@property (copy, nonatomic, nullable) SCLAttributedFormatBlock attributedFormatBlock; -/** Set Complete button format block. - * - * Holds the button format block. - * Support keys : backgroundColor, borderWidth, borderColor, textColor - */ -@property (copy, nonatomic) CompleteButtonFormatBlock completeButtonFormatBlock; +/// Provides full button styling (backgroundColor, borderWidth, borderColor, textColor). +@property (copy, nonatomic, nullable) CompleteButtonFormatBlock completeButtonFormatBlock; -/** Set button format block. - * - * Holds the button format block. - * Support keys : backgroundColor, borderWidth, borderColor, textColor - */ -@property (copy, nonatomic) ButtonFormatBlock buttonFormatBlock; +/// Provides button styling (backgroundColor, borderWidth, borderColor, textColor). +@property (copy, nonatomic, nullable) ButtonFormatBlock buttonFormatBlock; -/** Set force hide block. - * - * When set force hideview method invocation. - */ -@property (copy, nonatomic) SCLForceHideBlock forceHideBlock; +/// If set, calling this property triggers hideView. +@property (copy, nonatomic, nullable) SCLForceHideBlock forceHideBlock; -/** Hide animation type - * - * Holds the hide animation type. - * (Default: FadeOut) - */ +/// Hide animation type. (Default: FadeOut) @property (nonatomic) SCLAlertViewHideAnimation hideAnimationType; -/** Show animation type - * - * Holds the show animation type. - * (Default: SlideInFromTop) - */ +/// Show animation type. (Default: SlideInFromTop) @property (nonatomic) SCLAlertViewShowAnimation showAnimationType; -/** Set SCLAlertView background type. - * - * SCLAlertView background type. - * (Default: Shadow) - */ +/// Background effect behind the alert. (Default: Shadow) @property (nonatomic) SCLAlertViewBackground backgroundType; -/** Set custom color to SCLAlertView. - * - * SCLAlertView custom color. - * (Buttons, top circle and borders) - */ -@property (strong, nonatomic) UIColor *customViewColor; +/// Custom alert color (buttons, top circle, borders). +@property (strong, nonatomic, nullable) UIColor *customViewColor; -/** Set custom color to SCLAlertView background. - * - * SCLAlertView background custom color. - */ -@property (strong, nonatomic) UIColor *backgroundViewColor; +/// Custom background view color. +@property (strong, nonatomic, nullable) UIColor *backgroundViewColor; -/** Set custom tint color for icon image. - * - * SCLAlertView icon tint color - */ -@property (strong, nonatomic) UIColor *iconTintColor; +/// Tint color for the icon image. +@property (strong, nonatomic, nullable) UIColor *iconTintColor; -/** Set custom circle icon height. - * - * Circle icon height - */ +/// Custom size for the icon inside the top circle. @property (nonatomic) CGFloat circleIconHeight; -/** Set SCLAlertView extension bounds. - * - * Set new bounds (EXTENSION ONLY) - */ +/// New bounds to use when running as an app extension only. @property (nonatomic) CGRect extensionBounds; -/** Set status bar hidden. - * - * Status bar hidden - */ +/// Status bar hidden state. @property (nonatomic) BOOL statusBarHidden; -/** Set status bar style. - * - * Status bar style - */ +/// Status bar style. @property (nonatomic) UIStatusBarStyle statusBarStyle; -/** Set horizontal alignment for buttons - * - * Horizontal aligment instead of vertically if YES - */ +/// If YES, buttons are laid out horizontally instead of vertically. @property (nonatomic) BOOL horizontalButtons; -/** Initialize SCLAlertView using specific width. - * - * Init instance +#pragma mark - Initializers + +/** + Initializes an alert with a specific width. + + @param width The desired alert width. + @return An initialized SCLAlertView instance. */ - (instancetype)initWithWidth:(CGFloat)width; -/** Initialize SCLAlertView using a new window. - * - * Init with new window +/** + Initializes an alert presented in a new UIWindow. + + @return An initialized SCLAlertView instance. */ - (instancetype)initWithNewWindow; -/** Initialize SCLAlertView using a new window. - * - * Init with new window with custom width +/** + Initializes an alert presented in a new UIWindow with custom width. + + @param windowWidth The desired alert width. + @return An initialized SCLAlertView instance. */ - (instancetype)initWithNewWindowWidth:(CGFloat)windowWidth; -/** Warns that alerts is gone - * - * Warns that alerts is gone using block +#pragma mark - Callbacks + +/** + Sets a block to be called when the alert is dismissed. + + @param dismissBlock The block executed upon dismissal. */ - (void)alertIsDismissed:(SCLDismissBlock)dismissBlock; -/** Warns that alerts dismiss animation is completed - * - * Warns that alerts dismiss animation is completed +/** + Sets a block to be called when the dismiss animation completes. + + @param dismissAnimationCompletionBlock The completion block. */ - (void)alertDismissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock; -/** Warns that alerts show animation is completed - * - * Warns that alerts show animation is completed +/** + Sets a block to be called when the show animation completes. + + @param showAnimationCompletionBlock The completion block. */ - (void)alertShowAnimationIsCompleted:(SCLShowAnimationCompletionBlock)showAnimationCompletionBlock; -/** Hide SCLAlertView - * - * Hide SCLAlertView using animation and removing from super view. - */ +#pragma mark - Visibility +/** + Hides the alert with animation and removes it from the view hierarchy. + */ - (void)hideView; -/** SCLAlertView visibility - * - * Returns if the alert is visible or not. +/** + Returns whether the alert is visible. + + @return YES if visible; otherwise NO. */ - (BOOL)isVisible; -/** Remove Top Circle - * - * Remove top circle from SCLAlertView. +/** + Removes the top circle from the alert. */ - (void)removeTopCircle; -/** Add a custom UIView - * - * @param customView UIView object to be added above the first SCLButton. +#pragma mark - Content + +/** + Adds a custom view above the first button. + + @param customView The UIView to add. + @return The same customView for chaining. */ - (UIView *)addCustomView:(UIView *)customView; -/** Add Text Field - * - * @param title The text displayed on the textfield. +/** + Adds a text field with optional default text. + + @param title The placeholder text for the text field. + @param defaultText Optional default text. + @return The created SCLTextView. */ -- (SCLTextView *)addTextField:(NSString *)title setDefaultText:(NSString *)defaultText; +- (SCLTextView *)addTextField:(NSString *)title setDefaultText:(nullable NSString *)defaultText; + +/** + Adds a custom text field. -/** Add a custom Text Field - * - * @param textField The custom textfield provided by the programmer. + @param textField The custom UITextField instance. */ - (void)addCustomTextField:(UITextField *)textField; -/** Add a switch view - * - * @param label The label displayed for the switch. +/** + Adds a switch view with an optional label. + + @param label The label text for the switch. + @return The created SCLSwitchView. */ -- (SCLSwitchView *)addSwitchViewWithLabel:(NSString *)label; +- (SCLSwitchView *)addSwitchViewWithLabel:(nullable NSString *)label; + +#pragma mark - Timer + +/** + Adds a circular timer to a button. -/** Add Timer Display - * - * @param buttonIndex The index of the button to add the timer display to. - * @param reverse Convert timer to countdown. + @param buttonIndex Index of the button to attach the timer to. + @param reverse If YES, shows a countdown. */ - (void)addTimerToButtonIndex:(NSInteger)buttonIndex reverse:(BOOL)reverse; -/** Set Title font family and size - * - * @param titleFontFamily The family name used to displayed the title. - * @param size Font size. +#pragma mark - Fonts + +/** + Sets the title font family and size. + + @param titleFontFamily The font family name. + @param size The font size. */ - (void)setTitleFontFamily:(NSString *)titleFontFamily withSize:(CGFloat)size; -/** Set Text field font family and size - * - * @param bodyTextFontFamily The family name used to displayed the text field. - * @param size Font size. +/** + Sets the body text font family and size. + + @param bodyTextFontFamily The font family name. + @param size The font size. */ - (void)setBodyTextFontFamily:(NSString *)bodyTextFontFamily withSize:(CGFloat)size; -/** Set Buttons font family and size - * - * @param buttonsFontFamily The family name used to displayed the buttons. - * @param size Font size. +/** + Sets the buttons font family and size. + + @param buttonsFontFamily The font family name. + @param size The font size. */ - (void)setButtonsTextFontFamily:(NSString *)buttonsFontFamily withSize:(CGFloat)size; -/** Add a Button with a title and a block to handle when the button is pressed. - * - * @param title The text displayed on the button. - * @param action A block of code to be executed when the button is pressed. +#pragma mark - Buttons + +/** + Adds a button with a title and action block. + + @param title The button title. + @param action The block executed when the button is tapped. + @return The created SCLButton. */ - (SCLButton *)addButton:(NSString *)title actionBlock:(SCLActionBlock)action; -/** Add a Button with a title, a block to handle validation, and a block to handle when the button is pressed and validation succeeds. - * - * @param title The text displayed on the button. - * @param validationBlock A block of code that will allow you to validate fields or do any other logic you may want to do to determine if the alert should be dismissed or not. Inside of this block, return a BOOL indicating whether or not the action block should be called and the alert dismissed. - * @param action A block of code to be executed when the button is pressed and validation passes. +/** + Adds a button with validation and action blocks. + + @param title The button title. + @param validationBlock A block returning YES to proceed and dismiss, NO to keep the alert. + @param action The block executed when validation passes and the button is tapped. + @return The created SCLButton. */ - (SCLButton *)addButton:(NSString *)title validationBlock:(SCLValidationBlock)validationBlock actionBlock:(SCLActionBlock)action; -/** Add a Button with a title, a target and a selector to handle when the button is pressed. - * - * @param title The text displayed on the button. - * @param target Add target for particular event. - * @param selector A method to be executed when the button is pressed. +/** + Adds a button with a target and selector. + + @param title The button title. + @param target The target object for the selector. + @param selector The selector to invoke on tap. + @return The created SCLButton. */ - (SCLButton *)addButton:(NSString *)title target:(id)target selector:(SEL)selector; -/** Show Success SCLAlertView - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +#pragma mark - Show (predefined styles) + +/** + Shows a Success alert. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showSuccess:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showSuccess:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Show Error SCLAlertView - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showSuccess:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showSuccess:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +/** + Shows an Error alert. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showError:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showError:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Show Notice SCLAlertView - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showError:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showError:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +/** + Shows a Notice alert. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showNotice:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showNotice:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Show Warning SCLAlertView - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showNotice:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showNotice:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +/** + Shows a Warning alert. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showWarning:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showWarning:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Show Info SCLAlertView - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showWarning:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showWarning:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +/** + Shows an Info alert. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showInfo:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showInfo:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Show Edit SCLAlertView - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showInfo:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showInfo:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +/** + Shows an Edit alert. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showEdit:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showEdit:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Show Title SCLAlertView using a predefined type - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param style One of predefined SCLAlertView styles. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showEdit:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showEdit:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +#pragma mark - Show (custom) + +/** + Shows a predefined style alert. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param style The predefined style. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showTitle:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle style:(SCLAlertViewStyle)style closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showTitle:(NSString *)title subTitle:(NSString *)subTitle style:(SCLAlertViewStyle)style closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Shows a custom SCLAlertView without using a predefined type, allowing for a custom image and color to be specified. - * - * @param vc The view controller the alert view will be displayed in. - * @param image A UIImage object to be used as the icon for the alert view. - * @param color A UIColor object to be used to tint the background of the icon circle and the buttons. - * @param title The title text of the alert view. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showTitle:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle style:(SCLAlertViewStyle)style closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showTitle:(NSString *)title subTitle:(NSString *)subTitle style:(SCLAlertViewStyle)style closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +/** + Shows a custom alert with custom image and color. + + @param vc The presenting view controller. + @param image The icon image. + @param color The primary color (buttons, top circle, borders). + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showCustom:(UIViewController *)vc image:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showCustom:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Show Waiting SCLAlertView with UIActityIndicator. - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showCustom:(UIViewController *)vc image:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showCustom:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +/** + Shows a Waiting alert with UIActivityIndicator. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showWaiting:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showWaiting:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; - -/** Show Question SCLAlertView - * - * @param vc The view controller the alert view will be displayed in. - * @param title The text displayed on the button. - * @param subTitle The subtitle text of the alert view. - * @param closeButtonTitle The text for the close button. - * @param duration The amount of time the alert will remain on screen until it is automatically dismissed. If automatic dismissal is not desired, set to 0. +- (void)showWaiting:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showWaiting:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; + +/** + Shows a Question alert. + + @param vc The presenting view controller. + @param title The alert title. + @param subTitle The alert subtitle. + @param closeButtonTitle The close button title (optional). + @param duration Automatic dismissal after this duration; set 0 to disable. */ -- (void)showQuestion:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; -- (void)showQuestion:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showQuestion:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; +- (void)showQuestion:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(nullable NSString *)closeButtonTitle duration:(NSTimeInterval)duration; @end @@ -483,13 +443,13 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @interface SCLAlertViewShowBuilder : SCLAlertViewBuilder__WithFluent -@property(weak, nonatomic, readonly) UIViewController *parameterViewController; -@property(copy, nonatomic, readonly) UIImage *parameterImage; -@property(copy, nonatomic, readonly) UIColor *parameterColor; -@property(copy, nonatomic, readonly) NSString *parameterTitle; -@property(copy, nonatomic, readonly) NSString *parameterSubTitle; -@property(copy, nonatomic, readonly) NSString *parameterCompleteText; -@property(copy, nonatomic, readonly) NSString *parameterCloseButtonTitle; +@property(weak, nonatomic, readonly, nullable) UIViewController *parameterViewController; +@property(copy, nonatomic, readonly, nullable) UIImage *parameterImage; +@property(copy, nonatomic, readonly, nullable) UIColor *parameterColor; +@property(copy, nonatomic, readonly, nullable) NSString *parameterTitle; +@property(copy, nonatomic, readonly, nullable) NSString *parameterSubTitle; +@property(copy, nonatomic, readonly, nullable) NSString *parameterCompleteText; +@property(copy, nonatomic, readonly, nullable) NSString *parameterCloseButtonTitle; @property(assign, nonatomic, readonly) SCLAlertViewStyle parameterStyle; @property(assign, nonatomic, readonly) NSTimeInterval parameterDuration; @@ -505,14 +465,14 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic, readonly) SCLAlertViewShowBuilder *(^duration)(NSTimeInterval duration); - (void)showAlertView:(SCLAlertView *)alertView; -- (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewController *)controller; -@property(copy, nonatomic, readonly) void (^show)(SCLAlertView *view, UIViewController *controller); +- (void)showAlertView:(SCLAlertView *)alertView onViewController:(UIViewController * _Nullable)controller; +@property(copy, nonatomic, readonly) void (^show)(SCLAlertView *view, UIViewController * _Nullable controller); @end @interface SCLALertViewTextFieldBuilder : SCLAlertViewBuilder__WithFluent #pragma mark - Available later after adding -@property(weak, nonatomic, readonly) SCLTextView *textField; +@property(weak, nonatomic, readonly, nullable) SCLTextView *textField; #pragma mark - Setters @property(copy, nonatomic, readonly) SCLALertViewTextFieldBuilder *(^title) (NSString *title); @@ -522,7 +482,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @interface SCLALertViewButtonBuilder : SCLAlertViewBuilder__WithFluent #pragma mark - Available later after adding -@property(weak, nonatomic, readonly) SCLButton *button; +@property(weak, nonatomic, readonly, nullable) SCLButton *button; #pragma mark - Setters @property(copy, nonatomic, readonly) SCLALertViewButtonBuilder *(^title) (NSString *title); @@ -573,9 +533,9 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic) SCLAlertViewBuilder *(^alertShowAnimationIsCompleted) (SCLShowAnimationCompletionBlock showAnimationCompletionBlock); @property(copy, nonatomic) SCLAlertViewBuilder *(^removeTopCircle)(void); @property(copy, nonatomic) SCLAlertViewBuilder *(^addCustomView)(UIView *view); -@property(copy, nonatomic) SCLAlertViewBuilder *(^addTextField)(NSString *title, NSString *defaultText); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addTextField)(NSString *title, NSString * _Nullable defaultText); @property(copy, nonatomic) SCLAlertViewBuilder *(^addCustomTextField)(UITextField *textField); -@property(copy, nonatomic) SCLAlertViewBuilder *(^addSwitchViewWithLabelTitle)(NSString *title); +@property(copy, nonatomic) SCLAlertViewBuilder *(^addSwitchViewWithLabelTitle)(NSString * _Nullable title); @property(copy, nonatomic) SCLAlertViewBuilder *(^addTimerToButtonIndex)(NSInteger buttonIndex, BOOL reverse); @property(copy, nonatomic) SCLAlertViewBuilder *(^setTitleFontFamily)(NSString *titleFontFamily, CGFloat size); @property(copy, nonatomic) SCLAlertViewBuilder *(^setBodyTextFontFamily)(NSString *bodyTextFontFamily, CGFloat size); @@ -589,3 +549,5 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) @property(copy, nonatomic) SCLAlertViewBuilder *(^addTextFieldWithBuilder)(SCLALertViewTextFieldBuilder *builder); @end + +NS_ASSUME_NONNULL_END diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 7a9689c..409d956 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2025 AnyKey Entertainment. All rights reserved. // #import "SCLAlertView.h" @@ -14,13 +14,8 @@ #import "SCLTimerDisplay.h" #import "SCLMacros.h" -#if defined(__has_feature) && __has_feature(modules) @import AVFoundation; @import AudioToolbox; -#else -#import -#import -#endif #define KEYBOARD_HEIGHT 80 #define PREDICTION_BAR_HEIGHT 40 @@ -143,6 +138,8 @@ - (void)dealloc [self restoreInteractivePopGesture]; } +#pragma mark - Observers + - (void)addObservers { if(_canAddObservers) @@ -159,7 +156,7 @@ - (void)removeObservers [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil]; } -#pragma mark - Setup view +#pragma mark - Setup View - (void)setupViewWindowWidth:(CGFloat)windowWidth { @@ -184,7 +181,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth self.backgroundType = SCLAlertViewBackgroundShadow; self.tintTopCircle = YES; - // Font + // Fonts _titleFontFamily = @"HelveticaNeue"; _bodyTextFontFamily = @"HelveticaNeue"; _buttonsFontFamily = @"HelveticaNeue-Bold"; @@ -206,28 +203,28 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _customViews = [[NSMutableArray alloc] init]; self.view.accessibilityViewIsModal = YES; - // Add Subviews + // Add subviews [self.view addSubview:_contentView]; [self.view addSubview:_circleViewBackground]; - // Circle View + // Circle view CGFloat x = (kCircleHeightBackground - kCircleHeight) / 2; _circleView.frame = CGRectMake(x, x, kCircleHeight, kCircleHeight); _circleView.layer.cornerRadius = _circleView.frame.size.height / 2; - // Circle Background View + // Circle background view _circleViewBackground.backgroundColor = [UIColor whiteColor]; _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; x = (kCircleHeight - _circleIconHeight) / 2; - // Circle Image View + // Circle image view _circleIconImageView.frame = CGRectMake(x, x, _circleIconHeight, _circleIconHeight); _circleIconImageView.contentMode = UIViewContentModeScaleAspectFill; [_circleViewBackground addSubview:_circleView]; [_circleView addSubview:_circleIconImageView]; - // Background View + // Background view _backgroundView.userInteractionEnabled = YES; // Title @@ -237,7 +234,7 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _labelTitle.font = [UIFont fontWithName:_titleFontFamily size:_titleFontSize]; _labelTitle.frame = CGRectMake(12.0f, kTitleTop, _windowWidth - 24.0f, _titleHeight); - // View text + // Body text _viewText.editable = NO; _viewText.allowsEditingTextAttributes = YES; _viewText.textAlignment = NSTextAlignmentCenter; @@ -245,26 +242,27 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth _viewText.frame = CGRectMake(12.0f, _subTitleY, _windowWidth - 24.0f, _subTitleHeight); _viewText.textContainerInset = UIEdgeInsetsZero; _viewText.textContainer.lineFragmentPadding = 0; - self.automaticallyAdjustsScrollViewInsets = NO; + _viewText.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; - // Content View + // Content view _contentView.backgroundColor = [UIColor whiteColor]; _contentView.layer.cornerRadius = 5.0f; _contentView.layer.masksToBounds = YES; _contentView.layer.borderWidth = 0.5f; - [_contentView addSubview:_viewText]; + [_contentView addSubview:_viewText]; [_contentView addSubview:_labelTitle]; // Colors self.backgroundViewColor = [UIColor whiteColor]; - _labelTitle.textColor = UIColorFromHEX(0x4D4D4D); //Dark Grey - _viewText.textColor = UIColorFromHEX(0x4D4D4D); //Dark Grey - _contentView.layer.borderColor = UIColorFromHEX(0xCCCCCC).CGColor; //Light Grey + _labelTitle.textColor = UIColorFromHEX(0x4D4D4D); // Dark gray + _viewText.textColor = UIColorFromHEX(0x4D4D4D); // Dark gray + _contentView.layer.borderColor = UIColorFromHEX(0xCCCCCC).CGColor; // Light gray } -- (void)setupNewWindow { +- (void)setupNewWindow +{ // Save previous window - self.previousWindow = [UIApplication sharedApplication].keyWindow; + self.previousWindow = [SCLAlertView scl_currentKeyWindow]; // Create a new one to show the alert UIWindow *alertWindow = [[UIWindow alloc] initWithFrame:[self mainScreenFrame]]; @@ -282,7 +280,7 @@ - (BOOL)isModal { return (_rootViewController != nil && _rootViewController.presentingViewController); } -#pragma mark - View Cycle +#pragma mark - View Lifecycle - (void)viewWillLayoutSubviews { @@ -310,12 +308,12 @@ - (void)viewWillLayoutSubviews kCircleBackgroundTopPosition = -(kCircleHeightBackground / 2); } - // Check if the rootViewController is modal, if so we need to get the modal size not the main screen size + // Use modal size if presented modally (and not using a new window) if ([self isModal] && !_usingNewWindow) { sz = _rootViewController.view.frame.size; } - // Set new main frame + // Set main frame CGRect r; if (self.view.superview != nil) { // View is showing, position at center of screen @@ -326,12 +324,12 @@ - (void)viewWillLayoutSubviews } self.view.frame = r; - // Set new background frame + // Background frame CGRect newBackgroundFrame = self.backgroundView.frame; newBackgroundFrame.size = sz; self.backgroundView.frame = newBackgroundFrame; - // Set frames + // Frames _contentView.frame = CGRectMake(0.0f, 0.0f, _windowWidth, _windowHeight); _circleViewBackground.frame = CGRectMake(_windowWidth / 2 - kCircleHeightBackground / 2, kCircleBackgroundTopPosition, kCircleHeightBackground, kCircleHeightBackground); _circleViewBackground.layer.cornerRadius = _circleViewBackground.frame.size.height / 2; @@ -365,7 +363,7 @@ - (void)viewWillLayoutSubviews for (SCLButton *btn in _buttons) { btn.frame = CGRectMake(x, y, btn.frame.size.width, btn.frame.size.height); - // Add horizontal or vertical offset acording on _horizontalButtons parameter + // Add horizontal or vertical offset according to _horizontalButtons if (_horizontalButtons) { x += btn.frame.size.width + 10.0f; } else { @@ -377,11 +375,11 @@ - (void)viewWillLayoutSubviews self.windowHeight = _useLargerIcon ? y : self.windowHeight; _contentView.frame = CGRectMake(_contentView.frame.origin.x, _contentView.frame.origin.y, _windowWidth, _windowHeight); - // Adjust corner radius, if a value has been passed + // Adjust corner radius (if a value has been passed) _contentView.layer.cornerRadius = self.cornerRadius ? self.cornerRadius : 5.0f; } -#pragma mark - UIViewController +#pragma mark - Status Bar - (BOOL)prefersStatusBarHidden { @@ -393,7 +391,7 @@ - (UIStatusBarStyle)preferredStatusBarStyle return self.statusBarStyle; } -#pragma mark - Handle gesture +#pragma mark - Gesture Handling - (void)handleTap:(UITapGestureRecognizer *)gesture { @@ -403,7 +401,7 @@ - (void)handleTap:(UITapGestureRecognizer *)gesture for(SCLTextView *txt in _inputs) { - // Check if there is any keyboard on screen and dismiss + // Dismiss keyboard if any input is editing if (txt.editing) { [txt resignFirstResponder]; @@ -428,6 +426,8 @@ - (void)setShouldDismissOnTapOutside:(BOOL)shouldDismissOnTapOutside } } +#pragma mark - Navigation Gesture + - (void)disableInteractivePopGesture { UINavigationController *navigationController; @@ -441,7 +441,7 @@ - (void)disableInteractivePopGesture navigationController = _rootViewController.navigationController; } - // Disable iOS 7 back gesture + // Disable back gesture if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { _restoreInteractivePopGestureEnabled = navigationController.interactivePopGestureRecognizer.enabled; @@ -464,7 +464,7 @@ - (void)restoreInteractivePopGesture navigationController = _rootViewController.navigationController; } - // Restore iOS 7 back gesture + // Restore back gesture if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { navigationController.interactivePopGestureRecognizer.enabled = _restoreInteractivePopGestureEnabled; @@ -510,12 +510,12 @@ - (void)setSoundURL:(NSURL *)soundURL { _soundURL = soundURL; - //DisposeSound + // Dispose previous sound AudioServicesDisposeSystemSoundID(_soundID); AudioServicesCreateSystemSoundID((__bridge CFURLRef)_soundURL, &_soundID); - //PlaySound + // Play new sound AudioServicesPlaySystemSound(_soundID); } @@ -526,7 +526,7 @@ - (void)setSubTitleHeight:(CGFloat)value _subTitleHeight = value; } -#pragma mark - ActivityIndicator +#pragma mark - Activity Indicator - (void)addActivityIndicatorView { @@ -536,7 +536,7 @@ - (void)addActivityIndicatorView [_circleView addSubview:_activityIndicatorView]; } -#pragma mark - UICustomView +#pragma mark - Custom View - (UIView *)addCustomView:(UIView *)customView { @@ -549,7 +549,7 @@ - (UIView *)addCustomView:(UIView *)customView return customView; } -#pragma mark - SwitchView +#pragma mark - Switch View - (SCLSwitchView *)addSwitchViewWithLabel:(NSString *)label { @@ -570,7 +570,7 @@ - (SCLSwitchView *)addSwitchViewWithLabel:(NSString *)label return switchView; } -#pragma mark - TextField +#pragma mark - Text Field - (SCLTextView *)addTextField:(NSString *)title setDefaultText:(NSString *)defaultText { @@ -596,8 +596,7 @@ - (SCLTextView *)addTextField:(NSString *)title setDefaultText:(NSString *)defau [_contentView addSubview:txt]; [_inputs addObject:txt]; - // If there are other fields in the inputs array, get the previous field and set the - // return key type on that to next. + // If there are other fields in the inputs array, set the previous field return key to Next if (_inputs.count > 1) { NSUInteger indexOfCurrentField = [_inputs indexOfObject:txt]; @@ -615,8 +614,7 @@ - (void)addCustomTextField:(UITextField *)textField [_contentView addSubview:textField]; [_inputs addObject:textField]; - // If there are other fields in the inputs array, get the previous field and set the - // return key type on that to next. + // If there are other fields in the inputs array, set the previous field return key to Next if (_inputs.count > 1) { NSUInteger indexOfCurrentField = [_inputs indexOfObject:textField]; @@ -630,12 +628,11 @@ - (void)addCustomTextField:(UITextField *)textField - (BOOL)textFieldShouldReturn:(UITextField *)textField { // If this is the last object in the inputs array, resign first responder - // as the form is at the end. if (textField == _inputs.lastObject) { [textField resignFirstResponder]; } - else // Otherwise find the next field and make it first responder. + else // Otherwise find the next field and make it first responder { NSUInteger indexOfCurrentField = [_inputs indexOfObject:textField]; UITextField *nextField = _inputs[indexOfCurrentField + 1]; @@ -644,6 +641,8 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField return NO; } +#pragma mark - Keyboard + - (void)keyboardWillShow:(NSNotification *)notification { if(_keyboardIsVisible) return; @@ -750,11 +749,10 @@ - (SCLButton *)addButton:(NSString *)title target:(id)target selector:(SEL)selec - (void)buttonTapped:(SCLButton *)btn { - // Cancel Countdown timer + // Cancel countdown timer [buttonTimer cancelTimer]; - // If the button has a validation block, and the validation block returns NO, validation - // failed, so we should bail. + // Validate if needed if (btn.validationBlock && !btn.validationBlock()) { return; } @@ -792,7 +790,7 @@ - (void)addTimerToButtonIndex:(NSInteger)buttonIndex reverse:(BOOL)reverse buttonTimer.reverse = reverse; } -#pragma mark - Show Alert +#pragma mark - Show Alert (Core) - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)image color:(UIColor *)color title:(NSString *)title subTitle:(NSString *)subTitle duration:(NSTimeInterval)duration completeText:(NSString *)completeText style:(SCLAlertViewStyle)style { @@ -873,7 +871,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima break; } - // Custom Alert color + // Custom alert color override if(_customViewColor) { viewColor = _customViewColor; @@ -883,11 +881,9 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima if ([title stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length > 0) { self.labelTitle.text = title; - // Adjust text view size, if necessary + // Adjust text view size if necessary CGSize sz = CGSizeMake(_windowWidth - 24.0f, CGFLOAT_MAX); - CGSize size = [_labelTitle sizeThatFits:sz]; - CGFloat ht = ceilf(size.height); if (ht > _titleHeight) { self.windowHeight += (ht - _titleHeight); @@ -895,18 +891,15 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima self.subTitleY += 20; } } else { - // Title is nil, we can move the body message to center and remove it from superView + // No title: center body and remove title view self.windowHeight -= _labelTitle.frame.size.height; [_labelTitle removeFromSuperview]; _labelTitle = nil; - _subTitleY = kCircleHeight - 20; } // Subtitle if ([subTitle stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length > 0) { - - // No custom text if (_attributedFormatBlock == nil) { _viewText.text = subTitle; } else { @@ -914,11 +907,9 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima _viewText.attributedText = self.attributedFormatBlock(subTitle); } - // Adjust text view size, if necessary + // Adjust text view size if necessary CGSize sz = CGSizeMake(_windowWidth - 24.0f, CGFLOAT_MAX); - CGSize size = [_viewText sizeThatFits:sz]; - CGFloat ht = ceilf(size.height); if (ht < _subTitleHeight) { self.windowHeight -= (_subTitleHeight - ht); @@ -928,7 +919,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima self.subTitleHeight = ht; } } else { - // Subtitle is nil, we can move the title to center and remove it from superView + // No subtitle: center title and remove body view self.subTitleHeight = 0.0f; self.windowHeight -= _viewText.frame.size.height; [_viewText removeFromSuperview]; @@ -942,7 +933,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima self.windowHeight -= kTitleTop; } - // Add button, if necessary + // Add button if needed if(completeText != nil) { [self addDoneButtonWithTitle:completeText]; @@ -990,7 +981,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima } } - // Adding duration + // Duration if (duration > 0) { [durationTimer invalidate]; @@ -1022,7 +1013,7 @@ - (SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)ima // Show the alert view [self showView]; - // Chainable objects + // Chainable responder return [[SCLAlertViewResponder alloc] init:self]; } @@ -1079,7 +1070,6 @@ - (void)showQuestion:(UIViewController *)vc title:(NSString *)title subTitle:(NS [self showTitle:vc image:nil color:nil title:title subTitle:subTitle duration:duration completeText:closeButtonTitle style:SCLAlertViewStyleQuestion]; } - #pragma mark - Show using new window - (void)showSuccess:(NSString *)title subTitle:(NSString *)subTitle closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration @@ -1151,11 +1141,13 @@ - (void)alertIsDismissed:(SCLDismissBlock)dismissBlock self.dismissBlock = dismissBlock; } -- (void)alertDismissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock{ +- (void)alertDismissAnimationIsCompleted:(SCLDismissAnimationCompletionBlock)dismissAnimationCompletionBlock +{ self.dismissAnimationCompletionBlock = dismissAnimationCompletionBlock; } -- (void)alertShowAnimationIsCompleted:(SCLShowAnimationCompletionBlock)showAnimationCompletionBlock{ +- (void)alertShowAnimationIsCompleted:(SCLShowAnimationCompletionBlock)showAnimationCompletionBlock +{ self.showAnimationCompletionBlock = showAnimationCompletionBlock; } @@ -1172,7 +1164,7 @@ - (SCLForceHideBlock)forceHideBlock:(SCLForceHideBlock)forceHideBlock - (CGRect)mainScreenFrame { - return [self isAppExtension] ? _extensionBounds : [UIApplication sharedApplication].keyWindow.bounds; + return [self isAppExtension] ? _extensionBounds : [SCLAlertView scl_currentKeyWindow].bounds; } - (BOOL)isAppExtension @@ -1195,7 +1187,7 @@ - (void)makeBlurBackground UIView *fallbackView = _rootViewController.view; UIView *appView = _usingNewWindow ? (UIView *)[SCLAlertView scl_currentKeyWindow] : fallbackView; - // final fallback in case it still comes as nil + // Final fallback in case it still comes as nil if (!appView) { appView = [SCLAlertView scl_resolveAppViewWithFallback:fallbackView]; } @@ -1245,7 +1237,7 @@ - (void)setBackground } } -#pragma mark - Show Alert +#pragma mark - Show Alert (Animations) - (void)showView { @@ -1285,7 +1277,7 @@ - (void)showView } } -#pragma mark - Hide Alert +#pragma mark - Hide Alert (Animations) - (void)hideView { @@ -1460,7 +1452,6 @@ - (void)simplyDisappear }); } - #pragma mark - Show Animations - (void)fadeIn @@ -1484,7 +1475,7 @@ - (void)fadeIn - (void)slideInFromTop { - //From Frame + // From frame CGRect frame = self.backgroundView.frame; frame.origin.y = -self.backgroundView.frame.size.height; self.view.frame = frame; @@ -1492,7 +1483,7 @@ - (void)slideInFromTop [UIView animateWithDuration:0.5f delay:0.0f usingSpringWithDamping:0.6f initialSpringVelocity:0.5f options:0 animations:^{ self.backgroundView.alpha = self.backgroundOpacity; - //To Frame + // To frame CGRect frame = self.backgroundView.frame; frame.origin.y = 0.0f; self.view.frame = frame; @@ -1507,7 +1498,7 @@ - (void)slideInFromTop - (void)slideInFromBottom { - //From Frame + // From frame CGRect frame = self.backgroundView.frame; frame.origin.y = self.backgroundView.frame.size.height; self.view.frame = frame; @@ -1515,7 +1506,7 @@ - (void)slideInFromBottom [UIView animateWithDuration:0.3f animations:^{ self.backgroundView.alpha = self.backgroundOpacity; - //To Frame + // To frame CGRect frame = self.backgroundView.frame; frame.origin.y = 0.0f; self.view.frame = frame; @@ -1534,7 +1525,7 @@ - (void)slideInFromBottom - (void)slideInFromLeft { - //From Frame + // From frame CGRect frame = self.backgroundView.frame; frame.origin.x = -self.backgroundView.frame.size.width; self.view.frame = frame; @@ -1542,7 +1533,7 @@ - (void)slideInFromLeft [UIView animateWithDuration:0.3f animations:^{ self.backgroundView.alpha = self.backgroundOpacity; - //To Frame + // To frame CGRect frame = self.backgroundView.frame; frame.origin.x = 0.0f; self.view.frame = frame; @@ -1561,7 +1552,7 @@ - (void)slideInFromLeft - (void)slideInFromRight { - //From Frame + // From frame CGRect frame = self.backgroundView.frame; frame.origin.x = self.backgroundView.frame.size.width; self.view.frame = frame; @@ -1569,7 +1560,7 @@ - (void)slideInFromRight [UIView animateWithDuration:0.3f animations:^{ self.backgroundView.alpha = self.backgroundOpacity; - //To Frame + // To frame CGRect frame = self.backgroundView.frame; frame.origin.x = 0.0f; self.view.frame = frame; @@ -1588,7 +1579,7 @@ - (void)slideInFromRight - (void)slideInFromCenter { - //From Frame + // From frame self.view.transform = CGAffineTransformConcat(CGAffineTransformIdentity, CGAffineTransformMakeScale(3.0f, 3.0f)); self.view.alpha = 0.0f; @@ -1596,7 +1587,7 @@ - (void)slideInFromCenter [UIView animateWithDuration:0.3f animations:^{ self.backgroundView.alpha = self.backgroundOpacity; - //To Frame + // To frame self.view.transform = CGAffineTransformConcat(CGAffineTransformIdentity, CGAffineTransformMakeScale(1.0f, 1.0f)); self.view.alpha = 1.0f; @@ -1613,7 +1604,7 @@ - (void)slideInFromCenter - (void)slideInToCenter { - //From Frame + // From frame self.view.transform = CGAffineTransformConcat(CGAffineTransformIdentity, CGAffineTransformMakeScale(0.1f, 0.1f)); self.view.alpha = 0.0f; @@ -1621,7 +1612,7 @@ - (void)slideInToCenter [UIView animateWithDuration:0.3f animations:^{ self.backgroundView.alpha = self.backgroundOpacity; - //To Frame + // To frame self.view.transform = CGAffineTransformConcat(CGAffineTransformIdentity, CGAffineTransformMakeScale(1.0f, 1.0f)); self.view.alpha = 1.0f; @@ -1650,7 +1641,6 @@ - (void)simplyAppear }); } - @end @implementation SCLAlertViewBuilder__WithFluent diff --git a/SCLAlertView/SCLAlertViewResponder.h b/SCLAlertView/SCLAlertViewResponder.h index 0dfb77b..31c438b 100644 --- a/SCLAlertView/SCLAlertViewResponder.h +++ b/SCLAlertView/SCLAlertViewResponder.h @@ -6,25 +6,21 @@ // Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. // -#if defined(__has_feature) && __has_feature(modules) -@import Foundation; -#else #import -#endif #import "SCLAlertView.h" @interface SCLAlertViewResponder : NSObject -/** TODO - * - * TODO - */ +/// Inicializa o responder vinculado a uma instância de SCLAlertView. - (instancetype)init:(SCLAlertView *)alertview; -/** TODO - * - * TODO - */ +/// Atualiza o título do alerta. +- (void)setTitle:(NSString *)title; + +/// Atualiza o subtítulo/texto do corpo do alerta. +- (void)setSubTitle:(NSString *)subTitle; + +/// Fecha o alerta. - (void)close; @end diff --git a/SCLAlertView/SCLAlertViewResponder.m b/SCLAlertView/SCLAlertViewResponder.m index 847ed9d..2318c53 100644 --- a/SCLAlertView/SCLAlertViewResponder.m +++ b/SCLAlertView/SCLAlertViewResponder.m @@ -10,33 +10,36 @@ @interface SCLAlertViewResponder () -@property SCLAlertView *alertview; +// Weak reference to the alert to avoid retain cycles. Valid while the alert is alive. +@property (weak, nonatomic) SCLAlertView *alertview; @end @implementation SCLAlertViewResponder -// -//// Allow alerts to be closed/renamed in a chainable manner -//// Example: SCLAlertView().showSuccess(self, title: "Test", subTitle: "Value").close() - -// Initialisation and Title/Subtitle/Close functions +// Binds the responder to a presented alert, enabling title/subtitle updates and dismissal. - (instancetype)init:(SCLAlertView *)alertview { - self.alertview = alertview; + self = [super init]; + if (self) { + self.alertview = alertview; + } return self; } -- (void)setTitletitle:(NSString *)title +// Updates the alert title (useful for async state changes). +- (void)setTitle:(NSString *)title { self.alertview.labelTitle.text = title; } +// Updates the alert subtitle/body text. - (void)setSubTitle:(NSString *)subTitle { self.alertview.viewText.text = subTitle; } +// Dismisses the alert using its configured animation. - (void)close { [self.alertview hideView]; diff --git a/SCLAlertView/SCLAlertViewStyleKit.m b/SCLAlertView/SCLAlertViewStyleKit.m index f467f47..45b982e 100644 --- a/SCLAlertView/SCLAlertViewStyleKit.m +++ b/SCLAlertView/SCLAlertViewStyleKit.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2025 AnyKey Entertainment. All rights reserved. // #import "SCLAlertViewStyleKit.h" @@ -28,14 +28,14 @@ @implementation SCLAlertViewStyleKit + (void)initialize { - // Do something + // Reserved for future initialization. } #pragma mark - Drawing Methods + (void)drawCheckmark { - // Checkmark Shape Drawing + // Checkmark shape drawing UIBezierPath *checkmarkShapePath = [[UIBezierPath alloc] init]; [checkmarkShapePath moveToPoint:CGPointMake(73.25, 14.05)]; [checkmarkShapePath addCurveToPoint:CGPointMake(64.51, 13.86) controlPoint1: CGPointMake(70.98, 11.44) controlPoint2: CGPointMake(66.78, 11.26)]; @@ -57,7 +57,7 @@ + (void)drawCheckmark + (void)drawCross { - // Cross Shape Drawing + // Cross shape drawing UIBezierPath *crossShapePath = [[UIBezierPath alloc] init]; [crossShapePath moveToPoint:CGPointMake(10, 70)]; [crossShapePath addLineToPoint:CGPointMake(70, 10)]; @@ -74,7 +74,7 @@ + (void)drawCross + (void)drawNotice { - // Notice Shape Drawing + // Notice shape drawing UIBezierPath *noticeShapePath = [[UIBezierPath alloc] init]; [noticeShapePath moveToPoint:CGPointMake(72, 48.54)]; [noticeShapePath addLineToPoint:CGPointMake(72, 39.9)]; @@ -112,11 +112,11 @@ + (void)drawNotice + (void)drawWarning { - // Color Declarations + // Color declarations UIColor *greyColor = [UIColor colorWithRed:0.236 green:0.236 blue:0.236 alpha:1.000]; - // Warning Group - // Warning Circle Drawing + // Warning group + // Warning circle drawing UIBezierPath *warningCirclePath = [[UIBezierPath alloc] init]; [warningCirclePath moveToPoint:CGPointMake(40.94, 63.39)]; [warningCirclePath addCurveToPoint:CGPointMake(36.03, 65.55) controlPoint1: CGPointMake(39.06, 63.39) controlPoint2: CGPointMake(37.36, 64.18)]; @@ -134,7 +134,7 @@ + (void)drawWarning [warningCirclePath fill]; - //// Warning Shape Drawing + // Warning shape drawing UIBezierPath *warningShapePath = [[UIBezierPath alloc] init]; [warningShapePath moveToPoint:CGPointMake(46.23, 4.26)]; [warningShapePath addCurveToPoint:CGPointMake(40.94, 2.5) controlPoint1: CGPointMake(44.91, 3.09) controlPoint2: CGPointMake(43.02, 2.5)]; @@ -156,10 +156,10 @@ + (void)drawWarning + (void)drawInfo { - // Color Declarations + // Color declarations UIColor *color0 = [UIColor colorWithRed:1.000 green:1.000 blue:1.000 alpha:1.000]; - // Info Shape Drawing + // Info shape drawing UIBezierPath *infoShapePath = [[UIBezierPath alloc] init]; [infoShapePath moveToPoint:CGPointMake(45.66, 15.96)]; [infoShapePath addCurveToPoint:CGPointMake(45.66, 5.22) controlPoint1: CGPointMake(48.78, 12.99) controlPoint2: CGPointMake(48.78, 8.19)]; @@ -185,10 +185,10 @@ + (void)drawInfo + (void)drawEdit { - // Color Declarations + // Color declarations UIColor *color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; - // Edit shape Drawing + // Edit shape drawing UIBezierPath *editPathPath = [[UIBezierPath alloc] init]; [editPathPath moveToPoint:CGPointMake(71, 2.7)]; [editPathPath addCurveToPoint:CGPointMake(71.9, 15.2) controlPoint1:CGPointMake(74.7, 5.9) controlPoint2:CGPointMake(75.1, 11.6)]; @@ -238,10 +238,10 @@ + (void)drawEdit + (void)drawQuestion { - // Color Declarations + // Color declarations UIColor *color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; - // Questionmark Shape Drawing + // Question mark shape drawing UIBezierPath *questionShapePath = [[UIBezierPath alloc] init]; [questionShapePath moveToPoint: CGPointMake(33.75, 54.1)]; [questionShapePath addLineToPoint: CGPointMake(44.15, 54.1)]; diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index a1fb3a5..33ebf92 100755 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -3,14 +3,12 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2025 AnyKey Entertainment. All rights reserved. // -#if defined(__has_feature) && __has_feature(modules) -@import UIKit; -#else #import -#endif + +NS_ASSUME_NONNULL_BEGIN @class SCLTimerDisplay; @@ -18,8 +16,8 @@ typedef void (^SCLActionBlock)(void); typedef BOOL (^SCLValidationBlock)(void); -typedef NSDictionary* (^CompleteButtonFormatBlock)(void); -typedef NSDictionary* (^ButtonFormatBlock)(void); +typedef NSDictionary * _Nonnull (^CompleteButtonFormatBlock)(void); +typedef NSDictionary * _Nonnull (^ButtonFormatBlock)(void); // Action Types typedef NS_ENUM(NSInteger, SCLActionType) @@ -29,81 +27,109 @@ typedef NS_ENUM(NSInteger, SCLActionType) SCLBlock }; -/** Set button action type. - * - * Holds the button action type. +/** + Button action type. + + Indicates how the button should handle taps (selector-based or block-based). */ @property SCLActionType actionType; -/** Set action button block. - * - * TODO +/** + Action block executed when the button is tapped. + + @note Used when actionType == SCLBlock. */ -@property (copy, nonatomic) SCLActionBlock actionBlock; +@property (copy, nonatomic, nullable) SCLActionBlock actionBlock; + +/** + Validation block executed before the action. + + Return YES to allow dismissal and call the action block; NO to keep the alert visible. -/** Set Validation button block. - * - * Set one kind of validation and keeps the alert visible until the validation is successful + @note If provided and returns NO, the action is not executed and the alert remains visible. */ -@property (copy, nonatomic) SCLValidationBlock validationBlock; +@property (copy, nonatomic, nullable) SCLValidationBlock validationBlock; -/** Set Complete button format block. - * - * Holds the complete button format block. - * Support keys : backgroundColor, borderWidth, borderColor, textColor +/** + Complete button format block. + + Provides full button styling. + + Supported keys: + - backgroundColor (UIColor) + - borderWidth (NSNumber/CGFloat) + - borderColor (UIColor) + - textColor (UIColor) */ -@property (copy, nonatomic) CompleteButtonFormatBlock completeButtonFormatBlock; +@property (copy, nonatomic, nullable) CompleteButtonFormatBlock completeButtonFormatBlock; + +/** + Button format block. + + Provides button styling. -/** Set button format block. - * - * Holds the button format block. - * Support keys : backgroundColor, borderWidth, borderColor, textColor + Supported keys: + - backgroundColor (UIColor) + - borderWidth (NSNumber/CGFloat) + - borderColor (UIColor) + - textColor (UIColor) */ -@property (copy, nonatomic) ButtonFormatBlock buttonFormatBlock; +@property (copy, nonatomic, nullable) ButtonFormatBlock buttonFormatBlock; -/** Set SCLButton color. - * - * Set SCLButton color. +/** + Default background color for the button. + + @note UI_APPEARANCE_SELECTOR is supported. */ -@property (strong, nonatomic) UIColor *defaultBackgroundColor UI_APPEARANCE_SELECTOR; +@property (strong, nonatomic, nullable) UIColor *defaultBackgroundColor UI_APPEARANCE_SELECTOR; + +/** + Target for selector-based actions. -/** Set Target object. - * - * Target is an object that holds the information necessary to send a message to another object when an event occurs. + @note Used when actionType == SCLSelector. */ -@property id target; +@property (nullable) id target; + +/** + Selector to invoke on the target for selector-based actions. -/** Set selector id. - * - * A selector is the name used to select a method to execute for an object, - * or the unique identifier that replaces the name when the source code is compiled. + @note Used when actionType == SCLSelector. */ -@property SEL selector; +@property (nullable) SEL selector; -/** Parse button configuration - * - * Parse ButtonFormatBlock and CompleteButtonFormatBlock setting custom configuration. - * Set keys : backgroundColor, borderWidth, borderColor, textColor +/** + Applies configuration returned by a format block. + + @param buttonConfig The configuration dictionary. + @discussion Supported keys: backgroundColor, borderWidth, borderColor, textColor. */ - (void)parseConfig:(NSDictionary *)buttonConfig; -/** Set button timer. - * - * Holds the button timer, if present. +/** + Button timer (if present). + + Used to show countdown/progress on the button. */ -@property (strong, nonatomic) SCLTimerDisplay *timer; +@property (strong, nonatomic, nullable) SCLTimerDisplay *timer; -/** Init method - * +/** + Designated initializer for SCLButton. + + @param windowWidth The width of the alert window used to size the button. + @return An initialized SCLButton instance. */ - (instancetype)initWithWindowWidth:(CGFloat)windowWidth; -/** Adjust width of the button according to the width of the alert and - * the number of buttons. Only used when buttons are horizontally aligned. - * - * @param windowWidth The width of the alert. - * @param numberOfButtons The number of buttons in the alert. +/** + Adjusts the button width based on alert width and number of buttons. + + Only used when buttons are horizontally aligned. + + @param windowWidth The alert window width. + @param numberOfButtons Total number of buttons in the alert. */ - (void)adjustWidthWithWindowWidth:(CGFloat)windowWidth numberOfButtons:(NSUInteger)numberOfButtons; @end + +NS_ASSUME_NONNULL_END diff --git a/SCLAlertView/SCLButton.m b/SCLAlertView/SCLButton.m index 056ce0c..b4a966d 100755 --- a/SCLAlertView/SCLButton.m +++ b/SCLAlertView/SCLButton.m @@ -103,7 +103,9 @@ - (void)setDefaultBackgroundColor:(UIColor *)defaultBackgroundColor - (void)setTimer:(SCLTimerDisplay *)timer { _timer = timer; - [self addSubview:timer]; + if (!timer.superview) { + [self addSubview:timer]; + } [timer updateFrame:self.frame.size]; timer.color = self.titleLabel.textColor; } @@ -145,23 +147,25 @@ - (void)parseConfig:(NSDictionary *)buttonConfig - (UIColor *)darkerColorForColor:(UIColor *)color { CGFloat r, g, b, a; - if ([color getRed:&r green:&g blue:&b alpha:&a]) + if ([color getRed:&r green:&g blue:&b alpha:&a]) { return [UIColor colorWithRed:MAX(r - 0.2f, 0.0f) green:MAX(g - 0.2f, 0.0f) blue:MAX(b - 0.2f, 0.0f) alpha:a]; - return nil; + } + return color; } - (UIColor *)lighterColorForColor:(UIColor *)color { CGFloat r, g, b, a; - if ([color getRed:&r green:&g blue:&b alpha:&a]) + if ([color getRed:&r green:&g blue:&b alpha:&a]) { return [UIColor colorWithRed:MIN(r + 0.2f, 1.0f) green:MIN(g + 0.2f, 1.0f) blue:MIN(b + 0.2f, 1.0f) alpha:a]; - return nil; + } + return color; } @end diff --git a/SCLAlertView/SCLMacros.h b/SCLAlertView/SCLMacros.h index 1fec837..5d6be5d 100644 --- a/SCLAlertView/SCLMacros.h +++ b/SCLAlertView/SCLMacros.h @@ -3,21 +3,28 @@ // SCLAlertView // // Created by Diogo Autilio on 10/03/15. -// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2025 AnyKey Entertainment. All rights reserved. // #ifndef SCL_MACROS_H #define SCL_MACROS_H +// Create a UIColor from a 0xRRGGBB hex value (alpha is 1.0) #define UIColorFromHEX(rgbValue) [UIColor \ colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] +// Convert degrees to radians #define DEGREES_TO_RADIANS(degrees) ((M_PI * degrees)/ 180) + +// Timer granularity (seconds) used by internal animations/timers #define TIMER_STEP .01 + +// Starting angle offset (degrees) for circular drawings (e.g., timers) #define START_DEGREE_OFFSET -90 +// iOS version comparison helpers (string-based, e.g., @"14.0") #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) diff --git a/SCLAlertView/SCLSwitchView.h b/SCLAlertView/SCLSwitchView.h index ecc4d6c..469624b 100644 --- a/SCLAlertView/SCLSwitchView.h +++ b/SCLAlertView/SCLSwitchView.h @@ -3,21 +3,33 @@ // SCLAlertView // // Created by André Felipe Santos on 27/01/16. -// Copyright (c) 2016-2017 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2016-2025 AnyKey Entertainment. All rights reserved. // -#if defined(__has_feature) && __has_feature(modules) -@import UIKit; -#else #import -#endif +NS_ASSUME_NONNULL_BEGIN + +/** + A simple switch view with an optional label, configurable via UIAppearance. + */ @interface SCLSwitchView : UIView -@property (strong, nonatomic) UIColor *tintColor UI_APPEARANCE_SELECTOR; -@property (strong, nonatomic) UIColor *labelColor UI_APPEARANCE_SELECTOR; -@property (strong, nonatomic) UIFont *labelFont UI_APPEARANCE_SELECTOR; -@property (strong, nonatomic) NSString *labelText UI_APPEARANCE_SELECTOR; +/// Tint color for the switch (UIAppearance). +@property (strong, nonatomic, nullable) UIColor *tintColor UI_APPEARANCE_SELECTOR; + +/// Label color (UIAppearance). +@property (strong, nonatomic, nullable) UIColor *labelColor UI_APPEARANCE_SELECTOR; + +/// Label font (UIAppearance). +@property (strong, nonatomic, nullable) UIFont *labelFont UI_APPEARANCE_SELECTOR; + +/// Label text (UIAppearance). +@property (strong, nonatomic, nullable) NSString *labelText UI_APPEARANCE_SELECTOR; + +/// Selection state. @property (nonatomic, getter=isSelected) BOOL selected; @end + +NS_ASSUME_NONNULL_END diff --git a/SCLAlertView/SCLSwitchView.m b/SCLAlertView/SCLSwitchView.m index 93662ac..50addfc 100644 --- a/SCLAlertView/SCLSwitchView.m +++ b/SCLAlertView/SCLSwitchView.m @@ -9,6 +9,8 @@ #import "SCLSwitchView.h" #import "SCLMacros.h" +static const CGFloat kSpacing = 8.0f; + @interface SCLSwitchView () @property (strong, nonatomic) UISwitch *switchKnob; @@ -16,8 +18,6 @@ @interface SCLSwitchView () @end -#pragma mark - @implementation SCLSwitchView #pragma mark - Constructors @@ -56,38 +56,62 @@ - (instancetype)initWithFrame:(CGRect)frame - (void)setup { + self.backgroundColor = UIColor.clearColor; + // Add switch knob - self.switchKnob = [[UISwitch alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 0.0f, 0.f)]; + self.switchKnob = [[UISwitch alloc] initWithFrame:CGRectZero]; [self addSubview:self.switchKnob]; // Add switch label - CGFloat x, width, height; - x = self.switchKnob.frame.size.width + 8.0f; - width = self.frame.size.width - self.switchKnob.frame.size.width - 8.0f; - height = self.switchKnob.frame.size.height; - - self.switchLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, 0.0f, width, height)]; - - NSString *switchFontFamily = @"HelveticaNeue-Bold"; - CGFloat switchFontSize = 12.0f; - + self.switchLabel = [[UILabel alloc] initWithFrame:CGRectZero]; self.switchLabel.numberOfLines = 1; self.switchLabel.textAlignment = NSTextAlignmentLeft; self.switchLabel.lineBreakMode = NSLineBreakByTruncatingTail; self.switchLabel.adjustsFontSizeToFitWidth = YES; self.switchLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters; self.switchLabel.minimumScaleFactor = 0.5f; - self.switchLabel.font = [UIFont fontWithName:switchFontFamily size:switchFontSize]; + self.switchLabel.font = [UIFont fontWithName:@"HelveticaNeue-Bold" size:12.0f]; self.switchLabel.textColor = UIColorFromHEX(0x4D4D4D); [self addSubview:self.switchLabel]; } +#pragma mark - Layout + +- (CGSize)sizeThatFits:(CGSize)size { + CGSize switchSize = self.switchKnob.intrinsicContentSize; + CGFloat availableWidth = (size.width > 0 ? size.width : (switchSize.width + kSpacing + 120.0f)); // fallback width + CGFloat labelWidth = MAX(0, availableWidth - switchSize.width - kSpacing); + CGSize labelSize = [self.switchLabel sizeThatFits:CGSizeMake(labelWidth, CGFLOAT_MAX)]; + CGFloat height = MAX(labelSize.height, switchSize.height); + return CGSizeMake(availableWidth, height); +} + +- (void)layoutSubviews { + [super layoutSubviews]; + + CGSize boundsSize = self.bounds.size; + CGSize switchSize = self.switchKnob.intrinsicContentSize; + + // Place switch at leading (x=0) + CGFloat switchX = 0.0f; + CGFloat switchY = (boundsSize.height - switchSize.height) / 2.0f; + self.switchKnob.frame = CGRectMake(switchX, switchY, switchSize.width, switchSize.height); + + // Label fills remaining space after switch + spacing + CGFloat labelX = CGRectGetMaxX(self.switchKnob.frame) + kSpacing; + CGFloat labelWidth = MAX(0, boundsSize.width - labelX); + CGSize labelFit = [self.switchLabel sizeThatFits:CGSizeMake(labelWidth, CGFLOAT_MAX)]; + CGFloat labelHeight = MIN(labelFit.height, boundsSize.height); + CGFloat labelY = (boundsSize.height - labelHeight) / 2.0f; + self.switchLabel.frame = CGRectMake(labelX, labelY, labelWidth, labelHeight); +} + #pragma mark - Getters - (UIColor *)tintColor { - return self.switchKnob.tintColor; + return self.switchKnob.onTintColor; } - (UIColor *)labelColor @@ -114,6 +138,7 @@ - (BOOL)isSelected - (void)setTintColor:(UIColor *)tintColor { + [super setTintColor:tintColor]; self.switchKnob.onTintColor = tintColor; } @@ -125,11 +150,13 @@ - (void)setLabelColor:(UIColor *)labelColor - (void)setLabelFont:(UIFont *)labelFont { self.switchLabel.font = labelFont; + [self setNeedsLayout]; } - (void)setLabelText:(NSString *)labelText { self.switchLabel.text = labelText; + [self setNeedsLayout]; } - (void)setSelected:(BOOL)selected diff --git a/SCLAlertView/SCLTextView.h b/SCLAlertView/SCLTextView.h index e691ef8..4cb4b65 100644 --- a/SCLAlertView/SCLTextView.h +++ b/SCLAlertView/SCLTextView.h @@ -3,15 +3,17 @@ // SCLAlertView // // Created by Diogo Autilio on 9/18/15. -// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2025 AnyKey Entertainment. All rights reserved. // -#if defined(__has_feature) && __has_feature(modules) -@import UIKit; -#else #import -#endif -@interface SCLTextView : UITextField +NS_ASSUME_NONNULL_BEGIN +/** + A UITextField subclass used by SCLAlertView for consistent styling and behavior. + */ +@interface SCLTextView : UITextField @end + +NS_ASSUME_NONNULL_END diff --git a/SCLAlertView/SCLTextView.m b/SCLAlertView/SCLTextView.m index c508359..067e1b6 100644 --- a/SCLAlertView/SCLTextView.m +++ b/SCLAlertView/SCLTextView.m @@ -8,49 +8,77 @@ #import "SCLTextView.h" -#define MIN_HEIGHT 30.0f +static const CGFloat kSCLTextViewHeight = 35.0f; +static const CGFloat kSCLTextViewHorizontalPadding = 8.0f; @implementation SCLTextView -- (instancetype)init -{ +- (instancetype)init { self = [super init]; - if (self) - { + if (self) { [self setup]; } return self; } -- (instancetype)initWithCoder:(NSCoder *)aDecoder -{ - self = [super initWithCoder:aDecoder]; - if(self) - { +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { [self setup]; } return self; } -- (instancetype)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) - { +- (instancetype)initWithCoder:(NSCoder *)coder { + self = [super initWithCoder:coder]; + if (self) { [self setup]; } return self; } -- (void)setup -{ - self.frame = CGRectMake(0.0f, 0.0f, 0.0f, MIN_HEIGHT); - self.returnKeyType = UIReturnKeyDone; +- (void)setup { + self.backgroundColor = [UIColor whiteColor]; + self.textColor = [UIColor darkTextColor]; self.borderStyle = UITextBorderStyleRoundedRect; - self.autocapitalizationType = UITextAutocapitalizationTypeSentences; self.clearButtonMode = UITextFieldViewModeWhileEditing; - self.layer.masksToBounds = YES; - self.layer.borderWidth = 1.0f; + self.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; + self.autocorrectionType = UITextAutocorrectionTypeDefault; + self.autocapitalizationType = UITextAutocapitalizationTypeSentences; + self.returnKeyType = UIReturnKeyDone; + + // Padding interno via left/right views + UIView *leftPad = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kSCLTextViewHorizontalPadding, 1)]; + UIView *rightPad = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kSCLTextViewHorizontalPadding, 1)]; + self.leftView = leftPad; + self.leftViewMode = UITextFieldViewModeAlways; + self.rightView = rightPad; + self.rightViewMode = UITextFieldViewModeAlways; + + // Altura mínima padrão + CGRect f = self.frame; + if (CGRectIsEmpty(f)) { + f = CGRectMake(0, 0, 0, kSCLTextViewHeight); + } else { + f.size.height = MAX(f.size.height, kSCLTextViewHeight); + } + self.frame = f; +} + +- (CGSize)intrinsicContentSize { + CGSize base = [super intrinsicContentSize]; + if (base.height <= 0) { + base.height = kSCLTextViewHeight; + } else { + base.height = MAX(base.height, kSCLTextViewHeight); + } + return base; +} + +- (CGSize)sizeThatFits:(CGSize)size { + CGSize fit = [super sizeThatFits:size]; + fit.height = MAX(fit.height, kSCLTextViewHeight); + return fit; } @end diff --git a/SCLAlertView/SCLTimerDisplay.h b/SCLAlertView/SCLTimerDisplay.h index 2f9bc18..0f90f60 100644 --- a/SCLAlertView/SCLTimerDisplay.h +++ b/SCLAlertView/SCLTimerDisplay.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Taylor Ryan on 8/18/15. -// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2015-2025 AnyKey Entertainment. All rights reserved. // // Taken from https://stackoverflow.com/questions/11783439/uibutton-with-timer @@ -22,18 +22,81 @@ CGFloat lineWidth; NSTimer *timer; SCLActionBlock completedBlock; + + // Precision/state + CFTimeInterval startTime; + CFTimeInterval pausedElapsed; + BOOL running; } +/// Current angle (in degrees or radians depending on implementation). @property CGFloat currentAngle; + +/// Index of the button this timer is attached to. @property NSInteger buttonIndex; + +/// Stroke color for the circular timer. @property (strong, nonatomic) UIColor *color; + +/// If YES, timer runs in reverse (countdown). @property (assign, nonatomic) BOOL reverse; +/** + Initializes a circular timer view. + + @param origin The origin point for the view. + @param r The radius of the circular timer. + @return An initialized SCLTimerDisplay instance. + */ - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r; + +/** + Initializes a circular timer view with custom line width. + + @param origin The origin point for the view. + @param r The radius of the circular timer. + @param width The stroke line width. + @return An initialized SCLTimerDisplay instance. + */ - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFloat)width; + +/** + Updates the frame/layout of the timer to fit a given size. + + @param size The new size to fit. + */ - (void)updateFrame:(CGSize)size; + +/** + Cancels and removes the timer, preventing completion from firing. + */ - (void)cancelTimer; + +/** + Stops the timer without removing the view. + */ - (void)stopTimer; + +/** + Starts the timer with a time limit. + + @param tl The time limit in seconds. + @param completed A block called when the timer completes. + */ - (void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed; +/** + Pauses the timer. + + @note Kept for API compatibility; optional usage. + */ +- (void)pauseTimer; + +/** + Resumes the timer after a pause. + + @note Kept for API compatibility; optional usage. + */ +- (void)resumeTimer; + @end diff --git a/SCLAlertView/SCLTimerDisplay.m b/SCLAlertView/SCLTimerDisplay.m index 6921e81..47a99c2 100644 --- a/SCLAlertView/SCLTimerDisplay.m +++ b/SCLAlertView/SCLTimerDisplay.m @@ -11,6 +11,8 @@ @interface SCLTimerDisplay () +// Centered numeric readout for elapsed/remaining seconds. +// Kept as a subview to benefit from UILabel accessibility and text rendering. @property (strong, nonatomic) UILabel *countLabel; @end @@ -26,6 +28,9 @@ - (instancetype)initWithFrame:(CGRect)frame { self.backgroundColor = [UIColor clearColor]; currentAngle = 0.0f; + _color = [UIColor whiteColor]; + running = NO; + pausedElapsed = 0; } return self; } @@ -41,25 +46,50 @@ - (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFl if (self) { self.backgroundColor = [UIColor clearColor]; currentAngle = START_DEGREE_OFFSET; + // Draw from the center of the stroke; subtract half line width from the radius to avoid clipping radius = r-(width/2); lineWidth = width; self.color = [UIColor whiteColor]; self.userInteractionEnabled = NO; - // Add count label + // Lightweight numeric HUD in the middle of the ring _countLabel = [[UILabel alloc] init]; _countLabel.textColor = [UIColor whiteColor]; _countLabel.backgroundColor = [UIColor clearColor]; _countLabel.font = [UIFont fontWithName: @"HelveticaNeue-Bold" size:12.0f]; _countLabel.textAlignment = NSTextAlignmentCenter; _countLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + _countLabel.isAccessibilityElement = YES; + _countLabel.accessibilityTraits = UIAccessibilityTraitUpdatesFrequently; [self addSubview:_countLabel]; } return self; } +- (void)dealloc +{ + [self cancelTimer]; +} + +- (void)willMoveToSuperview:(UIView *)newSuperview +{ + if (newSuperview == nil) { + // Prevent orphaned timers when the view leaves the hierarchy + [self cancelTimer]; + } + [super willMoveToSuperview:newSuperview]; +} + +- (void)setColor:(UIColor *)color +{ + _color = color ?: [UIColor whiteColor]; + _countLabel.textColor = _color; + [self setNeedsDisplay]; +} + - (void)updateFrame:(CGSize)size { + // Position the ring in the trailing edge with a small inset; keep label centered CGFloat r = radius+(lineWidth/2); CGFloat originX = size.width - (2*r) - 5; @@ -71,6 +101,7 @@ - (void)updateFrame:(CGSize)size - (void)drawRect:(CGRect)rect { + // Draw progress ring from START_DEGREE_OFFSET to currentAngle UIBezierPath* aPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(radius+(lineWidth/2), radius+(lineWidth/2)) radius:radius startAngle:DEGREES_TO_RADIANS(START_DEGREE_OFFSET) @@ -80,54 +111,126 @@ - (void)drawRect:(CGRect)rect aPath.lineWidth = lineWidth; [aPath stroke]; - _countLabel.text = [NSString stringWithFormat:@"%d", (int)currentTime]; + // Keep the numeric text aligned with the mode: + // - reverse: countdown shows remaining seconds + // - forward: count-up shows elapsed seconds + if (_reverse) { + int remaining = MAX((int)ceil(timerLimit - currentTime), 0); + _countLabel.text = [NSString stringWithFormat:@"%d", remaining]; + _countLabel.accessibilityLabel = [NSString stringWithFormat:@"%d seconds remaining", remaining]; + } else { + int elapsed = MIN((int)floor(currentTime), (int)ceil(timerLimit)); + _countLabel.text = [NSString stringWithFormat:@"%d", elapsed]; + _countLabel.accessibilityLabel = [NSString stringWithFormat:@"%d seconds elapsed", elapsed]; + } } - (void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed { - if (_reverse) - { - currentTime = tl; - } - timerLimit = tl; - timer = [NSTimer scheduledTimerWithTimeInterval:TIMER_STEP target:self selector:@selector(updateTimerButton:) userInfo:nil repeats:YES]; - completedBlock = completed; + [self cancelTimer]; // Reset prior state and invalidate any running NSTimer + + timerLimit = MAX(0, tl); + // Use a single notion of time for simplicity: currentTime is "elapsed" regardless of mode + currentTime = 0.0; + currentAngle = START_DEGREE_OFFSET; + completedBlock = [completed copy]; _countLabel.textColor = _color; + + pausedElapsed = 0; + startTime = CACurrentMediaTime(); + running = YES; + + __weak typeof(self) weakSelf = self; + // Block-based NSTimer avoids needing a selector and reduces boilerplate; weakSelf prevents retain cycles + timer = [NSTimer scheduledTimerWithTimeInterval:TIMER_STEP repeats:YES block:^(NSTimer * _Nonnull t) { + [weakSelf updateTimerTick]; + }]; + // Common run loop modes keep the ring responsive while the UI is interacting (e.g., scrolling) + [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; + + [self setNeedsDisplay]; +} + +- (void)updateTimerTick +{ + if (!running) { return; } + + CFTimeInterval now = CACurrentMediaTime(); + CFTimeInterval elapsedSinceStart = now - startTime + pausedElapsed; + + // Clamp elapsed to the limit to stabilize the label at the end boundary + currentTime = MIN(elapsedSinceStart, timerLimit); + + if (_reverse) { + // Countdown visualization: arc shrinks from full circle to zero + CGFloat timeRemaining = MAX(timerLimit - elapsedSinceStart, 0.0); + CGFloat fractionRemaining = (timerLimit <= 0.0) ? 0.0 : (timeRemaining / timerLimit); + fractionRemaining = MIN(MAX(fractionRemaining, 0.0), 1.0); + // Map remaining fraction to end angle so the visible arc length is proportional to remaining time + currentAngle = (fractionRemaining * 360.0) + START_DEGREE_OFFSET; + } else { + // Count-up visualization: arc grows from zero to full circle + CGFloat fractionDone = (timerLimit <= 0.0) ? 1.0 : (elapsedSinceStart / timerLimit); + fractionDone = MIN(MAX(fractionDone, 0.0), 1.0); + currentAngle = (fractionDone * 360.0) + START_DEGREE_OFFSET; + } + + // Stop precisely at the limit to avoid overshooting due to timer granularity + BOOL finished = (elapsedSinceStart >= timerLimit); + if (finished) { + [self stopTimer]; + return; + } + [self setNeedsDisplay]; } - (void)cancelTimer { - [timer invalidate]; + running = NO; + if (timer) { + [timer invalidate]; + timer = nil; + } } - (void)stopTimer { - [timer invalidate]; + [self cancelTimer]; if (completedBlock != nil) { - completedBlock(); + // Copy to local before clearing to avoid re-entrancy surprises in user code + SCLActionBlock block = completedBlock; + completedBlock = nil; + block(); } } -- (void)updateTimerButton:(NSTimer *)timer +- (void)pauseTimer { - if (_reverse) - { - currentTime -= TIMER_STEP; - currentAngle = (currentTime/timerLimit) * 360 + START_DEGREE_OFFSET; - - if(currentTime <= 0) { - [self stopTimer]; - } + if (!running) return; + running = NO; + CFTimeInterval now = CACurrentMediaTime(); + // Accumulate elapsed time so resume continues from the correct point + pausedElapsed += (now - startTime); + if (timer) { + [timer setFireDate:[NSDate distantFuture]]; } - else { - currentTime += TIMER_STEP; - currentAngle = (currentTime/timerLimit) * 360 + START_DEGREE_OFFSET; +} - if(currentAngle >= (360 + START_DEGREE_OFFSET)) { - [self stopTimer]; - } +- (void)resumeTimer +{ + if (running || timerLimit <= 0) return; + running = YES; + // Restart time base; pausedElapsed carries the previous progress + startTime = CACurrentMediaTime(); + if (timer) { + [timer setFireDate:[NSDate date]]; + } else { + __weak typeof(self) weakSelf = self; + timer = [NSTimer scheduledTimerWithTimeInterval:TIMER_STEP repeats:YES block:^(NSTimer * _Nonnull t) { + [weakSelf updateTimerTick]; + }]; + [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; } - [self setNeedsDisplay]; } @end diff --git a/SCLAlertViewExample/Category/UIViewController+Alert.m b/SCLAlertViewExample/Category/UIViewController+Alert.m index ecb3b22..c56ddf9 100644 --- a/SCLAlertViewExample/Category/UIViewController+Alert.m +++ b/SCLAlertViewExample/Category/UIViewController+Alert.m @@ -3,13 +3,15 @@ // SCLAlertView // // Created by Diogo Autilio on 31/10/20. -// Copyright © 2020 AnyKey Entertainment. All rights reserved. +// Copyright © 2020-2025 AnyKey Entertainment. All rights reserved. // #import "UIViewController+Alert.h" @implementation UIViewController (Alert) +#pragma mark - Alerts + - (void)showAlertWithTitle:(NSString *)title message:(NSString *)message actionBlock:(nullable ActionBlock)actionBlock { UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title diff --git a/SCLAlertViewExample/ViewController/ViewController.m b/SCLAlertViewExample/ViewController/ViewController.m index cdb1128..d5811e6 100644 --- a/SCLAlertViewExample/ViewController/ViewController.m +++ b/SCLAlertViewExample/ViewController/ViewController.m @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Diogo Autilio on 9/26/14. -// Copyright (c) 2014-2016 AnyKey Entertainment. All rights reserved. +// Copyright (c) 2014-2025 AnyKey Entertainment. All rights reserved. // #import "ViewController.h" @@ -11,9 +11,9 @@ #import "UIViewController+Alert.h" @interface ViewController () - @end +// MARK: Constants NSString *kSuccessTitle = @"Congratulations"; NSString *kErrorTitle = @"Connection error"; NSString *kNoticeTitle = @"Notice"; @@ -25,6 +25,8 @@ @interface ViewController () @implementation ViewController +#pragma mark - Success + - (IBAction)showSuccess:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; @@ -34,12 +36,10 @@ - (IBAction)showSuccess:(id)sender button.buttonFormatBlock = ^NSDictionary* (void) { NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; - buttonConfig[@"backgroundColor"] = [UIColor whiteColor]; buttonConfig[@"textColor"] = [UIColor blackColor]; buttonConfig[@"borderWidth"] = @2.0f; buttonConfig[@"borderColor"] = [UIColor greenColor]; - return buttonConfig; }; @@ -52,7 +52,8 @@ - (IBAction)showSuccess:(id)sender [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } -- (IBAction)showSuccessWithHorizontalButtons:(id)sender { +- (IBAction)showSuccessWithHorizontalButtons:(id)sender +{ SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; [alert setHorizontalButtons:YES]; @@ -61,12 +62,10 @@ - (IBAction)showSuccessWithHorizontalButtons:(id)sender { button.buttonFormatBlock = ^NSDictionary* (void) { NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; - buttonConfig[@"backgroundColor"] = [UIColor whiteColor]; buttonConfig[@"textColor"] = [UIColor blackColor]; buttonConfig[@"borderWidth"] = @2.0f; buttonConfig[@"borderColor"] = [UIColor greenColor]; - return buttonConfig; }; @@ -79,30 +78,42 @@ - (IBAction)showSuccessWithHorizontalButtons:(id)sender { [alert showSuccess:kSuccessTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } +#pragma mark - Error + - (IBAction)showError:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - [alert showError:self title:@"An error with two title is presented ..." + [alert showError:self + title:@"An error with two title is presented ..." subTitle:@"You have not saved your Submission yet. Please save the Submission before accessing the Responses list. Blah de blah de blah, blah. Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, blah.Blah de blah de blah, End." - closeButtonTitle:@"OK" duration:0.0f]; + closeButtonTitle:@"OK" + duration:0.0f]; } +#pragma mark - Notice + - (IBAction)showNotice:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - alert.backgroundType = SCLAlertViewBackgroundBlur; - [alert showNotice:self title:kNoticeTitle subTitle:@"You've just displayed this awesome Pop Up View with blur effect" closeButtonTitle:kButtonTitle duration:0.0f]; + [alert showNotice:self + title:kNoticeTitle + subTitle:@"You've just displayed this awesome Pop Up View with blur effect" + closeButtonTitle:kButtonTitle + duration:0.0f]; } +#pragma mark - Warning + - (IBAction)showWarning:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - [alert showWarning:self title:kWarningTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } +#pragma mark - Info + - (IBAction)showInfo:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -115,6 +126,8 @@ - (IBAction)showInfo:(id)sender [alert showInfo:self title:kInfoTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } +#pragma mark - Edit + - (IBAction)showEdit:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -141,6 +154,8 @@ - (IBAction)showEditWithHorizontalButtons:(id)sender [alert showEdit:self title:kInfoTitle subTitle:kSubtitle closeButtonTitle:kButtonTitle duration:0.0f]; } +#pragma mark - Advanced + - (IBAction)showAdvanced:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -166,18 +181,16 @@ - (IBAction)showAdvanced:(id)sender alert.completeButtonFormatBlock = ^NSDictionary* (void) { NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; - buttonConfig[@"backgroundColor"] = [UIColor greenColor]; buttonConfig[@"borderColor"] = [UIColor blackColor]; buttonConfig[@"borderWidth"] = @"1.0f"; buttonConfig[@"textColor"] = [UIColor blackColor]; - return buttonConfig; }; alert.attributedFormatBlock = ^NSAttributedString* (NSString *value) { - NSMutableAttributedString *subTitle = [[NSMutableAttributedString alloc]initWithString:value]; + NSMutableAttributedString *subTitle = [[NSMutableAttributedString alloc] initWithString:value]; NSRange redRange = [value rangeOfString:@"Attributed" options:NSCaseInsensitiveSearch]; [subTitle addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:redRange]; @@ -220,18 +233,16 @@ - (IBAction)ShowAdvancedWithHorizontalButtons:(id)sender alert.completeButtonFormatBlock = ^NSDictionary* (void) { NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; - buttonConfig[@"backgroundColor"] = [UIColor greenColor]; buttonConfig[@"borderColor"] = [UIColor blackColor]; buttonConfig[@"borderWidth"] = @"1.0f"; buttonConfig[@"textColor"] = [UIColor blackColor]; - return buttonConfig; }; alert.attributedFormatBlock = ^NSAttributedString* (NSString *value) { - NSMutableAttributedString *subTitle = [[NSMutableAttributedString alloc]initWithString:value]; + NSMutableAttributedString *subTitle = [[NSMutableAttributedString alloc] initWithString:value]; NSRange redRange = [value rangeOfString:@"Attributed" options:NSCaseInsensitiveSearch]; [subTitle addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:redRange]; @@ -248,13 +259,16 @@ - (IBAction)ShowAdvancedWithHorizontalButtons:(id)sender [alert showTitle:self title:@"Congratulations" subTitle:kAttributeTitle style:SCLAlertViewStyleSuccess closeButtonTitle:@"Done" duration:0.0f]; } +#pragma mark - Duration + - (IBAction)showWithDuration:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - [alert showNotice:self title:kNoticeTitle subTitle:@"You've just displayed this awesome Pop Up View with 5 seconds duration" closeButtonTitle:nil duration:5.0f]; } +#pragma mark - Custom + - (IBAction)showCustom:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -263,6 +277,8 @@ - (IBAction)showCustom:(id)sender [alert showCustom:self image:[UIImage imageNamed:@"git"] color:color title:@"Custom" subTitle:@"Add a custom icon and color for your own type of alert!" closeButtonTitle:@"OK" duration:0.0f]; } +#pragma mark - Validation + - (IBAction)showValidation:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; @@ -380,37 +396,48 @@ - (IBAction)showValidationWithHorizontalButtons:(id)sender [alert showEdit:self title:@"Validation" subTitle:@"Ensure the data is correct before dismissing!" closeButtonTitle:@"Cancel" duration:0]; } +#pragma mark - Waiting + - (IBAction)showWaiting:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; alert.showAnimationType = SCLAlertViewShowAnimationSlideInToCenter; alert.hideAnimationType = SCLAlertViewHideAnimationSlideOutFromCenter; - alert.backgroundType = SCLAlertViewBackgroundTransparent; - [alert showWaiting:self title:@"Waiting..." - subTitle:@"You've just displayed this awesome Pop Up View with transparent background" - closeButtonTitle:nil duration:5.0f]; + [alert showWaiting:self + title:@"Waiting..." + subTitle:@"You've just displayed this awesome Pop Up View with transparent background" + closeButtonTitle:nil + duration:5.0f]; } +#pragma mark - Timer + - (IBAction)showTimer:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; [alert addTimerToButtonIndex:0 reverse:YES]; - [alert showInfo:self title:@"Countdown Timer" - subTitle:@"This alert has a duration set, and a countdown timer on the Dismiss button to show how long is left." - closeButtonTitle:@"Dismiss" duration:10.0f]; + [alert showInfo:self + title:@"Countdown Timer" + subTitle:@"This alert has a duration set, and a countdown timer on the Dismiss button to show how long is left." + closeButtonTitle:@"Dismiss" + duration:10.0f]; } +#pragma mark - Question + - (IBAction)showQuestion:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] init]; - [alert showQuestion:self title:@"Question?" subTitle:kSubtitle closeButtonTitle:@"Dismiss" duration:0.0f]; } -- (IBAction)showSwitch:(id)sender { +#pragma mark - Switch + +- (IBAction)showSwitch:(id)sender +{ SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; alert.tintTopCircle = NO; alert.iconTintColor = [UIColor brownColor]; @@ -421,38 +448,37 @@ - (IBAction)showSwitch:(id)sender { [[SCLSwitchView appearance] setTintColor:[UIColor brownColor]]; SCLButton *button = [alert addButton:@"Done" target:self selector:@selector(firstButton)]; - button.buttonFormatBlock = ^NSDictionary* (void) { NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; buttonConfig[@"cornerRadius"] = @"17.5f"; - return buttonConfig; }; [alert showCustom:self image:[UIImage imageNamed:@"switch"] color:[UIColor brownColor] title:kInfoTitle subTitle:kSubtitle closeButtonTitle:nil duration:0.0f]; } +#pragma mark - Actions + - (void)firstButton { NSLog(@"First button tapped"); } +#pragma mark - Custom Button + - (IBAction)showWithButtonCustom:(id)sender { SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow]; SCLButton *button = [alert addButton:@"First Button" target:self selector:@selector(firstButton)]; - button.buttonFormatBlock = ^NSDictionary* (void) { NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init]; - buttonConfig[@"backgroundColor"] = [UIColor whiteColor]; buttonConfig[@"textColor"] = [UIColor blackColor]; buttonConfig[@"borderWidth"] = @2.0f; buttonConfig[@"borderColor"] = [UIColor greenColor]; buttonConfig[@"font"] = [UIFont fontWithName:@"ComicSansMS" size:13]; - return buttonConfig; }; diff --git a/SCLAlertViewFramework/SCLAlertViewFramework.h b/SCLAlertViewFramework/SCLAlertViewFramework.h index 5981fc4..e4576ca 100644 --- a/SCLAlertViewFramework/SCLAlertViewFramework.h +++ b/SCLAlertViewFramework/SCLAlertViewFramework.h @@ -3,7 +3,7 @@ // SCLAlertView // // Created by Eugene Tulusha on 9/13/16. -// Copyright © 2016 AnyKey Entertainment. All rights reserved. +// Copyright © 2016-2025 AnyKey Entertainment. All rights reserved. // @import Foundation; From 140688346b6d320447f39bb59a903464a144fc20 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Fri, 10 Oct 2025 11:39:24 -0300 Subject: [PATCH 239/250] Replace old mise file with the new pattern --- .tool-versions | 1 - mise.toml | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 .tool-versions create mode 100644 mise.toml diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index 0b2d858..0000000 --- a/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -ruby 3.1.2 diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..fc4993b --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +ruby = "3.1.2" From 366426d0461d781502e411d931513537083cbe7d Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sat, 25 Oct 2025 07:54:34 -0300 Subject: [PATCH 240/250] fix: documentation language --- SCLAlertView/SCLAlertViewResponder.h | 8 ++++---- SCLAlertView/SCLTextView.m | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SCLAlertView/SCLAlertViewResponder.h b/SCLAlertView/SCLAlertViewResponder.h index 31c438b..148a1fc 100644 --- a/SCLAlertView/SCLAlertViewResponder.h +++ b/SCLAlertView/SCLAlertViewResponder.h @@ -11,16 +11,16 @@ @interface SCLAlertViewResponder : NSObject -/// Inicializa o responder vinculado a uma instância de SCLAlertView. +/// Initializes the responder associated with an instance of SCLAlertView. - (instancetype)init:(SCLAlertView *)alertview; -/// Atualiza o título do alerta. +/// Updates the alert's title. - (void)setTitle:(NSString *)title; -/// Atualiza o subtítulo/texto do corpo do alerta. +/// Updates the alert's subtitle / body text. - (void)setSubTitle:(NSString *)subTitle; -/// Fecha o alerta. +/// Closes the alert. - (void)close; @end diff --git a/SCLAlertView/SCLTextView.m b/SCLAlertView/SCLTextView.m index 067e1b6..8fa0271 100644 --- a/SCLAlertView/SCLTextView.m +++ b/SCLAlertView/SCLTextView.m @@ -47,7 +47,7 @@ - (void)setup { self.autocapitalizationType = UITextAutocapitalizationTypeSentences; self.returnKeyType = UIReturnKeyDone; - // Padding interno via left/right views + // Internal padding via left/right views UIView *leftPad = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kSCLTextViewHorizontalPadding, 1)]; UIView *rightPad = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kSCLTextViewHorizontalPadding, 1)]; self.leftView = leftPad; @@ -55,7 +55,7 @@ - (void)setup { self.rightView = rightPad; self.rightViewMode = UITextFieldViewModeAlways; - // Altura mínima padrão + // Default minimum height CGRect f = self.frame; if (CGRectIsEmpty(f)) { f = CGRectMake(0, 0, 0, kSCLTextViewHeight); From 4f11ae68a5cef2065068ab3af84ed9af195c7742 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 26 Oct 2025 08:53:12 -0300 Subject: [PATCH 241/250] feat: add SPM support --- .gitignore | 9 +++------ Package.swift | 26 ++++++++++++++++++++++++++ SCLAlertView/SCLAlertView.h | 10 ++++++++++ SCLAlertView/SCLAlertView.m | 34 +++++++++++++++++++++++++++++----- 4 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 Package.swift diff --git a/.gitignore b/.gitignore index fd94552..eda364b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,10 +21,7 @@ DerivedData *.ipa *.xcuserstate -# CocoaPods +# SPM # -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# -# Pods/ +.build/ +Derived/ diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..5e1b66d --- /dev/null +++ b/Package.swift @@ -0,0 +1,26 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "SCLAlertView-Objective-C", + platforms: [ + .iOS(.v12) + ], + products: [ + .library( + name: "SCLAlertView-Objective-C", + type: .dynamic, + targets: ["SCLAlertView-Objective-C"] + ) + ], + targets: [ + .target( + name: "SCLAlertView-Objective-C", + path: "SCLAlertView", + publicHeadersPath: ".", + cSettings: [ + .headerSearchPath("."), + ] + ) + ] +) diff --git a/SCLAlertView/SCLAlertView.h b/SCLAlertView/SCLAlertView.h index 084fd1f..2b88841 100755 --- a/SCLAlertView/SCLAlertView.h +++ b/SCLAlertView/SCLAlertView.h @@ -155,6 +155,16 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground) */ - (instancetype)initWithNewWindow; +/** + Creates and returns a new alert configured to present in its own UIWindow. + + This convenience constructor is equivalent to [[SCLAlertView alloc] initWithNewWindow]. + + @return A newly created SCLAlertView instance ready to be shown in a dedicated window. + @note In Swift, use SCLAlertView.newWindow() due to NS_SWIFT_NAME(newWindow()). + */ ++ (instancetype)alertWithNewWindow NS_SWIFT_NAME(newWindow()); + /** Initializes an alert presented in a new UIWindow with custom width. diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 409d956..59e4198 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -122,6 +122,11 @@ - (instancetype)initWithNewWindow return self; } ++ (instancetype)alertWithNewWindow +{ + return [[self alloc] initWithNewWindow]; +} + - (instancetype)initWithNewWindowWidth:(CGFloat)windowWidth { self = [self initWithWindowWidth:windowWidth]; @@ -261,15 +266,34 @@ - (void)setupViewWindowWidth:(CGFloat)windowWidth - (void)setupNewWindow { - // Save previous window + // Preserve the current key window to restore it after dismissing the alert self.previousWindow = [SCLAlertView scl_currentKeyWindow]; - - // Create a new one to show the alert + + // Create a dedicated window to host the alert UIWindow *alertWindow = [[UIWindow alloc] initWithFrame:[self mainScreenFrame]]; alertWindow.windowLevel = UIWindowLevelAlert; alertWindow.backgroundColor = [UIColor clearColor]; alertWindow.rootViewController = [UIViewController new]; alertWindow.accessibilityViewIsModal = YES; + + // On iOS 13+, explicitly attach the alert window to the active UIWindowScene + if (@available(iOS 13.0, *)) { + // Try to reuse the scene from the current key window, if available + UIWindow *key = [SCLAlertView scl_currentKeyWindow]; + if (key.windowScene != nil) { + alertWindow.windowScene = key.windowScene; + } else { + // Fallback: iterate through connected scenes and pick a foreground active UIWindowScene + for (UIScene *scene in UIApplication.sharedApplication.connectedScenes) { + if (scene.activationState == UISceneActivationStateForegroundActive && + [scene isKindOfClass:[UIWindowScene class]]) { + alertWindow.windowScene = (UIWindowScene *)scene; + break; + } + } + } + } + self.SCLAlertWindow = alertWindow; self.usingNewWindow = YES; } @@ -1333,7 +1357,7 @@ - (void)hideView if (_usingNewWindow) { - // Restore previous window + // Restore the previous key window after hiding the alert [self.previousWindow makeKeyAndVisible]; self.previousWindow = nil; } @@ -1364,7 +1388,7 @@ - (void)fadeOutWithDuration:(NSTimeInterval)duration [self removeFromParentViewController]; if (self.usingNewWindow) { - // Remove current window + // Remove current alert window [self.SCLAlertWindow setHidden:YES]; self.SCLAlertWindow = nil; } From c18408f82f168d42cf72b2c0c95095f72f3ba730 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 26 Oct 2025 19:06:18 -0300 Subject: [PATCH 242/250] chore: use mise in the CI --- .github/workflows/Build.yml | 9 ++++++++- .ruby-version | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) delete mode 100644 .ruby-version diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index d55e0a1..94a64be 100755 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -7,10 +7,17 @@ jobs: runs-on: macos-13 steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Xcode version uses: maxim-lobanov/setup-xcode@v1.6.0 with: xcode-version: 15.0.1 + + - name: Install Project Tools + uses: jdx/mise-action@v3 + with: + experimental: true + - name: Building iOS app run: exec ./.github/scripts/build_app.sh diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index ef538c2..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.1.2 From a175d5cb738c6190dc90f90f7748d279168b9d24 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Mon, 27 Oct 2025 10:27:07 -0300 Subject: [PATCH 243/250] Bump version to 1.4.0 --- 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 deda426..55667ad 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 = "1.3.1" + spec.version = "1.4.0" 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" From 3f29ee4bb0516fc5fc801b8484845fd632c6d2c3 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 28 Oct 2025 18:54:06 -0300 Subject: [PATCH 244/250] fix: remove hyphens from product name for better SPM/device compatibility --- Package.swift | 8 ++++---- SCLAlertView-Objective-C.podspec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index 5e1b66d..d7583bf 100644 --- a/Package.swift +++ b/Package.swift @@ -2,20 +2,20 @@ import PackageDescription let package = Package( - name: "SCLAlertView-Objective-C", + name: "SCLAlertViewObjC", platforms: [ .iOS(.v12) ], products: [ .library( - name: "SCLAlertView-Objective-C", + name: "SCLAlertViewObjC", type: .dynamic, - targets: ["SCLAlertView-Objective-C"] + targets: ["SCLAlertViewObjC"] ) ], targets: [ .target( - name: "SCLAlertView-Objective-C", + name: "SCLAlertViewObjC", path: "SCLAlertView", publicHeadersPath: ".", cSettings: [ diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index 55667ad..b0a27bf 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 = "1.4.0" + spec.version = "1.4.1" 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" From 21162426c3a46abba058fd1feea667414e0e1471 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Tue, 14 Sep 2021 01:01:38 -0300 Subject: [PATCH 245/250] Improve keyboard handling #300 --- SCLAlertView/SCLAlertView.m | 79 +++++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index 59e4198..d23146a 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -17,8 +17,6 @@ @import AVFoundation; @import AudioToolbox; -#define KEYBOARD_HEIGHT 80 -#define PREDICTION_BAR_HEIGHT 40 #define ADD_BUTTON_PADDING 10.0f #define DEFAULT_WINDOW_WIDTH 240 @@ -58,6 +56,9 @@ @interface SCLAlertView () @property (nonatomic) CGFloat subTitleHeight; @property (nonatomic) CGFloat subTitleY; +@property (nonatomic) CGPoint tmpContentViewFrameOrigin; +@property (nonatomic) CGPoint tmpCircleViewFrameOrigin; + @end @implementation SCLAlertView @@ -670,25 +671,71 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField - (void)keyboardWillShow:(NSNotification *)notification { if(_keyboardIsVisible) return; + + NSDictionary *userInfo = notification.userInfo; + NSTimeInterval animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; + UIViewAnimationOptions animationCurve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] unsignedIntegerValue] << 16; + + // Get the keyboard frame in screen coordinates + CGRect keyboardFrameEnd = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; + + // Convert contentView frame to screen coordinates + UIWindow *window = self.view.window; + if (!window) { + window = _usingNewWindow ? _SCLAlertWindow : [SCLAlertView scl_currentKeyWindow]; + } - [UIView animateWithDuration:0.2f animations:^{ - CGRect f = self.view.frame; - f.origin.y -= KEYBOARD_HEIGHT + PREDICTION_BAR_HEIGHT; - self.view.frame = f; - }]; - _keyboardIsVisible = YES; + CGRect contentViewScreenFrame = [_contentView.superview convertRect:_contentView.frame toView:nil]; + CGFloat contentViewBottom = CGRectGetMaxY(contentViewScreenFrame); + CGFloat keyboardTop = CGRectGetMinY(keyboardFrameEnd); + + // Calculate how much the content view overlaps with the keyboard + CGFloat overlap = contentViewBottom - keyboardTop; + + // Add some padding so the content isn't flush against the keyboard + CGFloat padding = 10.0f; + + if (overlap > 0) { + _keyboardIsVisible = YES; + _tmpContentViewFrameOrigin = _contentView.frame.origin; + _tmpCircleViewFrameOrigin = _circleViewBackground.frame.origin; + + CGFloat offsetY = overlap + padding; + + [UIView animateWithDuration:animationDuration delay:0 options:animationCurve animations:^{ + CGRect contentFrame = self.contentView.frame; + contentFrame.origin.y -= offsetY; + self.contentView.frame = contentFrame; + + CGRect circleFrame = self.circleViewBackground.frame; + circleFrame.origin.y -= offsetY; + self.circleViewBackground.frame = circleFrame; + } completion:nil]; + } } - (void)keyboardWillHide:(NSNotification *)notification { - if(!_keyboardIsVisible) return; - - [UIView animateWithDuration:0.2f animations:^{ - CGRect f = self.view.frame; - f.origin.y += KEYBOARD_HEIGHT + PREDICTION_BAR_HEIGHT; - self.view.frame = f; - }]; - _keyboardIsVisible = NO; + if(_keyboardIsVisible) { + NSDictionary *userInfo = notification.userInfo; + NSTimeInterval animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; + UIViewAnimationOptions animationCurve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] unsignedIntegerValue] << 16; + + [UIView animateWithDuration:animationDuration delay:0 options:animationCurve animations:^{ + CGRect contentFrame = self.contentView.frame; + contentFrame.origin.y = self->_tmpContentViewFrameOrigin.y; + self.contentView.frame = contentFrame; + + CGRect circleFrame = self.circleViewBackground.frame; + circleFrame.origin.y = self->_tmpCircleViewFrameOrigin.y; + self.circleViewBackground.frame = circleFrame; + } completion:^(BOOL finished) { + self->_tmpContentViewFrameOrigin = CGPointZero; + self->_tmpCircleViewFrameOrigin = CGPointZero; + }]; + + _keyboardIsVisible = NO; + } } #pragma mark - Buttons From c1b53bdf676fce3f1db83e00cd3c2183be814d29 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 30 Nov 2025 08:16:23 -0300 Subject: [PATCH 246/250] chore(ci) : Update macOS to 15 and Xcode to 26.1 --- .github/scripts/build_app.sh | 2 +- .github/workflows/Build.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/build_app.sh b/.github/scripts/build_app.sh index 14ce85d..8268274 100755 --- a/.github/scripts/build_app.sh +++ b/.github/scripts/build_app.sh @@ -4,5 +4,5 @@ set -eo pipefail xcodebuild -project SCLAlertView.xcodeproj \ -scheme SCLAlertView \ - -destination platform=iOS\ Simulator,OS=17.2,name=iPhone\ 15 \ + -destination platform=iOS\ Simulator,OS=26.1,name=iPhone\ 16 \ clean build | xcpretty diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 94a64be..dc85dee 100755 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: build: name: Building SCLAlertView - runs-on: macos-13 + runs-on: macos-15 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -12,7 +12,7 @@ jobs: - name: Setup Xcode version uses: maxim-lobanov/setup-xcode@v1.6.0 with: - xcode-version: 15.0.1 + xcode-version: 26.1 - name: Install Project Tools uses: jdx/mise-action@v3 From 5464e331ae26297c500cfe71cb0a31122ba5aac0 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 30 Nov 2025 08:22:07 -0300 Subject: [PATCH 247/250] Replace mise-action with ruby/setup-ruby, which uses precompiled binaries and is faster than building from source. --- .github/workflows/Build.yml | 7 ++++--- Gemfile.lock | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index dc85dee..274862a 100755 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -14,10 +14,11 @@ jobs: with: xcode-version: 26.1 - - name: Install Project Tools - uses: jdx/mise-action@v3 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 with: - experimental: true + ruby-version: 3.1.2 + bundler-cache: true - name: Building iOS app run: exec ./.github/scripts/build_app.sh diff --git a/Gemfile.lock b/Gemfile.lock index fe58e35..dba6404 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,6 +71,7 @@ GEM escape (0.0.4) ethon (0.15.0) ffi (>= 1.15.0) + ffi (1.17.2-arm64-darwin) ffi (1.17.2-x86_64-darwin) fourflusher (2.3.1) fuzzy_match (2.0.4) @@ -105,6 +106,7 @@ GEM rexml (>= 3.3.6, < 4.0) PLATFORMS + arm64-darwin-22 x86_64-darwin-23 DEPENDENCIES From 0540be42283cf96f5af52ffc624ac1f09ce1cb26 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 30 Nov 2025 08:32:58 -0300 Subject: [PATCH 248/250] chore(ci): update building system --- .github/scripts/build_app.sh | 8 -------- .github/workflows/Build.yml | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 10 deletions(-) delete mode 100755 .github/scripts/build_app.sh diff --git a/.github/scripts/build_app.sh b/.github/scripts/build_app.sh deleted file mode 100755 index 8268274..0000000 --- a/.github/scripts/build_app.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -xcodebuild -project SCLAlertView.xcodeproj \ - -scheme SCLAlertView \ - -destination platform=iOS\ Simulator,OS=26.1,name=iPhone\ 16 \ - clean build | xcpretty diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 274862a..7d2e635 100755 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -5,6 +5,14 @@ jobs: build: name: Building SCLAlertView runs-on: macos-15 + strategy: + matrix: + scheme: [ + SCLAlertView + ] + destination: [ + 'platform=iOS Simulator,name=iPhone 16,OS=26.1' + ] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -20,5 +28,9 @@ jobs: ruby-version: 3.1.2 bundler-cache: true - - name: Building iOS app - run: exec ./.github/scripts/build_app.sh + - name: Building ${{ matrix.scheme }} on ${{ matrix.destination }} + run: | + set -o pipefail && xcodebuild -project SCLAlertView.xcodeproj \ + -scheme ${{ matrix.scheme }} \ + -destination '${{ matrix.destination }}' \ + clean build | xcbeautify --renderer github-actions From 8a01c99db4ef476384eb9ba57b0423f18f7e3be9 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 30 Nov 2025 08:42:19 -0300 Subject: [PATCH 249/250] Fix race condition in keyboard hide animation Guard temp value reset in completion block to prevent corruption when keyboard is shown again during hide animation. --- SCLAlertView/SCLAlertView.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index d23146a..5c7db95 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -721,6 +721,8 @@ - (void)keyboardWillHide:(NSNotification *)notification NSTimeInterval animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; UIViewAnimationOptions animationCurve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] unsignedIntegerValue] << 16; + _keyboardIsVisible = NO; + [UIView animateWithDuration:animationDuration delay:0 options:animationCurve animations:^{ CGRect contentFrame = self.contentView.frame; contentFrame.origin.y = self->_tmpContentViewFrameOrigin.y; @@ -730,11 +732,12 @@ - (void)keyboardWillHide:(NSNotification *)notification circleFrame.origin.y = self->_tmpCircleViewFrameOrigin.y; self.circleViewBackground.frame = circleFrame; } completion:^(BOOL finished) { - self->_tmpContentViewFrameOrigin = CGPointZero; - self->_tmpCircleViewFrameOrigin = CGPointZero; + // Only reset if keyboard hasn't been shown again during the animation + if (!self->_keyboardIsVisible) { + self->_tmpContentViewFrameOrigin = CGPointZero; + self->_tmpCircleViewFrameOrigin = CGPointZero; + } }]; - - _keyboardIsVisible = NO; } } From 09d5749dc3acfe0be3d6779845058252b83b9e59 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 30 Nov 2025 08:46:21 -0300 Subject: [PATCH 250/250] Bump version to 1.4.2 --- 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 b0a27bf..db00796 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 = "1.4.1" + spec.version = "1.4.2" 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"