Skip to content

Commit

Permalink
Fixed bug related to showing the Button when it was not assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelescrig authored and Manuel Escrig Ventura committed Feb 29, 2016
1 parent 0711bcf commit b2ce225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions Pod/Classes/UIScrollView+FloatingButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down Expand Up @@ -417,7 +409,7 @@ - (BOOL)mev_canDisplay
{
BOOL canDisplay = NO;

if ([self.floatingButton displayMode] != MEVFloatingButtonDisplayModeNone) {
if ([self.floatingButton displayMode] != MEVFloatingButtonDisplayModeNone && [self floatingButton]) {
canDisplay = YES;
}

Expand Down

0 comments on commit b2ce225

Please sign in to comment.