IOS Swift - How can I use 2 table views in a collectionview with different data -
i developing app have collectionview 2 different tableviews. need know how can recognize tableview filled data @ moment.
each uiview object has tagproperty, used identify uiview @ runtime.
you set this:
mytableview1.tag = int.min mytableview2.tag = int.max and in delegate , datasource methods:
func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int { let rowcount: int if tableview.tag == int.min { rowcount = self.datafortableview1.count } else { rowcount = self.datafortableview2.count } return rowcount } use tag value identify right tableview , that's it.
Comments
Post a Comment