iPad 模拟器上未显示文本字段(在 iPhone 上是)
Text field isn't showing on iPad simulator (on iPhone yes)
我正在为 iPhone 和 iPad 开发应用。我的 table 视图只有一行,在这一行中我有 UITextField。在 iPhone 模拟器上(也在物理设备上)我没问题。但是当我尝试在 iPad 模拟器(2,Retina 或 Air,无关紧要)上 运行 应用程序时,它只显示空行。这是个大问题,因为此应用必须是 iPad 的主要应用。有人知道问题出在哪里吗?非常感谢
我只用 table 视图和文本字段 (TableViewController) 制作了简单的项目:
class TableViewController: UITableViewController {
// OUTLETS:
@IBOutlet weak var textField: UITextField!
// MARK: - Table view data source
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 1
}
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
}
@Rajram 回答了我的问题,但由于无法接受评论,所以只有他的回答的副本。
Check in the Attributes Inspector, that the textfield is installed in
iPad or not, for the corresponding size class,(there is a check box at
the last of the Attributes Inspector)
我正在为 iPhone 和 iPad 开发应用。我的 table 视图只有一行,在这一行中我有 UITextField。在 iPhone 模拟器上(也在物理设备上)我没问题。但是当我尝试在 iPad 模拟器(2,Retina 或 Air,无关紧要)上 运行 应用程序时,它只显示空行。这是个大问题,因为此应用必须是 iPad 的主要应用。有人知道问题出在哪里吗?非常感谢
我只用 table 视图和文本字段 (TableViewController) 制作了简单的项目:
class TableViewController: UITableViewController {
// OUTLETS:
@IBOutlet weak var textField: UITextField!
// MARK: - Table view data source
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 1
}
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
}
@Rajram 回答了我的问题,但由于无法接受评论,所以只有他的回答的副本。
Check in the Attributes Inspector, that the textfield is installed in iPad or not, for the corresponding size class,(there is a check box at the last of the Attributes Inspector)