skip to Main Content

enter image description here

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.

3

Answers


  1. 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.

    https://github.com/xmartlabs/XLPagerTabStrip

    Login or Signup to reply.
  2. You can create your custom Top Bar.

    1. 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.
    2. Use collection view for dynamic tabs.
    3. UIPageViewController below for different screens.
    4. I have attached a screen i designed for reference
    5. enter image description here
    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search