swift data not transferred from UIBarButtonItem to another viewcontroller
问题 This is an extension of an earlier question:- ios Swift Items do not get added to cart The original issue is resolved. Now I have a supplementary hitch:- The issue is in CartViewController - When I click on "Checkout(2)" rightBarButtonItem in the ProductViewController, it shows error in CartviewController's "numberOfRowsInSection" function - Kindly see image & codes below:- class ProductViewController - import UIKit class ProductViewController: UIViewController, UITableViewDataSource,