Reproducing Popular iOS Controls - Part 30: | Ray Wenderlich Videos

@leamars Can you please help with this when you get a chance? Thank you - much appreciated! :]

@boonoovova Thank you for sharing. However, Scroll Issue is not related user-interaction setting value. It seems related to presentedViewController’s height.

I tried to set presentedSize.height to maxFrame.height * 0.5, You can scroll without any additional codes.

override var frameOfPresentedViewInContainerView: CGRect {

let presentedOrigin = CGPoint(x: 0, y: draggablePosition.originY(for: maxFrame.height))

let presentedSize = CGSize(width: maxFrame.width, height: maxFrame.height * 0.5)

let presentedFrame = CGRect(origin: presentedOrigin, size: presentedSize)

return presentedFrame

}

@leamars @shogunkaramazov I expected this Video Section would be work same as Apple Map. That’s why I subscribe to this course not struggle to find the right tutorials on the internet.

I hope you adding some more features in this code.

  1. MapView is not working. It only shows. (Is it possible to interact when after presented viewController? I think It is impossible. I think childViewController is suitable for Apple Map Clone. refer to GitHub - 52inc/Pulley: A library to imitate the iOS 10 Maps UI.)

  2. TableView is not scrollable.

If you update these features, It helps the student a lot. I am a big fan of RW teams. I hope you update this course soon. Thank you

@leamars Do you have any feedback about this? Thank you - much appreciated! :]

I did it correctly, but the search view controller act weird like up and down while dragging

In my case,

    animator.addCompletion { (animatingPosition) in
        if animatingPosition == .end {
            print("old : \(self.draggablePosition)")
            self.draggablePosition = position
            print("new : \(self.draggablePosition)")
        }
    }

This called while dragging, so search view is goes up and down

How can I fix this problem

@leamars Can you please help with this when you get a chance? Thank you - much appreciated! :]

Yes, by adding ‘tableInteraction(position: draggablePosition)’ in draggablePosition property observer like this.

private var draggablePosition: DraggablePosition = .collapsed {

didSet {

tableInteraction(position: draggablePosition)

}

}

And remove it from userDidPan method.

@vasanthkumar Thank you for sharing your solution - much appreciated!