【发布时间】:2017-02-03 21:21:47
【问题描述】:
有人知道有没有办法让参数有两种类型?
比如对于函数:
func email(from viewcontroller : (UIViewController, MFMailComposeViewControllerDelegate) {
}
【问题讨论】:
-
您是否正在寻找
viewcontroller参数来接受既继承自UIViewController又符合MFMailComposeViewControllerDelegate的类型?如果是这样,请参阅Swift: type must implement protocol and be a subclass of given class