0

I'm using following code to open URL on a button click from application:

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.innotrack.eu///"]];

But when it opens the URL on safari, it animates, Requirement is to prevent this animation. How to achieve it?

EmptyStack
  • 51,274
  • 23
  • 147
  • 178
rptwsthi
  • 10,094
  • 10
  • 68
  • 109
  • 2
    Do you mean the animation where your app shrins and rotates to bring Safari into focus, and then Safari grows to fill the screen? If so, this is OS behaviour for switching apps and cannot be altered by a third party developer (*i.e. you*). If you really have a requirement to lose the animation, then I'd suggest embedding a `UIWebView` in your app and load the webpage in that, avoiding having to switch to Safari altogether. –  Aug 01 '11 at 09:14

2 Answers2

1

Animate like window exchange in carousel? That is native behavior when switching applications in iOS4 and I don't think you can avoid that.

What you can do is create an inapp UIWebView and use it to display website. That way you have control over animations that happen when switching between views.

rene
  • 41,474
  • 78
  • 114
  • 152
kviksilver
  • 3,824
  • 1
  • 26
  • 27
0

We have only the right to command UIApplication to openURL: and, it seems, we are not authorized to order it not to animate while opening the URL.

EmptyStack
  • 51,274
  • 23
  • 147
  • 178