Lai*_*ilo 6 xcode interface-builder ios swift xcode6
我的Xcode 6.3界面构建器中有错误.当我创建一个新的自定义类,并希望将其添加到界面构建器自定义类字段.它不可用.我确实使用Swift作为语言.
我尝试了什么:
什么都没有成功;-(不知道它可能是什么?



Chr*_*cou -4
TimerCVC 不是 UIViewController 的子类
按 ctrl-n -> 在左侧面板上选择 iOS -> Source -> Cocoa Touch Class -> 从下拉菜单中选择 UIViewController -> 然后填写名称字段(Xcode 自动完成并在末尾添加 ViewController)。
它应该看起来像这样
import UIKit
class TimerViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1544 次 |
| 最近记录: |