hklel
hklel

Reputation: 1634

Make Navigation Bar Fixed When Scrolling in Xcode

In my application I added a navigation bar to a scrollable view. But when I scroll the view, the navigation bar scrolls with it. How can I make the navigation bar fixed when scrolling? Thanks.

Upvotes: 1

Views: 1952

Answers (1)

Karlos
Karlos

Reputation: 1661

Go to your "StoryBoard". Click on the document outline then select your view controller. Select the objects you want to scroll and go to "Editor" -> "Embed In" -> select "Scroll View". It will add all the objects selected to scroll view. Create outlet for the scroll view and add the required scroll view code.

Upvotes: 1

Related Questions