`ValidationError` inherits from `NSObject`
`ValidationError` is now an `NSObject` subclass so that `ValidationDelegate` can declare an argument of type `UITextField:ValidationError`. When `ValidationError` is a Swift only class we get a compile error (in Xcode Version 7.0 GM (7A218)): > Validator.swift:14:10: Method cannot be a member of an @objc protocol because the type of the parameter cannot be represented in Objective-C Conflicts: Validator/ValidationError.swift
This commit is contained in:
parent
5ed3d8c6ba
commit
9b34d138b7
|
|
@ -9,7 +9,7 @@
|
|||
import Foundation
|
||||
import UIKit
|
||||
|
||||
public class ValidationError {
|
||||
public class ValidationError: NSObject {
|
||||
public let textField:UITextField
|
||||
public var errorLabel:UILabel?
|
||||
public let errorMessage:String
|
||||
|
|
|
|||
Loading…
Reference in New Issue