'Is there a way to make the twitter's iOS app's notification tab's navigation bar (pic attached)
I am thinking of implementing a UISegmentControl extension to achieve the twitter's iOS notification tab bar, navigation bar segment style. I tried extending the class like in this post.
I want to be able to control the size of the underline that scales based on the text's width, just like in the app.
Any ideas or suggestions are appreciated.
Solution 1:[1]
Yes
Have a top row section: Icon | Notifications | Settings Icon Then a bottom row: All | Mentions
You make a container for each section in the bottom row that takes 50% of the width of the row and then have a block inside each section for the text. The width of block should only be as wide as the text so that when you add a bottom border to it, it only spans as far as the text goes
Solution 2:[2]
You can create your custom Top Bar.
- Add two views each containing your label with text, below that label add a view whose leading and trailing constraint from label. add both of these views in Stack View and fill equally. For tap you can use TapGesture or UIButton.
- Use collection view for dynamic tabs.
- UIPageViewController below for different screens.
- I have attached a screen i designed for reference

Solution 3:[3]
XLPagerTabStrip is a Container View Controller that allows us to switch easily among a collection of view controllers. Pan gestures can be used to move on to the next or previous view controller. It shows an interactive indicator of the current, previous, next child view controllers.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ruben Verster |
| Solution 2 | Toqir Ahmad |
| Solution 3 | Raza Baloch |

