'how do I get a variable in scoop in swift so I can pass it data?

how do I get my serialnumberLabel in scoop of the itemsviewController when its in a different file and where would I put it because I'm new to swift I know very little please help

this is my viewcontroller

THIS is my tableCell TableViewCell



Solution 1:[1]

You should reload current tableView in completionHandle closure and store text in ItemsViewController, then update serialNumberLabel.text in tableView(_:cellForRowAt:).

Solution 2:[2]

You need to change logic by steps:

Step1: Make a list common model for table view

Step2: when you modify item you set for model common in table view.

Step3: when you callback item you can only call reload table view.

All done.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cai.zhiwen
Solution 2 ThuyTQ