您好,登錄后才能下訂單哦!
//向左滑動的時候的手勢
UISwipeGestureRecognizer *leftSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(presentRightMenuViewController:)];
[leftSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionLeft];
[self.view addGestureRecognizer:leftSwipeGestureRecognizer ];
//向右滑動時候的手勢
UISwipeGestureRecognizer *rithSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(presentRightMenuViewController:)];
[rithSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionRight];
[self.view addGestureRecognizer:rithSwipeGestureRecognizer ];
- (void)presentRightMenuViewController:(UISwipeGestureRecognizer *)dddd
{
[self.navigationController popViewControllerAnimated:YES];
}
那么問題來咯,現在返回上一個頁面后,會崩潰,錯誤原因, -------待結果
2014-11-11 21:33:18.907 LYF_video[7979:258930] *** -[UIImageView superview]: message sent to deallocated instance 0x7fb2f3ea8870
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick)];
tap.numberOfTapsRequired = 1;
[self.view addGestureRecognizer:tap];
//點擊一次的手勢
- (void)tapClick
{
static BOOL flag = YES;
if (flag == YES) {
self.viewTitle.hidden = NO;
flag = NO;
}else{
self.viewTitle.hidden = YES;
flag = YES;
}
}
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。