`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:
Jonah Williams 2015-09-10 16:49:45 -07:00
parent 5ed3d8c6ba
commit 9b34d138b7
1 changed files with 1 additions and 1 deletions

View File

@ -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