diff --git a/SCLAlertView-Objective-C.podspec b/SCLAlertView-Objective-C.podspec index 540237a..452c7cd 100644 --- a/SCLAlertView-Objective-C.podspec +++ b/SCLAlertView-Objective-C.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "SCLAlertView-Objective-C" - spec.version = "0.3.5" + spec.version = "0.3.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" @@ -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.ios.deployment_target = '7.0' + spec.ios.deployment_target = '6.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 ff0a850..eac8f56 100644 --- a/SCLAlertView.xcodeproj/project.pbxproj +++ b/SCLAlertView.xcodeproj/project.pbxproj @@ -393,6 +393,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -404,6 +405,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; INFOPLIST_FILE = "$(SRCROOT)/SCLAlertViewExample/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; diff --git a/SCLAlertView/SCLAlertView.m b/SCLAlertView/SCLAlertView.m index bd3b424..750d45b 100755 --- a/SCLAlertView/SCLAlertView.m +++ b/SCLAlertView/SCLAlertView.m @@ -454,7 +454,7 @@ - (void)buttonTapped:(SCLButton *)btn -(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 { - UIViewController *rootViewController = vc; + UIWindow *window = [[UIApplication sharedApplication] keyWindow]; self.view.alpha = 0; @@ -463,9 +463,9 @@ -(SCLAlertViewResponder *)showTitle:(UIViewController *)vc image:(UIImage *)imag _backgroundView.frame = vc.view.bounds; // Add subviews - [rootViewController addChildViewController:self]; - [rootViewController.view addSubview:_backgroundView]; - [rootViewController.view addSubview:self.view]; + [window addSubview:_backgroundView]; + [window addSubview:self.view]; + [vc addChildViewController:self]; // Alert color/icon UIColor *viewColor; diff --git a/SCLAlertView/SCLButton.h b/SCLAlertView/SCLButton.h index 2f64c9b..5957853 100644 --- a/SCLAlertView/SCLButton.h +++ b/SCLAlertView/SCLButton.h @@ -23,9 +23,9 @@ typedef NS_ENUM(NSInteger, SCLActionType) Block }; -/** TODO +/** Set button action type. * - * TODO + * Holds the button action type. */ @property SCLActionType actionType;