Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
添加visibleViews,只显示一类View。[[MMPlaceHolderConfig defaultConfig].visible…
Browse files Browse the repository at this point in the history
…Views addObject:[UIButton class]];
  • Loading branch information
mrdaios committed May 28, 2015
1 parent f751411 commit cc9025f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions MMPlaceHolder/MMPlaceHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

@property (nonatomic, assign) BOOL visible;
@property (nonatomic, assign) BOOL autoDisplay;
@property (nonatomic, strong) NSMutableArray *visibleViews;

@end

Expand Down
8 changes: 8 additions & 0 deletions MMPlaceHolder/MMPlaceHolder.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ - (id)init

self.visible = YES;
self.autoDisplay = NO;
self.visibleViews = [NSMutableArray array];
}

return self;
Expand Down Expand Up @@ -253,6 +254,13 @@ - (void)checkAutoDisplay
{
[self showPlaceHolder];
}
else if ([MMPlaceHolderConfig defaultConfig].visibleViews.count>0)
{
if([[MMPlaceHolderConfig defaultConfig].visibleViews containsObject:[self class]])
{
[self showPlaceHolder];
}
}
}
}

Expand Down

0 comments on commit cc9025f

Please sign in to comment.