Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一个 UIView 类中声明协议我想在另一个 UIView 类中实现协议方法。但协议方法并没有调用我能做什么。任何人帮助我
你在 UploadView 中调用了委托函数吗?此外,由于它是可选函数,因此您必须在调用之前检查委托是否响应该函数。
- (void)yourFunction { ... if ([self.delegate respondsToSelector:@selector(takeAnotherPhoto:)]) { [delegate takeAnotherPhoto:self]; } ... }