protocol是否继承class?

如果是纯接口:

protocol URLViewModel {
var urlText: String? { get }
var title: String { get }
var imageURL: URL? { get }
var placeholderImage: UIImage? { get }
}

如果是delegate

protocol LockCreatePasscodeCoordinatorDelegate: class {
func didCancel(in coordinator: LockCreatePasscodeCoordinator)
}

你可能感兴趣的:(protocol是否继承class?)