user287338
user287338

Reputation: 31

Setting delay in pushing view controller iphone

I am creating a navigation based application. I have different views which are pushed and poped from navigation controller (pop is mainly using back button). Here is the code that I am using for pushing view controller.

MyViewController *dvController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
[self.navigationController pushViewController:dvController animated:YES];
[dvController release];

I would like the to set delay in animation when new view controller is pushed. Default slide animation in iphone is ok for me. But with some delay.

Is there any way to do this?

Upvotes: 0

Views: 763

Answers (2)

Rohit Ranjan Pandey
Rohit Ranjan Pandey

Reputation: 491

Can use NsTimer to set the required delay.and call the method using timer.

Upvotes: 2

asandroq
asandroq

Reputation: 575

Wrap the above code in a method and call it with -performSelector:afterDelay:.

Upvotes: 1

Related Questions