SWIFT : UITABBAR delegate fires twice

Simple UITABBar (6 items)… works fine on ALL simulators, and a real iPhoneSE(2nd gen)

BUT on the iPhoneSE (3rd Gen) simulator, any time I click a tab, it fires TWICE

the selected tab then tab 0, there is nothing special that I can see.

The viewcontroller has the UITabBar Delegate (didSelect)

 func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
        print(item.tag)

        switch item.tag {
... do stuff
}
}

and do stuff is just setting a flag except for 0 with moves to another view

And since my iPhone is a 2nd gen, I can’t test on a real 3rd gen device :frowning: to see if its a bug in simulator or not

Seems to been fixed. I deleted the iPhoneSE(3rd) simulator, and downloaded it again… and it seems to work (at least for now)

1 Like