How hard is it to create a UI, which views is based on the data that a user has?
So say I can have a scroll view, and a particular user A can have a view which consists of X,Y,Z and user B can have a view which consists or Y, Z? I am just concerned about positioning the views in a views because we can’t do that now via interface builder and it needs to be coded.
How hard is it to create a UI, which views is based on the
Share
You can either do a callback-based approach like UITableView, i.e. -cellForRowAtIndexPath, or a more explicit setter like UIMenu where you set the items.
For the latter approach, have a -setObjectsArray: or similar method where you configure your subviews according to the input data, i.e., make sure you have three of them if you have (x,y,z) and set their data to 0th view = x, 1st view = y, etc.
Next override -layoutSubviews and set the frames of each of the views based on their position in the order and your bounds.
Does that help?