Navigation bar is overlap by horizontal scrolview

I have horizontal scroll buttons which will navigate to another view controller when a user selects the button which is working fine but the problem arises when user tap back button, navigationbar is been hidden.

It looks like the horizontal scroll buttons are overlapping the navigation bar.I have written those scroll buttons programmatically.