[英]Can't use touchesBegan because of delegate from another class
I instantiated a class, set the delegate and calls a method then I try to use the method touchesBegan but doesn't work, when I remove the code that instantiate the touchesBegan works, can help me how to use the both together? 我实例化了一个类,设置了委托并调用了一个方法,然后尝试使用touchesBegan方法,但是不起作用,当我删除实例化touchesBegan的代码时,可以帮助我如何同时使用两者吗?
- (void)viewDidLoad{
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor blackColor]];
_partyDAO = [PartyDAO alloc];
_partyDAO.delegate = self;
[_partyDAO getHot];
}
What is partyDAO? 什么是partyDAO? Try
尝试
_partyDAO = [PartyDAO alloc] init];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.