Я стараюсь следовать учебному пособию, но это довольно старый учебник, и здесь возникает некоторая проблема при запуске приложения с видом приложения.Изменение размера основного вида в построителе интерфейса
Там нет изображения, и я восстановить ограничения, но ничего не изменилось.
Код ViewController:
class MasterViewController: UIViewController {
@IBOutlet var tableView: UITableView!
@IBOutlet var searchBar: UISearchBar!
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "showDetail" {
}
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
if let selectedIndexPath = self.tableView.indexPathForSelectedRow {
self.tableView.deselectRowAtIndexPath(selectedIndexPath, animated: true)
}
}
}
extension MasterViewController: UITableViewDataSource, UITableViewDelegate {
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 1
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 0
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
return cell
}
func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return true
}
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
}
}
extension MasterViewController: UISearchBarDelegate {
func searchBarSearchButtonClicked(searchBar: UISearchBar) {
}
}
Как я могу изменить его размер не только для iPhone 4 (или избавиться от черных областей)?
показать свой код –
@OrkhanAlizade, Done! –
Что именно вы хотите сделать? –