Reputation: 27133
I have this visual part in my app. I've attached file below:
There are next user interface controls:
First UIScrollView (_blueScrollView) is located on main view of UIViewController
that can contain many other views each one is called _magentaView...
Each _magentaView contains UIView (_labelView...) for storing UILabel objects. So there is some struct like UITableView
in UITableView
.
In my case all objects have UIViewController
class.
I need to get access to all my labels that are storing in labelsViews. I need to get value of property text of those objects.
So if I make in standard case this will looks like this
for (UIViewController *magentaVC in scrollViewObjects) {
for (UIViewController *labelVC in magentaObjects) {
and get my UILabel objects here.
}
}
but as I think this is incorrect. Because I need to use data model for this instead to use UIViewController objects. What do you think about this and which way do I need to choose?
Upvotes: 0
Views: 167
Reputation: 8845
This is exactly the job for a UITableView
. The table itself has a scroll view embedded in it; magentaView 1 and 2 would be sections of the table, and the labelViews would be table view cells.
Upvotes: 2