简体   繁体   中英

Create tab buttons in iOS

This image is just for reference and I want to create tab buttons like in image in my navigation bar. Any idea how to create?

It is segmentedControl . you can just drag and drop from object library from storyboard or you can use it programmatically by making instance of UISegmentedControl . hope this will help :)

Create segmented control :

在此处输入图片说明

UISegmentedControl : Displays an element that comprises multiple segments, each of which functions as a discrete button. Each segment can display either text or an image, but not both. UISegmentedControl ensures that the width of each segment is proportional, based on the total number of segments, unless you set a specific width.

More info: Segmented controls

Simply you can use UIsegmented Control. You can just drag and drop it on navigation title . It will work like tab buttons. I hope it will work for u.

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