Suppose I have a table view with 5 rows, each row have product name(UiLabel), product photo(UiImageView) and product price(UiLabel).
When clicking a row, it will be changed to a UiView that showing the product name(UiLabel), product photo(UiImageView) and product price(UiLabel), plus a product description(UiLabel).
I want to ask how to pass the data of product name, photos, price and description which is stored in ProductListTableView.m, from this table view to another view ProductDetailView?
ps: I guess I should write some code on method didSelectRowAtIndexPath, but no idea…
yes you have to write code in
didSelectRowAtIndexPath–and follow this to how to pass data from one class to another – Passing data between classes using Objective-C
you can pass a
NSDictionaryobj from one class to another.