iphone - Image Bouncing while duing interface orientation -


i having paging in application. each page having image. during orientation changing frame according landscape , portrait orientation. image bouncing. should not bounce , want set smoothly.

please let know can do.

i changing frame in

- (void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration 

here code.

 - (void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration     {         if (tointerfaceorientation == uiinterfaceorientationlandscapeleft || tointerfaceorientation == uiinterfaceorientationlandscaperight)         {             [self performselector:@selector(setlandscapeorientationframe) withobject:nil afterdelay:(duration/2)];         }         else         {             [self performselector:@selector(setportraitorientationframe) withobject:nil afterdelay:(duration/2)];         }      } 

and in "setportraitorientationframe" , "setlandscapeorientationframe" changing frame.

if working ios6, can use autolayout. reason may because have used delay. if use code follows, may work.

`- (void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration  {       if (tointerfaceorientation == uiinterfaceorientationlandscapeleft || tointerfaceorientation == uiinterfaceorientationlandscaperight)      {          [self setlandscapeorientationframe];      }      else      {          [self setportraitorientationframe];      }  } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -