DZNEmptyDataSet icon indicating copy to clipboard operation
DZNEmptyDataSet copied to clipboard

customViewForEmptyDataSet: 1.8.1

Open aganjiuswo opened this issue 8 years ago • 6 comments

CustomView have Button can't response Action, but 1.6.1 can response it.

aganjiuswo avatar Dec 20 '17 08:12 aganjiuswo

same problem with you, have you resolved it?

DNC-7 avatar Dec 26 '17 02:12 DNC-7

NO.After the change of version in the v1.6.1 will OK.

aganjiuswo avatar Dec 26 '17 02:12 aganjiuswo

Author restricted only UIControl type or ContentView own talent possible immovable case (hitTest: withEvent: event)

Gavinooooo avatar Jan 04 '18 02:01 Gavinooooo

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}]];
    }

yjyuanshuai avatar Jan 09 '18 04:01 yjyuanshuai

this problem is similar to #263 and #265

yjyuanshuai avatar Jan 10 '18 02:01 yjyuanshuai

Good

YuanJiaShuai avatar Jun 20 '18 07:06 YuanJiaShuai