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

添加visibleViews,只显示一类View。[[MMPlaceHolderConfig defaultConfig].visible… #3

Merged
merged 1 commit into from
May 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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