So I am working on a project building a 3rd party keyboard app that lets the user press a single button and will input a line of text. Very simple. Everything works fine, all my code is working ect. except I cannot figure out how to have my button be represented by an image and not by text.
As you can see below, everything looks good in the interface builder and in my code:
Main code in KeyboardViewController.swift:
import UIKit
class KeyboardViewController: UIInputViewController {
var keyboardView: UIView!
@IBOutlet var nextKeyboardButton: UIButton!
override func updateViewConstraints() {
super.updateViewConstraints()
// Add custom view sizing constraints here
}
override func viewDidLoad() {
super.viewDidLoad()
self.loadInterface()
}
func loadInterface() {
var keyboardNib = UINib(nibName: "KeyboardView", bundle: nil)
self.keyboardView = keyboardNib.instantiateWithOwner(self, options: nil)[0] as! UIView
view.addSubview(self.keyboardView)
view.backgroundColor = self.keyboardView.backgroundColor
self.nextKeyboardButton.addTarget(self, action: "advanceToNextInputMode", forControlEvents: .TouchUpInside)
}
But when I run my app in the simulator, all I see is a text button and not the image that I had provided.
What is going on, and what can I do to fix this seemingly simple problem? I'm stumped.