The previous version addSubview now addSubview ,tableview emptyview insterSubview back forever,So that other views will be displayed on it.How to solve this problem?
DZNEmptyDataSetView *view = self.emptyDataSetView;
if (!view.superview) {
// Send the view to back, in case a header and/or footer is present
if (([self isKindOfClass:[UITableView class]] || [self isKindOfClass:[UICollectionView class]]) && self.subviews.count > 1) {// [self insertSubview:view atIndex:];
[self addSubview:view];
}
else {
[self addSubview:view];
}
}
now
if (!view.superview) { // Send the view all the way to the back, in case a header and/or footer is present, as well as for sectionHeaders or any other content if (([self isKindOfClass:[UITableView class]] || [self isKindOfClass:[UICollectionView class]]) && self.subviews.count > 1) { [self insertSubview:view atIndex:0]; } else { [self addSubview:view]; } }
The previous version addSubview now addSubview ,tableview emptyview insterSubview back forever,So that other views will be displayed on it.How to solve this problem?
now
if (!view.superview) { // Send the view all the way to the back, in case a header and/or footer is present, as well as for sectionHeaders or any other content if (([self isKindOfClass:[UITableView class]] || [self isKindOfClass:[UICollectionView class]]) && self.subviews.count > 1) { [self insertSubview:view atIndex:0]; } else { [self addSubview:view]; } }