On Aug 6, 2012, at 15:36 , Flavio Donadio <[email protected]> wrote:
> Luca, > > The direction is where the swipe ends. UISwipeGestureRecognizerDirectionRight > is for left-to-right. > > Cheers, > Flavio > > On 06/08/2012, at 16:00, [email protected] wrote: > >> Hi All. >> Probably my problem is very stupid with a very immediate answer, but I'm >> very new using storyboard. >> >> I've have 2 pages. in the first page I've the following code: >> >> @property(strong, nonatomic) IBOutlet UISwipeGestureRecognizer >> *swipeGestureNext; >> >> 1) swipeGestureNext = [[UISwipeGestureRecognizer alloc] initWithTarget:self >> action:nil]; >> 2) [swipeGestureNext setDirection:UISwipeGestureRecognizerDirectionLeft]; >> 3) [[self view] addGestureRecognizer:swipeGestureNext]; >> >> Then I've used a "Swipe Gesture Recognizer" (connected with >> swipeGestureNext) and I've connected it, in the storyboard, with the second >> page. There's a deeper problem in the above code. 'swipeGestureNext' is declared as an outlet, and Luca says there's an object connected to it in IB. In that case, the property's 'swipeGestureNext' ivar should not be set in code, and especially not to a new instance of the gesture recognizer. There are 2 gesture recognizers dueling for possession of the outlet here, and one of them is going to lose. _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
