maxep / MXSegmentedPager

Segmented pager view with Parallax header
MIT License
1.27k stars 252 forks source link

How can I manually set the bottom content inset for the PagerView? #84

Closed inPhilly closed 8 years ago

inPhilly commented 8 years ago

I am using MXSegmentedPager in a ViewController where I sometimes also show an Ad banner. I need the SegmentedPager content to go behind the Ad banner, which doesn't cover to the edge of the screen. But I need to be able to set the bottom content inset for the PagerView (I believe). I cannot figure out a way to set this inset. I don't want to change the frame of the whole MXSegmentedPager, just manually adjust the content inset of the PagerView based on the height of the Ad on the screen at the time (and this may change often). Can you please tell me how this can be done? Thanks so much.

MadeByDouglas commented 8 years ago

Sounds like you are trying to do a "footer" view which persists across the different pages much like the parallax header. I am also interested in doing that, any ideas?

inPhilly commented 8 years ago

No, that is not what I am trying to do. I have a view that overlays the control already in the storyboard. If the control were a table view, I could sent the bottom contentInset. I need to find a way to do that for this control. I don't want to set up any sort of footer through the control.

On May 25, 2016, at 7:21 PM, Douglas Hewitt notifications@github.com wrote:

Sounds like you are trying to do a "footer" view which persists across the different pages much like the parallax header. I am also interested in doing that, any ideas?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

MadeByDouglas commented 8 years ago

oh i see set the content offset so things don't go behind your other view (the ads in your case) this would also be to prevent things from going beneath a tabBarController too right?

inPhilly commented 8 years ago

Right. More so the ads than the tabbarcontroller, the way my app is laid out.

On Jun 29, 2016, at 10:38 PM, Douglas Hewitt notifications@github.com wrote:

oh i see set the content offset so things don't go behind your other view (the ads in your case) this would also be to prevent things from going beneath a tabBarController too right?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

MadeByDouglas commented 8 years ago

ah ok. Well i know for the tab bar you can set these two lines and then it won't go behind that, not sure it will work on a custom view like the ad though. self.extendedLayoutIncludesOpaqueBars = false self.edgesForExtendedLayout = .None

inPhilly commented 8 years ago

@maxep any thoughts on this?

maxep commented 8 years ago

Well you cannot with the current design, you will need to change your segmenedPager frame size.

hardikamal commented 5 years ago

@inPhilly @MadeByDouglas Hi guys. Were you able to achieve this?