switch to randomly selected view in xcode
-
02-10-2019 - |
Question
utilising xcode using the random function i want to switch to from a view to a randomly selected new view...can some one give me some direction.
Solution
A new view (randomly selected) subview of the current view or some view across your application?
For subviews: you could use the tag property of every view, assign a value to it and use viewWithTag:
to find a view based on the tag (= the randomly generated number from before).
For views across your app: Why would you want to do something like this? Doesn't sound exactly like good design to me.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow