From 9b34d138b79becc3f298c192fdd9f260702f8d8b Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 10 Sep 2015 16:49:45 -0700 Subject: [PATCH] `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 --- Validator/ValidationError.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validator/ValidationError.swift b/Validator/ValidationError.swift index 64cea2a..e6f9c07 100644 --- a/Validator/ValidationError.swift +++ b/Validator/ValidationError.swift @@ -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