when i switch to a new view instantaneously a random image is selected via the arc4random function and displayed in the view can some one give me direction on how to achieve the instant execution of random function selection process with out a button to prompt the random function process. any examples of code, were should the code be placed etc
views:
55answers:
2
A:
- (void)viewDidLoad
You can put your image selecting code in this function and when the nib is created and loaded control will pass to it.
Alternatively, you can use
-(void) viewWillAppear:(BOOL)animated
To have the image appear fresh each time you make the view visible.
davbryn
2010-07-07 13:06:59
thanks davbryn ill get on to it
johnathan bridges
2010-07-08 02:57:44
A:
Welcome to StackOverflow.
Try putting it in viewDidLoad or viewDidAppear.
Also, FYI, you will get more answers to your questions if the questions themselves are readable. It took me a couple of parses to understand your problem. Try spell checking and adding some grammar, you'd be amazed at the difference it'll make.
AlexC
2010-07-07 13:09:46