I am quite a n00b on iPhone and iPad development, so any advice would be appreciated.
I want to create a split-eyed iPad app, where users can drag an image out of the root view controller and place it in the details view.
Once it has been done, the ideal user will be able to
What is the best way to achieve this? thanks a lot!
Well first off, if your new me is getting a book, Dave Mark, Jack Nutting and Start my iPhone 4 by Jeff Lamar (Apress)
He saved me from wasting a lot of time and besides, besides addition to it, there is better suited books for what you need Maybe but it touches a tape, and gestures ... but a very good chapter is called: 15. Taps, touches and gestures
Anyway here is the abstract:
Constant UIImageView * viewBeingDragged = zero; (NSSet *) touching withEvent :: (UIEvent *) event {CGPoint contact formula = [[anyObject touchs] locationInView: self.view (zero) touchesBegan - // in your rootController // // (a UIViewController with a UIImageView Say)]; // Our image footage is the direct century of our main scene / / Returns from the following method point to the farest 99, so make sure that you do not have any interstitial sobbies! // very sure that you do not need the event // // UIView * v = [self.view hitTest: touchpoint event: zero]; Nscart ([vmmail of class: [uimage weave class]], @ "is not an image view?!?!?!"]]]); ViewBeingDragged = (UIImageView *) V; [V removeFromSuperview]; // or just gray it out ... [self.view.superview.superview addSubview: v]; //, should be your splitViewController if not received from AppDelegate} - (zero) touchesMoved: (NSSet *) withEvent touches: (UIEvent *) event {viewBeingDragged.center = [[anyObject touches] locationInView: SplitControllerView]; If (viewBeingDragged.frame is cut with detailViewController.view.frame) {// Visual Queue is the landing zone set}} - (zero) touchanded: (NSASE *) touches the event: (UIEvent *) event { // See the final check still intersects // If so, insert data to the left to the right I}
You may also want to apply < Strong> touchesCanceled
I did not tested this method so unexpected things could come up.
In addition, UIView is the same touch methods, so if you want to make your own custom view / visual controller make it more ... "Extensible".
Comments
Post a Comment