samedi 28 février 2015

Toolbar bar button item not working properly in SplitViewController

I'm having a weird problem that is similar to this post or this question. My toolbar's far left bar button item's touch censor is off place. In my case this only happens when I add toolbar in DetailViewController in SplitViewController and run it on the iPhone.


Red field is the off place touch censor for the item button.


Red field is the off place touch censor for the item button.


I've tried many things and those are the things that I found out. I'm using Xcode 6.



  • It only happens when toolbar is in DetailViewController of SVC

  • It only happens when you run it on iPhone and not iPad

  • It only happens when it's constrained to the bottom of the DetailViewController

  • It only happens to the button on the far left of the toolbar


Has anyone had the same problem before? If not, I would very much appreciate it if you could try it yourself by simply creating a new Master-Detail project and add toolbar in DetailViewController and constrain it to the bottom and run it on the iPhone simulator or a device. Please share if it causes a same problem. There doesn't seem to be any clear answer to this so I'm wondering if there's a issue with the Xcode. Only solution I came up with is to use tab bar instead. Please share your thoughts or solution on this.


Edit:


I've connected the Item button to IBAction and it does get triggered when I touch on Item. I thought it was not working because it doesn't give the flash animation unless I touch the red field. IBAction gets called but it still doesn't give the flash animation unless I touch on the red field. And touch censor field for the item button seems too large.




Aucun commentaire:

Enregistrer un commentaire