I'm trying to make it so when you touch the `UIImage` it moves to a random spot, but it keeps going off the screen after two or more moves. I tried to reset it be for it moves to a random spot but it still ends up going off screen. 
So is there a way to tell if it goes off screen or am I just missing something?

```
-(IBAction)moveimage {
    int x = 240;
    int y = 160;

    image.center = CGPointMake(x, y);

    int xr = arc4random() % (int) self.view.frame.size.width;
    int yr = arc4random() % (int) self.view.frame.size.height;

    image.center = CGPointMake(xr, yr);

```

}

I'm still very new to iOS so any help is appreciated, thank you.