I've used this answer to implement a UIScrollView
with paging.
It works great as a start, but what I want to be able to do is for each page in the UIScrollView
, I want a separate instance of the same UIView
.
For example, say I have ContentViewController
, and I want to use 4 instances of it's UIView
;
1 for each of the pages on the UIScrollView
- how do I go about doing that?
My initial thought was to instantiateViewController(withIdentifier)
, and then reuse it's .view' property inside the
for` loop, but this only gave me the correct view once, and the other 3 were blank subviews.
Any help would be much appreciated. Thanks!