** Updated ** I'm working on an idea in Swift and can't seem to figure out how to get a view hooked up to a view class.
I have a UIViewController in IB and a UIViewController class that is associated to that UIViewController in IB. Inside the UIViewController and drug in UIView in IB. I want to give that UIView it's own class. I have a Text Field inside of the View and I would like the UIView class to handle all of the setup code for that text field. I able to create the UIView class, but and I was also able to set it as the bast class for the View in IB. What I'm not 100% sure is how to Init this class so that I can create vars in the UIView class and control drag them to my Text Field in IB,
* Updated * This is my code so far.. it seems to be at least doing something but I'm getting the fetal error print message
import UIKit
class AddPlayerView: UIView
@IBOutlet weak var inputPlayerOne: UITextField!
@IBOutlet weak var addPlayerOne: UIButton!
override init(frame: CGRect) {
super.init(frame: frame)
// Initialization code
println("init add player")
}
required init(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
This I get this printed out
fatal error: init(coder:) has not been implemented: