Ну, это просто. Предполагая, что мы говорим о перемещении UIView
:
// Only move the object if its right bounding box position is
// in the first half of the screen
if ((someObjectView.frame.origin.x + someObjectView.frame.size.width) <
(containingView.bounds.size.width / 2.0) {
// Move the object
}
Вы заполняете пробелы: -)