1

I have a little problem easily reproductible with Xcode 6.1.1 :

  • Create a new Tabbed application project
  • Set the deployment target to iOS 7
  • Go into the storyboard and drag and drop a UISplitViewController
  • Link it to the UITabBarController
  • Edit the new Tab Bar Item, set an image and set its name

Now run the project in the simulator (iPhone) for iOS 7 and iOS 8. The Tab bar item is invisible in iOS 7 whereas its visible in iOS 8...

This is on iOS 8 This is on iOS 7

Any thoughts to make it visible?

PS: I've already checked Issue with Split View Controller with UITabbarController in iOS7 and UISplitView with UITabbar but none is about the invisible item...

Community
  • 1
  • 1
Zaphod
  • 6,758
  • 3
  • 40
  • 60

1 Answers1

0

UISplitViewController doesn't exist on iPhone ios7 ...

if you still would like to use it as root controller, check this http://op183.github.io/MasterDetailDemo/

override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        let barItems: [UITabBarItem] = tabBar.items as [UITabBarItem]
        for bar in barItems {
            println(bar.selectedImage)
            println(bar.title)
        }
    }

and the result is ....

<UIImage: 0x7a742ca0>
Optional("First")
<UIImage: 0x7a744800>
Optional("Second")
nil
nil

as a workaround try set the right values there

if bar.title == nil {
                bar.title = "TITLE"
            }

works for me

1) it is hard to say, what is wrong with storyboard, but even if title and images are set to nil, the 'connection' still works

user3441734
  • 16,722
  • 2
  • 40
  • 59
  • Thanks for your answer, but it doesn't take in account my question. The problem is not the display of the splitview (I know how to manage it like a simple navigation on phones) but the display of the tabbar item, like shown on the screenshots. As you can imagine, if I ask it within a tabbar its because it's as constraint I simply cannot work around. – Zaphod Feb 12 '15 at 12:49
  • i added the simple workaround in my answer ... enjoy it – user3441734 Feb 12 '15 at 14:09
  • Thanks, that's exactly what I had ended with. Even if it's really not nice, I'm amazed that something like that can happen... Anyway, if there's no other workaround... – Zaphod Feb 12 '15 at 14:18