lunes, 18 de octubre de 2010

Sustituir imagen

.m

if(botonActivo != nil){
botonActivo.frame = CGRectMake(botonActivo.frame.origin.x+30, botonActivo.frame.origin.y, botonActivo.frame.size.width-60
  botonActivo.frame.size.height-60);
botonActivo.highlighted = NO;
botonActivo.enabled = YES;
botonActivo.contentEdgeInsets = UIEdgeInsetsMake(-44.00, 3, 0, 0);
botonActivo.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[botonActivo setBackgroundImage:[UIImage imageNamed:@"pato.png"] forState:UIControlStateNormal];
[[botonActivo titleLabel] setFont:[UIFont fontWithName:@"Baskerville" size:48]];
}
botonClicked.frame = CGRectMake(botonClicked.frame.origin.x-10, botonClicked.frame.origin.y
botonClicked.frame.size.width+5, botonClicked.frame.size.height+5);
botonClicked.showsTouchWhenHighlighted = YES;
[botonClicked setBackgroundImage:[UIImage imageNamed:@"pato_sobre.png"] forState:UIControlStateNormal];
botonClicked.enabled = NO;
botonClicked.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
botonClicked.contentEdgeInsets = UIEdgeInsetsMake(-70.00, 4, 0, 0);
[[botonClicked titleLabel] setFont:[UIFont fontWithName:@"Baskerville" size:75]];
botonClicked.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[botonActivo setBackgroundImage:[UIImage imageNamed:@"pato.png"] forState:UIControlStateNormal];
botonActivo = botonClicked;

No hay comentarios:

Publicar un comentario

468x60