eestein eestein - 19 days ago 11
iOS Question

How to mimic Android Bar on iOS?

my designer created this layout:

enter image description here

How can I mimic that on iOS? I tried creating a Segmented Control but didn't work well because it can't be customized after iOS7. So at the moment I'm thinking about a UIPageControl with custom dots like explained here: Customize dot with image of UIPageControl at index 0 of UIPageControl

My problem is also with the concept. Segmented controls are said to be used to flatten/filter results according to iOS human guidelines while UIPageControl has actually different pages...

Is this the best approach? If so, can I make it look like the Android Tab bar?


  1. Segmented control with custom image

  2. UIPageControl with custom image

  3. UITabBar on top (read too many bad things about this approach)

  4. something else



If UIPageControl is indeed the best/correct/possible approach how can I make it look as close as the image? And also move it to the top?

Thanks!

Answer

Short answer: Don't do that. You're trying to implement Android controls on iOS. That leads to user confusion and an app that doesn't feel like a native app.

Instead, have your designer create a native app design for both platforms.

It looks to me like the closest analog to what you're trying to do is a tab bar and a tab bar controller (UITabBarController).

EDIT:

If you must implement this UI on iOS, you might have to roll your own. You'd create a new custom parent view controller with a child view controller that you could swap out, and a custom control that triggers the swapping. Conceptually it would be a lot like a tab bar controller.

You could probably set it up using a container view and an embed segue (The embedded view controller would be the starting child view controller) and then use the built-in support for managing child view controllers to swap out the child view controller when the user taps on your control. I've done this sort of thing before. It isn't that hard, and is pretty well documented.