objective-c : snapBehavior example code