Search code examples
iosuiscrollviewuitoolbar

My UIToolBars is scrolling with the UIScrollView?


I've the following problem : I've a view containing a UIScrollView added with IB. I also added a UIToolBar and added it to my view, but when I scroll it, the tool bar also moves. Any idea ?

Thanks for your advices


Solution

  • That is because you have added UIToolbar as subview of UIScrollView.

    You should just drag UIToolbar view from UIScrollView in IB and edit size of UIScrollView.