ios - UIImageView animation doesnt work when called from another class -
i have uiimageview animations, have function starts or stops animation. uiview class call function, function gets called , if statements work, not startanimation.
this function start or stop animation:
-(void)runplayeranimation:(bool)run { if (run) [player startanimating]; else [player stopanimating]; } this function calls function uiview class:
-(void)touchesbegan:(nsset *)touches withevent:(uievent *)event { cgpoint point = [[touches anyobject] locationinview:self]; if ([self pointincircle:point]) { [self touchesmoved:touches withevent:event]; gameplayvc *a = [[gameplayvc alloc] init]; [a runplayeranimation:yes]; } } both classes import each other this. in header file @class used , in implementation file #import used.
i have nslogged living s*** out of function , working except startanimating , stopanimating too.
Comments
Post a Comment