lbrendanl / SwiftSwipeView

93 stars 19 forks source link

Make an imagepickercontroller swipable? #5

Open ghost opened 9 years ago

ghost commented 9 years ago

It's only the previewImage (the freshly taken image) that can be swiped through each viewcontroller, but when the UIImagepickercontroller is present i cannot swipe and navigate between the different viewcontollers. Please help :)

lbrendanl commented 9 years ago

@danieldelouya I am not quite sure I follow what you are trying to do. Do you mean to have multiple UIImagePickerControllers that are adjoined that you can swipe between?

ghost commented 9 years ago

No only the one in the middle. Like snapchat.

ghost commented 9 years ago

I know it's within these lines of code:

    // 2) Add in each view to the container view hierarchy
    //    Add them in opposite order since the view hieracrhy is a stack
    self.addChildViewController(CVc);
    self.scrollView!.addSubview(CVc.view);
    CVc.didMoveToParentViewController(self);

    self.addChildViewController(BVc);
    self.scrollView!.addSubview(BVc);
    BVc.didMoveToParentViewController(self);

    self.addChildViewController(AVc);
    self.scrollView!.addSubview(AVc.view);
    AVc.didMoveToParentViewController(self);

Let's say BVc is a uimagepickercontroller with a camera interface. How do i make that one swipable? It only becomes swappable after I've taken a picture and see the picture on a UIImageView

I've tried this, but it didn't work: self.addChildViewController(BVc); self.scrollView!.addSubview(BVc.picker.view); // .picker BVc.didMoveToParentViewController(self);