visuales texto reducir puedo movimiento mensajes fondo enviar efectos efecto dinamico desde animaciones activar iphone ios animation uianimation

iphone - texto - iOS-Efectos de animación-Imagen emergente



no puedo enviar mensajes de texto desde mi iphone (5)

Debe animar el marco de la vista para reducirlo de cero al estado final. Esto se puede hacer, por ejemplo, con la animación de bloques UIView.

Por ejemplo, comience con su vista como una propiedad IBOutlet self.myView con el tamaño y la posición final, pero establezca la bandera oculta. Luego, cuando quieras que aparezca, utiliza lo siguiente:

// Save old frame as final stater and set it to zero size for the start of the animation // But keep the same center position, so it just grows and don''t move around CGRect oldFrame = self.myView.frame; CGRect oldCenter = self.myView.center; self.myView.frame = CGRectZero; self.myView.center = oldCenter; self.myView.hidden = NO; NSTimeInterval duration = 0.3; [UIView animateWithDuration:duration delay:0.0 options:UIViewAnimationOptionAllowUserInteraction animations:^{ // New position and size after the animation should be the same as in Interface Builder self.myView.frame = oldFrame } completion:^(BOOL finished){ // You can do some stuff here after the animation finished }];

Me gustaría tener una imagen en mi aplicación de iPhone "emergente" en la pantalla en lugar de simplemente aparecer. Con "pop-in" quiero decir que crecerá desde un pequeño punto hasta su tamaño real. Como referencia, esto es exactamente lo mismo que el efecto de animación "pop" en Keynote. Soy completamente nuevo en las animaciones de iOS, así que si alguien pudiera indicarme los efectos de animación que necesitaría usar, sería muy apreciado.

Gracias

Brian

ACTUALIZAR He agregado este código de las sugerencias a continuación. Esto funciona pero escala mi imagen hacia abajo, en lugar de hacia arriba. Sé que es porque tengo 0.01 como el tamaño de la escala de transformación, pero me gustaría saber cómo puedo comenzar con una imagen de tamaño 0.0 y escalar hasta 1. ¿Es solo cuestión de establecer el tamaño de la imagen en 0? Gracias

[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration: 0.2]; image.transform = CGAffineTransformMakeScale(0.01, 0.01); [UIView setAnimationDelegate:self]; [UIView commitAnimations];


El efecto que estás buscando es algo como esto:

// instantaneously make the image view small (scaled to 1% of its actual size) view.transform = CGAffineTransformMakeScale(0.01, 0.01); [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ // animate it to the identity transform (100% scale) view.transform = CGAffineTransformIdentity; } completion:^(BOOL finished){ // if you want to do something once the animation finishes, put it here }];


Para eso deberás usar un UIView simple

Agregue el UIview a su vista actual.

- (void) initPopUpView { popup.alpha = 0; popup.frame = CGRectMake (160, 240, 0, 0); [self.view addSubview:popup]; } - (void) animatePopUpShow { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; [UIView setAnimationDelegate:self]; [UIView setAnimationWillStartSelector:@selector(initPopUpView)]; popup.alpha = 1; popup.frame = CGRectMake (20, 40, 300, 400); [UIView commitAnimations]; }


Versión Swift 2.0

view.transform = CGAffineTransformMakeScale(0.01, 0.01); UIView.animateWithDuration(0.2, delay: 0, options: .CurveEaseOut, animations: { () -> Void in // animate it to the identity transform (100% scale) self.view.transform = CGAffineTransformIdentity; }) { (finished) -> Void in // if you want to do something once the animation finishes, put it here }


si quieres que algo como Facebook le guste en cualquier publicación, utiliza esto

-(void)animateButton:(UIButton *)sender{ UIButton * btn = (UIButton *)sender; [UIView animateWithDuration:0.3/1.5 animations:^{ btn.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.4, 1.4); // scales up the view of button } completion:^(BOOL finished) { [UIView animateWithDuration:0.3/2 animations:^{ btn.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.7, 0.7);// scales down the view of button } completion:^(BOOL finished) { [UIView animateWithDuration:0.3/2 animations:^{ btn.transform = CGAffineTransformIdentity; // at the end sets the original identity of the button }]; }]; }];}

simplemente llame a este método cuando desee animar la vista

si tiene texto e imagen en el botón y solo desea animar la imagen del botón, simplemente reemplace "btn" por "btn.imageView", esto solo producirá animación en la propiedad de vista de imagen del botón. Espero que ayude Todo lo mejor.