animation - Animating dynamic buttons in iPhone SDK -
I'm dynamically creating UIButton in my app when I show those buttons that I want to make them live. I can not find the button to animate with this code:
UIImage * button background = [UIImage imageNamed: @ "ButtonRed.png"]; (NSInteger x = 0; x & lt; 4; x ++) {CGRect btnFrame = CGRectMake (for x * (buttonBackground.size.width + 2), y * (buttonBackground.size.height + 1), Buttonbackgrade Size.width, buttonBackground.size.height); UIButton * gridButton = [[[UIButton alloc] initWithFrame: btnFrame];]; [Grid ButtonBackgroundShow: ButtonBackground for State: UIContolStateAnimal]; [Buttonbackgram release]; [UIView startup permissions: zero reference: NULL]; [UIView Set Animation Duration: .5]; [UIView Set Animation Transition: UIViewAnimationTransitionFlipFromLeft forView: GridButton Cache: Yes]; [Self.view addSubview: GridBooten]; [UIView commitAnimations]; [Grid Button Release]; }
If I change "forview: gridbutton" to "forview: self.view", then flip the whole scene, but not the individual button. I just want to flip each person's button.
Thanks for any help.
+ [UIView setAnimationTransition: forView: cache:]
to ForView: The view should be visual before the call can be called as
.
Rearrange such that you add buttons to view parents and then call your animation
Comments
Post a Comment