DZNEmptyDataSet
DZNEmptyDataSet copied to clipboard
customViewForEmptyDataSet: 1.8.1
CustomView have Button can't response Action, but 1.6.1 can response it.
same problem with you, have you resolved it?
NO.After the change of version in the v1.6.1 will OK.
Author restricted only UIControl type or ContentView own talent possible immovable case (hitTest: withEvent: event)
When I add some codes,this problem is resovled. I hope that will help you.
if (_customView) {
//add by yj
CGFloat topOffset = (self.verticalOffset > 0.0) ? self.verticalOffset : 0.0;
CGFloat bottemOffset = (self.verticalOffset < 0.0) ? -self.verticalOffset : 0.0;
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(topOffset)-[contentView]-(bottemOffset)-|" options:0 metrics:@{@"topOffset":@(topOffset), @"bottemOffset":@(bottemOffset)} views:@{@"contentView": self.contentView}]];
//add end
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[customView]|" options:0 metrics:nil views:@{@"customView":_customView}]];
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[customView]|" options:0 metrics:nil views:@{@"customView":_customView}]];
}
this problem is similar to #263 and #265
Good