- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
-(void)shekinNow:(id)prev
{
float YI = rand() / (float)RAND_MAX;
NSArray *subv = [imageV subviews];
long index = (long)(rand()/(RAND_MAX/([subv count])));
SlotUnit *unit = [subv objectAtIndex:index];
if(unit == prev) {
[self shekinNow:prev];//рекурисия епт
return;
}
CGFloat gradus = ((YI*70/99)*100);
CGFloat radian = (gradus * M_PI / 180);
[unit setTag:0];
[UIView beginAnimations:@"one" context:unit];
[UIView setAnimationDidStopSelector:@selector(moveTuda:finished:context:)];
[UIView setAnimationDuration:anidur];
[UIView setAnimationDelegate:self];
[unit sendRotating:radian];
[UIView commitAnimations];
}
Комментарии (8) RSS
Добавить комментарий