ios - How do I rotate UIImageView on touch -


I am trying to get an image to go full screen, and if the image is the scenario, To rotate in

The code works fine to make it fullscreen, but if I add rotation, the results are unexpected and the image rotates, goes to the left, but the fullscreen does not grow.

P> Usage Code:

  [UIView animateWithDuration: 0.5 Delay: 0 options: 0 Animation: ^ {// Save the last frame to the last frame = imgView.frame; [ImgView Setframe: [[UIScreen main screen] border]]; ImgView.backgroundColor = [UIColor blackColor]; [IMV live Player setborderwidth: 0.0]; If (imgView.image.size.width & gt; imgView.image.size.height) imgView.transform = Siajifintronsformmackeroteshn (Dijiiariaco_radiyns (90)); } Closing: ^ (BOOL End) {isFullScreen = YES; }];  

Not sure what I'm missing here, but is it possible to do something with rotation and image view limits? Try using CABasicAnimation instead, combine these examples:

Size example:

  - (minus) resize layer: (CALayer *) layer: (CGSize) size {CGRect oldBounds = Prtkbound; Siaijiartii Bounds = old bonds; NewBounds.size = size; CABasicAnimation * animation = [CABasic animation animation Sathkepath: @ "limit"]; Animeshnkfrem value = [Ansvivlugh Valusigret: Oldbound]; animation. toll value = [Ansvivlug value Sigret: Nubons]; Animation. Duration = Animeshnsped; Prgtileyr. Tanchapoint = CP Pointmek (0, Prgtileyr. Tanprpoint. Y); Prtkbound = new bounce [layer Jodenanimeshn: Animation Forke: @ "Bounds"];}  

rotation example:

  CABasicAnimation * animation = [CABasic animation animation Sathkepath: @ "transform.rotation.z"]; animation. duration = 5; animation Extra = Yes; Animation. RemovedOnCompletion = No; Animation.Filmoda = KCFilModford; Animation. Frame Value = [NSNumber Number Blast: DEGREHO_Radiens (0)]; Animation.tv = [with NSNumber Number Explosion: DGEREHO_Radiens (90)]; [Self.imgView.layer addAnimation: Animation Fork: @ "90 Rotation"];  

Associate them with an AniGroup, example:

  // animation group cation animation group * group = [ca. animation group]; Group.animations = [NSArray arrayWithObjects: ColorAnim, WidthEnim, Zero]; Group.duration = 5.0; [MyLayer addAnimation: that for group: @ "Border Change"];  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -