Skip to content

Commit 9b34d13

Browse files
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
1 parent 5ed3d8c commit 9b34d13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Validator/ValidationError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Foundation
1010
import UIKit
1111

12-
public class ValidationError {
12+
public class ValidationError: NSObject {
1313
public let textField:UITextField
1414
public var errorLabel:UILabel?
1515
public let errorMessage:String

0 commit comments

Comments
 (0)