Reputation: 4501
I need to add buttons to a UIScrollView
so that it appears on all screens when you scroll. However a UIScrollView
is just a view and not a controller therefore i cant add components to it. What is the best method to approach this? I can add the buttons on the subviews which are viewcontroller views however thats a little too much work and i was thinking maybe not the best option. How can i simply add one button the the UIScrollView
view and use it universally for all its views?
Upvotes: 0
Views: 212
Reputation: 2256
Create a UIView
Add UIScrollView as subView
Then Add a UIButton to UIView on top of UIScrollView
Upvotes: 1
Reputation: 6058
Create a new UIView
and make the UIScrollView
a subview of it. Then add the components to the UIView
too.
Upvotes: 1