Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Elements in PulleyViewController #371

Open
YujxZJCN opened this issue Jan 4, 2020 · 7 comments
Open

More Elements in PulleyViewController #371

YujxZJCN opened this issue Jan 4, 2020 · 7 comments

Comments

@YujxZJCN
Copy link

YujxZJCN commented Jan 4, 2020

How to add my own elements like a button in PulleyViewController? I created it in my storyboard but didn't show when App runs.

@amyleecodes
Copy link
Contributor

You can’t add elements to PulleyViewController itself. You need to add them to your primary or drawer view controller.

Please see the example project for how to use Pulley with a storyboard.

@YujxZJCN
Copy link
Author

YujxZJCN commented Jan 4, 2020

OK, Thanks. One more question, can I change the height of the drawer in .partiallyRevealed and .collapsed mode or add some blank area below the drawer to solve the problem in the image?

image

@YujxZJCN
Copy link
Author

YujxZJCN commented Jan 4, 2020

Aha. I have solved it by changing the safeAreaBottomInset which seems not so wise but it does work! Anyway, thanks a lot!

image

@amyleecodes
Copy link
Contributor

There are delegate methods you can use to control this. Please see the sample project for how the heights are returned.

@YujxZJCN
Copy link
Author

YujxZJCN commented Jan 4, 2020

Wow it is much wiser! Thanks!

@vvavepacket
Copy link

@YujxZJCN how did you manage to put a tab bar as part of the pulley view controller? Can you post a sample of your storyboard

@keegho
Copy link

keegho commented Oct 20, 2021

@amyleecodes Hello Amy. Im trying to add a navigation bar button In my primary content view controller but it is never visible. Of course when I tried to add it in the PullyViewController itself it appeared but its action of course its not working. How can I make this work? What I'm trying to achieve is to display the drawer by tapping on the bar button using self.pulleyViewController?.setDrawerPosition(position: .partiallyRevealed, animated: true)

UPDATE
I have solved the issue by accessing the parent controller from my primaryContainerViewController
self.parent?.navigationController?.navigationBar.topItem?.title = self.navTitle

Screen Shot 2021-10-20 at 1 27 51 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants