From 022c7c623a17cf93842488a083b36521df0392b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B8=CC=86=20=D0=94?= =?UTF-8?q?=D0=BE=D1=80=D0=BE=D1=84=D0=B5=D0=B5=D0=B2?= Date: Fri, 3 Jul 2015 22:45:09 +0300 Subject: [PATCH] Be friendly to subclasses! (See http://nshipster.com/instancetype/ ) --- KLCPopup/KLCPopup.h | 4 ++-- KLCPopup/KLCPopup.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/KLCPopup/KLCPopup.h b/KLCPopup/KLCPopup.h index 36fe364..6534df4 100644 --- a/KLCPopup/KLCPopup.h +++ b/KLCPopup/KLCPopup.h @@ -133,10 +133,10 @@ extern const KLCPopupLayout KLCPopupLayoutCenter; @property (nonatomic, copy) void (^didFinishDismissingCompletion)(); // Convenience method for creating popup with default values (mimics UIAlertView). -+ (KLCPopup*)popupWithContentView:(UIView*)contentView; ++ (instancetype)popupWithContentView:(UIView*)contentView; // Convenience method for creating popup with custom values. -+ (KLCPopup*)popupWithContentView:(UIView*)contentView ++ (instancetype)popupWithContentView:(UIView*)contentView showType:(KLCPopupShowType)showType dismissType:(KLCPopupDismissType)dismissType maskType:(KLCPopupMaskType)maskType diff --git a/KLCPopup/KLCPopup.m b/KLCPopup/KLCPopup.m index f297cce..bcc8a74 100644 --- a/KLCPopup/KLCPopup.m +++ b/KLCPopup/KLCPopup.m @@ -165,7 +165,7 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { #pragma mark - Class Public -+ (KLCPopup*)popupWithContentView:(UIView*)contentView ++ (instancetype)popupWithContentView:(UIView*)contentView { KLCPopup* popup = [[[self class] alloc] init]; popup.contentView = contentView; @@ -173,7 +173,7 @@ + (KLCPopup*)popupWithContentView:(UIView*)contentView } -+ (KLCPopup*)popupWithContentView:(UIView*)contentView ++ (instancetype)popupWithContentView:(UIView*)contentView showType:(KLCPopupShowType)showType dismissType:(KLCPopupDismissType)dismissType maskType:(KLCPopupMaskType)maskType