Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad
- pos = v1.center;
- NSLog(@"POSITION === %f",pos.x);
- [NSTimer scheduledTimerWithTimeInterval:0.05
- target:self
- selector:@selector(rotateBoundary)
- userInfo:nil
- repeats:YES];
- [super viewDidLoad];
- //[self performSelector:@selector(rotateBoundary) withObject:self afterDelay:5.0];
- // Do any additional setup after loading the view, typically from a nib.
- if (pos.x>=20 && pos.x<=290 && pos.y==25)
- {
- NSLog(@"Top left to right.");
- pos.x+=5;
- v1.center = pos;
- NSLog(@"pos.x === %f",pos.x);
- }
- if(pos.x >= 290 && pos.y<=430)
- {
- NSLog(@"Right top to down.");
- pos.y+=5;
- v1.center = pos;
- NSLog(@"pos.y === %f",pos.y);
- }
- if(pos.y == 430 && pos.x>=20)
- {
- NSLog(@"Down right to left.");
- pos.x-=5;
- v1.center = pos;
- NSLog(@"pos.x === %f",pos.x);
- }
- if (pos.x <= 20 && pos.y>=25)
- {
- NSLog(@"Down left to top.");
- pos.y-=5;
- v1.center = pos;
- NSLog(@"pos.y === %f",pos.y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement