i have little problem, try drag uitableview, code drag view can't drag uitableivew, problem?why can drag view/button/image not table?
code:
uipangesturerecognizer *pangesture = [[uipangesturerecognizer alloc] initwithtarget:self action:@selector(handlepan:)]; [self.table addgesturerecognizer:pangesture]; - (void)handlepan:(uipangesturerecognizer *)recognizer { cgpoint translation = [recognizer translationinview:self.view]; recognizer.view.center = cgpointmake(recognizer.view.center.x + translation.x, recognizer.view.center.y + translation.y); [recognizer settranslation:cgpointmake(0, 0) inview:self.view]; [self.view bringsubviewtofront:recognizer.view]; }
i work on ipad application
kikko088
have verified pan gesture handler being called? guess table view handling pan gesture in order support scrolling. if case have 2 problems:
1. you'll have handle view's gestures recognized.
2. sure want support dragging of uitableview? user, still able scroll table view without accidentally dragging it?
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment