I’m a pretty newbie in (swift) programming so I hope you can forgive me if I phrase or ask something stupid.
I have a ViewController
with a ScrollView
. I fill the ScrollView
with different content, like a TableView
and ImageViews. Next, I would like to add a button. This button should be in the lower right corner of the display, no matter where the user scrolls down or up. Can you give me some guidance? Basically, I’m looking for a property that will allow me to reference the edge of the display.
2
Answers
I don’t know how you have your view (you could put your code, that would help the question more), on the contrary, what occurs to me in the way of integrating a button, is to use the JJFloatingActionButton pod and it allows you to have a floating button in your view.
Visit https://cocoapods.org/pods/JJFloatingActionButton for more info about this library.
well, friend you have to set your button outside scrollView layer .
you can do this in Canvas(storyboard or xib file) make sure its above scrollView layer
the easy way adde with code like this:
make sure you add your button to self.view and call bringSubViewToFront after, this will to as it sounds but you have to add your layer first to do somthing.