{"action":"created","issue":{"url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/168","labels_url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/168/comments","events_url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/168/events","html_url":"https://github.com/dzenbot/DZNEmptyDataSet/issues/168","id":119870146,"number":168,"title":"Why a button on the customViewForEmptyDataSet can not respond click event?","user":{"login":"lqcjdx","id":5499434,"avatar_url":"https://avatars.githubusercontent.com/u/5499434?v=3","gravatar_id":"","url":"https://api.github.com/users/lqcjdx","html_url":"https://github.com/lqcjdx","followers_url":"https://api.github.com/users/lqcjdx/followers","following_url":"https://api.github.com/users/lqcjdx/following{/other_user}","gists_url":"https://api.github.com/users/lqcjdx/gists{/gist_id}","starred_url":"https://api.github.com/users/lqcjdx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lqcjdx/subscriptions","organizations_url":"https://api.github.com/users/lqcjdx/orgs","repos_url":"https://api.github.com/users/lqcjdx/repos","events_url":"https://api.github.com/users/lqcjdx/events{/privacy}","received_events_url":"https://api.github.com/users/lqcjdx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-02T05:23:22Z","updated_at":"2015-12-17T23:47:08Z","closed_at":"2015-12-17T23:46:32Z","body":"In  my project,i need a custom view for  the customViewForEmptyDataSet. I put a button on my custom view but it can not respond a click event.My code is here:\r\n\r\n-(UIView *)customViewForEmptyDataSet:(UIScrollView *)scrollView\r\n{\r\n    UIView *holderView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kFrameWidth, kFrameHeight)];\r\n    \r\n    UIImageView *noDataHolder = [[UIImageView alloc]init];\r\n    noDataHolder.userInteractionEnabled = YES;\r\n    noDataHolder.image = [UIImage imageNamed:@\"nodataholder\"];\r\n    [holderView addSubview:noDataHolder];\r\n    [noDataHolder mas_makeConstraints:^(MASConstraintMaker *make) {\r\n        make.width.equalTo(@250).priorityHigh();\r\n        make.height.equalTo(@320).priorityHigh();\r\n        make.center.equalTo(holderView);\r\n    }];\r\n    \r\n    UIButton *reloadBtn = [UIButton buttonWithType:UIButtonTypeCustom];\r\n    reloadBtn.backgroundColor = kThemeColor;\r\n    reloadBtn.layer.cornerRadius = 5;\r\n    reloadBtn.titleLabel.font = [UIFont systemFontOfSize:16];\r\n    [reloadBtn setTitle:@\"重试\" forState:UIControlStateNormal];\r\n    [reloadBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];\r\n    [reloadBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateHighlighted];\r\n    [reloadBtn addTarget:self action:@selector(yl_reloadDataAction) forControlEvents:UIControlEventTouchUpInside];\r\n    [holderView addSubview:reloadBtn];\r\n    [reloadBtn mas_makeConstraints:^(MASConstraintMaker *make) {\r\n        make.width.equalTo(@80).priorityHigh();\r\n        make.height.equalTo(@35).priorityHigh();\r\n        make.bottom.equalTo(noDataHolder).offset(-55);\r\n        make.centerX.equalTo(noDataHolder);\r\n    }];\r\n    \r\n    return holderView;\r\n}\r\n\r\nHow can i let the reloadBtn respond a UIControlEventTouchUpInside event?"},"comment":{"url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/comments/165617592","html_url":"https://github.com/dzenbot/DZNEmptyDataSet/issues/168#issuecomment-165617592","issue_url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/168","id":165617592,"user":{"login":"dzenbot","id":590579,"avatar_url":"https://avatars.githubusercontent.com/u/590579?v=3","gravatar_id":"","url":"https://api.github.com/users/dzenbot","html_url":"https://github.com/dzenbot","followers_url":"https://api.github.com/users/dzenbot/followers","following_url":"https://api.github.com/users/dzenbot/following{/other_user}","gists_url":"https://api.github.com/users/dzenbot/gists{/gist_id}","starred_url":"https://api.github.com/users/dzenbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzenbot/subscriptions","organizations_url":"https://api.github.com/users/dzenbot/orgs","repos_url":"https://api.github.com/users/dzenbot/repos","events_url":"https://api.github.com/users/dzenbot/events{/privacy}","received_events_url":"https://api.github.com/users/dzenbot/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T23:47:08Z","updated_at":"2015-12-17T23:47:08Z","body":"BW, will release a new pod soon including this fix ✌🏼"}}