diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/MEVFloatingButton.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/MEVFloatingButton.xcscheme index 20e62fc..6d125c7 100644 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/MEVFloatingButton.xcscheme +++ b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/MEVFloatingButton.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pod/Classes/UIScrollView+FloatingButton.m b/Pod/Classes/UIScrollView+FloatingButton.m index 2a34dd0..b2d6add 100644 --- a/Pod/Classes/UIScrollView+FloatingButton.m +++ b/Pod/Classes/UIScrollView+FloatingButton.m @@ -351,15 +351,7 @@ - (void)setFloatingButtonView:(MEVFloatingButton *)floatingButton - (MEVFloatingButton *)floatingButton { - MEVFloatingButton *floatingButton = objc_getAssociatedObject(self, kFloatingButtonView); - - if (floatingButton == nil) { - floatingButton = [[MEVFloatingButton alloc] init]; - - [self setFloatingButtonView:floatingButton]; - } - - return floatingButton; + return objc_getAssociatedObject(self, kFloatingButtonView); } @@ -417,7 +409,7 @@ - (BOOL)mev_canDisplay { BOOL canDisplay = NO; - if ([self.floatingButton displayMode] != MEVFloatingButtonDisplayModeNone) { + if ([self.floatingButton displayMode] != MEVFloatingButtonDisplayModeNone && [self floatingButton]) { canDisplay = YES; }