class YourClass: SuperClassIfAny, FirstProtocol, SecondProtocol {}但是请注意,某些协议 要求 您实现委托方法。例如,
UITableViewDataSource要求 您实施
func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int
和
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell!
如果那些不是由符合协议的类实现的,则Xpre会给您一个编译错误(始终检查协议声明,Cmd + Click将向您显示 必须 实现的方法)。



