Hello,
I am trying to implement an infinite horizontal scroller using only 3 reused views. Each view is managed by its own UIViewController object. At some point, I try to exchange the views using a simple assignment as
However, I can not see the view contents after the function that does the assignments return.
Can I exchange the views like above or is there a more proper way of achieving this?
Many thanks.
I have noticed that after the assignment
viewControllerA.view.frame.origin is reset to (0,0). That's somewhat odd.
Instead of trying to exchange the views, I exchange the controllers themselves. It seems to work...
I am trying to implement an infinite horizontal scroller using only 3 reused views. Each view is managed by its own UIViewController object. At some point, I try to exchange the views using a simple assignment as
Code:
leftViewController.view = centerViewController.view;
centerViewController.view = rightViewController.view;
However, I can not see the view contents after the function that does the assignments return.
Can I exchange the views like above or is there a more proper way of achieving this?
Many thanks.
I have noticed that after the assignment
Code:
viewControllerA.view = viewControllerB.view;
viewControllerA.view.frame.origin is reset to (0,0). That's somewhat odd.
Instead of trying to exchange the views, I exchange the controllers themselves. It seems to work...
Last edited by a moderator: