相关疑难解决方法(0)

无法使用标识符Cell将单元格出列 - 必须为标识符注册nib或类,或者在故事板中连接原型单元格

我对编码很新,对Xcode(Swift)来说真的很新.我知道我需要注册一个笔尖或一个班级,但我不明白'在哪里或如何?'.

import UIKit

class NotesListViewController: UITableViewController {

    @IBOutlet weak var menuButton: UIBarButtonItem!

  override func viewDidLoad() {
    super.viewDidLoad()
    NSNotificationCenter.defaultCenter().addObserver(self,
      selector: "preferredContentSizeChanged:",
      name: UIContentSizeCategoryDidChangeNotification,
      object: nil)

    // Side Menu

    if self.revealViewController() != nil {
        menuButton.target = self.revealViewController()
        menuButton.action = "revealToggle:"
        self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
    }

  }

  override func viewDidAppear(animated: Bool) {
    super.viewDidAppear(animated)
    // whenever this view controller appears, reload the table. This allows it to reflect any changes
    // made whilst editing notes
    tableView.reloadData()
  }

  func preferredContentSizeChanged(notification: NSNotification) {
    tableView.reloadData()
  }

  // #pragma mark - …
Run Code Online (Sandbox Code Playgroud)

iphone ios swift xcode6

97
推荐指数
9
解决办法
10万
查看次数

标签 统计

ios ×1

iphone ×1

swift ×1

xcode6 ×1