0

I am using custom tab bar without controller. enter image description here Here is the code I use to detect when item is selected.

func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem) {
    switch(item.tag) {
    case 1:
        // do something
    case 2:
        // do something
    case 3:
        // do something
    default:
        return

    }
}

My problem is that I have to press a bit longer to select an item. It does not recognize simple click like button click. Anyone know how to solve it.

Thank you for any suggestion or idea.

Stanislav
  • 113
  • 1
  • 13
  • Stanislav creator of guildwork? is the tabbar in some kind of scrollview / tableview / collectionview ? – Sean Lintern Apr 12 '16 at 08:07
  • Is tabbar located at the bottom of the screen? Control center gesture recognizer is located in area that 20 points from bottom. It can delay touches on tabbar. – Kirsteins Apr 12 '16 at 08:45
  • @SeanLintern88 Nope, not the creator :) Yes, i have a scrollview, but it is not inside it. Over it. – Stanislav Apr 12 '16 at 08:46
  • @Kirsteins yes, it is at the bottom of th screen – Stanislav Apr 12 '16 at 08:47
  • I think you are affected by problem described here: http://stackoverflow.com/questions/19306449/is-it-possible-to-disable-control-center-in-ios-7-programmatically-and-if-not-w. To be sure you can try to put tabbar 20 points away from bottom and see if it works correctly. – Kirsteins Apr 12 '16 at 09:00
  • @Kirsteins tried, did not help. Also tried to uninstall ScrollView, move it up and deselect "delaysContentTouches" ... still does not work instantly, have to click and hold a bit. Thanks for suggestions. – Stanislav Apr 12 '16 at 09:25

1 Answers1

0

I faced similar problem in UIScrollView or UITableView. If your tab bar is within any of these controls deselect property "delaysContentTouches" in interface builder

Wujo
  • 1,845
  • 2
  • 25
  • 33