kawoou / KWDrawerController

Drawer view controller that easy to use!
MIT License
157 stars 32 forks source link

Q: Is possible add cornerRadius to main view controller? #39

Open Lailan opened 5 years ago

Lailan commented 5 years ago

Good morning! First, thanks for this awesome lib!

Someone can help me? Is possible add cornerRadius to main view controller when I click or swipe?

Thanks

MNidhalM commented 4 years ago

any solution about this is issue ?

jndefosse commented 4 years ago

I try two ways: The first is to modify the transition a DrawerTransition like DrawerFloatTransition for example and on the method endTransition, you can apply the corner radius on the content:

open override func endTransition(content: DrawerContent, side: DrawerSide) {
        super.endTransition(content: content, side: side)

        content.contentView.layer.cornerRadius = 33
}

The second way, without change the code, is to add a view with a container. On the view, you apply the corner radius.

It's the first time i use this library and i need to make it with a shadow: IMG_0113 IMG_0114