简体   繁体   中英

Tabbar in ios at the top of screen

I want to make tabbar at the top of the screen in iOS and want to place 3-4 tabs. Android is giving functionality by default using Tab bar layout. For more understanding https://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/

Thank you for your help.

You can achieve it by using UICollectionView inside your ViewController. Create a custom tab bar on your ViewController and set actions for each bar to navigate the pages on your UICollectionView.

You can manipulate your Custom UICollectionViewCell inside cellForItemAt to differentiate each page.

For UICollectionView tutorial you can check out this page: https://www.raywenderlich.com/9334-uicollectionview-tutorial-getting-started

I have created a view pager with a bottom tab bar, like instagram has, on one of my apps using this UICollectionView.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM