【发布时间】:2016-08-20 20:15:32
【问题描述】:
当我在 xcode 上运行我的应用程序时,我的图像视图和按钮不会出现在模拟中。它们出现在故事板中,但是,它们没有出现在模拟中。我的按钮和图像视图有图像,它们是 png 文件。我还没有在应用程序中添加任何严肃的代码,因为我想确保图像视图和按钮出现(遗憾的是它们没有出现:()。我输入的唯一代码是图像视图的 IBOutlets 和 IBActions按钮(其中没有任何代码)。我目前正在运行 xcode 7.3.1 并且是 swift 语言的新手。
//这是视图控制器的代码
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var SlotRectangle1: UIImageView!
@IBOutlet weak var SlotRectangle2: UIImageView!
@IBOutlet weak var SlotRectangle3: UIImageView!
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func SlotButton1() {
}
@IBAction func SlotButton2() {
}
@IBAction func SlotButton3() {
}
}
【问题讨论】:
-
根据情节提要,您遇到了崩溃...这是什么崩溃?
标签: swift xcode uiimageview uibutton