Card View will be added in bottom of ViewController. User can Tap and Pan to expand and collapse the card view.
To run the example project, clone the repo, and run pod install
from the Example directory first.
-
Go to storyboard and add a new UIViewController and now add class name (BottomViewController) in Identity Inspector.
-
In same viewcontroller add a view on top of root view and connect it to handleView Outlet (Refer Below Image)
-
Now go to main view controller where you need card view in bottom.
-
Import KRCardView (Refer below image).
-
Add KRCardView protocol to main view controller (Refer below image).
-
Now initialize cardHandleAreaHeight and cardHeight variables (Refer below image).
-
Assign bottom view controller to cardViewController variable (Refer below image).
-
Finally call addKRCardViewMethod in ViewDidLoad (Refer below image).
-
That's it.
KRCardView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'KRCardView'
kamalraj venkatesan, reach.kamalraj@outlook.com
KRCardView is available under the MIT license. See the LICENSE file for more info.