我有一个Objective-C类中的协议:
@protocol YTManagerDelegate <NSObject>
@required
- (void)uploadProgressPercentage:(int)percentage;
@end
...
还需一个与之连接的快速类:
class YTShare: UIViewController, YTManagerDelegate{
func uploadProgressPercentage(percentage:Int?){
println(percentage)
}
...
我收到了错误信息:type YTShare does not conform to protocol YTShareDelegate,可能是因为我错误地编写了 Swift 函数,所以 obj 类找不到它。怎样才能正确地编写它呢?