如何在@interface行中定义两个委托
在 iOS 中,我想包含 FlipsideView 的委托(来自实用程序应用程序模板)和允许滚动视图的委托。 我的尝试是行不通的:
@interface MainViewController : UIViewController
<FlipsideViewControllerDelegate> <UIScrollViewDelegate> {
}
我尝试在两个<>之间放置逗号(,)或空格,但行不通。 有人能够并且愿意帮助我解决这个问题吗?
预先感谢您的帮助
In iOS,I would like to include both a delegate for the flipsideView (from a Utility Application template) and a delegate to allow to scroll the view.
My attempt, which does not work, is:
@interface MainViewController : UIViewController
<FlipsideViewControllerDelegate> <UIScrollViewDelegate> {
}
I tried to place a comma (,) or a space between the two <>, but it does not work.
Would someone be able and willing to help me concerning this question?
Thank you in advance for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这样做:
语法如下:
例如对于多个协议:
您可以阅读有关协议以及如何采用并符合Apple官方文档。
Do it this way:
The syntax is as follows:
For example for multiple protocols:
You can read more on protocols and how to adopt and conform in Apple's official Documentation.
仅需要一个
<>
,并用逗号分隔协议。Only one
<>
is required with comma separating the protocols.