{"action":"created","issue":{"url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/168","repository_url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet","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://avatars2.githubusercontent.com/u/5499434?v=4","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,"assignees":[],"milestone":null,"comments":10,"created_at":"2015-12-02T05:23:22Z","updated_at":"2018-04-17T13:51:55Z","closed_at":"2015-12-17T23:46:32Z","author_association":"NONE","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:\n\n-(UIView *)customViewForEmptyDataSet:(UIScrollView *)scrollView\n{\n    UIView *holderView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kFrameWidth, kFrameHeight)];\n\n```\nUIImageView *noDataHolder = [[UIImageView alloc]init];\nnoDataHolder.userInteractionEnabled = YES;\nnoDataHolder.image = [UIImage imageNamed:@\"nodataholder\"];\n[holderView addSubview:noDataHolder];\n[noDataHolder mas_makeConstraints:^(MASConstraintMaker *make) {\n    make.width.equalTo(@250).priorityHigh();\n    make.height.equalTo(@320).priorityHigh();\n    make.center.equalTo(holderView);\n}];\n\nUIButton *reloadBtn = [UIButton buttonWithType:UIButtonTypeCustom];\nreloadBtn.backgroundColor = kThemeColor;\nreloadBtn.layer.cornerRadius = 5;\nreloadBtn.titleLabel.font = [UIFont systemFontOfSize:16];\n[reloadBtn setTitle:@\"重试\" forState:UIControlStateNormal];\n[reloadBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];\n[reloadBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateHighlighted];\n[reloadBtn addTarget:self action:@selector(yl_reloadDataAction) forControlEvents:UIControlEventTouchUpInside];\n[holderView addSubview:reloadBtn];\n[reloadBtn mas_makeConstraints:^(MASConstraintMaker *make) {\n    make.width.equalTo(@80).priorityHigh();\n    make.height.equalTo(@35).priorityHigh();\n    make.bottom.equalTo(noDataHolder).offset(-55);\n    make.centerX.equalTo(noDataHolder);\n}];\n\nreturn holderView;\n```\n\n}\n\nHow can i let the reloadBtn respond a UIControlEventTouchUpInside event?\n"},"comment":{"url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/comments/382000118","html_url":"https://github.com/dzenbot/DZNEmptyDataSet/issues/168#issuecomment-382000118","issue_url":"https://api.github.com/repos/dzenbot/DZNEmptyDataSet/issues/168","id":382000118,"user":{"login":"romeugodoi","id":556442,"avatar_url":"https://avatars2.githubusercontent.com/u/556442?v=4","gravatar_id":"","url":"https://api.github.com/users/romeugodoi","html_url":"https://github.com/romeugodoi","followers_url":"https://api.github.com/users/romeugodoi/followers","following_url":"https://api.github.com/users/romeugodoi/following{/other_user}","gists_url":"https://api.github.com/users/romeugodoi/gists{/gist_id}","starred_url":"https://api.github.com/users/romeugodoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romeugodoi/subscriptions","organizations_url":"https://api.github.com/users/romeugodoi/orgs","repos_url":"https://api.github.com/users/romeugodoi/repos","events_url":"https://api.github.com/users/romeugodoi/events{/privacy}","received_events_url":"https://api.github.com/users/romeugodoi/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T13:51:55Z","updated_at":"2018-04-17T13:51:55Z","author_association":"NONE","body":"+1"}}
{"actor":{"display_login":"romeugodoi"}}