Xcode 8.1 issues and unwinding

I can’t figure it out to work with the latest Xcode 8.1GM. I'm just wondering if I'm the only one or someone else is experiencing the same thing. I installed view controllers, as before, it worked in Xcode8.0, but now I’m out of luck. I tried to clean and so on, but nothing helps. I would like someone else to check it out and then I introduced the radar ...

view controllerthat first created the instance view controllerhas the following code:

@IBAction func unwindToSettingsTableViewController(_ segue: UIStoryboardSegue) {
    print("unwind")
}

I also tried without underscore, but that didn't help. When you configure this, you must be able to ctrldrag from the owner of the file to exit and get off: No show unfold here ... So either I'm doing it completely wrong (I don’t think it worked fine before), or there is an error inXcode 8.1

I tried to do the same in a new project, and then it worked correctly. So I think something is wrong with my project or storyboard file.

Update

Since storyboards contain fairly small scenes, I simply deleted them and recreated them again using the same classes for view controllers and so on. And now it works. So, having exactly the same code, but a fresh storyboard, it seems to me that this is some kind of error.

+4
3

. , , whys.

, ViewControllers . , , "-", , .. TableViewController :

SampleTVC.swift

class SampleTableViewController: UITableViewController {
    @IBOutlet var someLabel: UILabel!
    @IBOutlet var someButton: UIButton!

    @IBAction func unwindHere(_ segue: UIStoryBoardSegue) {
        doSomething()
    }

}

SampleDelegate + DataSource.swift

extension SampleTableViewController {
    override func numberOfSections(in tableView: UITableView) -> Int
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
}

SampleFetchedResultsController.swift

extension SampleTableViewController: NSFetchedResultsControllerDelegate {
    var fetchedResultsController: NSFetchedResultsController<Item>
    func controllerWillChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>)
    func controller(_ controller: NSFetchedResultsController<NSFetchRequestResult>, didChange sectionInfo: NSFetchedResultsSectionInfo, atSectionIndex sectionIndex: Int, for type: NSFetchedResultsChangeType)
    func controller(_ controller: NSFetchedResultsController<NSFetchRequestResult>, didChange anObject: Any, at indexPath: IndexPath?, for type: NSFetchedResultsChangeType, newIndexPath: IndexPath?)
    func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>)
}

TVC, , rewind.

, , SampleTableViewController, .

, , , . , .

+2

. , @IBAction, , , :

"unwindToSettingsTableViewControllerWithSegue"

enter image description here

, "WithSegue" , , . , , , .

, .

+1

, , , .

I can create a new project and not create problems with creating an interchange, but even creating a new storyboard in my current project using only the NavigationController and two ViewControllers, rewinding does not appear on the exit button.

This is a very annoying mistake because it led to the cessation of my project.

0
source

Source: https://habr.com/ru/post/1658942/


All Articles