Lnpopupcontroller: Change height of Compact bar

Created on 9 Jul 2020  路  5Comments  路  Source: LeoNatan/LNPopupController

Description


Hello! This is simply a question. Is it possible to change the height of the Compact mini player bar? I really like the design of this bar style versus the Prominent. I just wish I could adjust the height of the Compact bar. If this is not possible, could you suggest how I could do this in a fork or maybe a PR to help you?

This is a picture of the Compact mini player. It would be great to increase the height.
compact

Steps to Reproduce

n/a

Device, OS and Xcode Versions

n/a

question

All 5 comments

You can subclass LNPopupCustomBarViewController to customise your own popup bar. See the Demo - Custom Pupup Bar Scene (Swift) & MapScene.storyboard in the example.

You can subclass LNPopupCustomBarViewController to customise your own popup bar. See the Demo - Custom Pupup Bar Scene (Swift) & MapScene.storyboard in the example.

@iDevelopper Oh so it looks like I can make the popup bar completely custom. It could look anyway I want. So if I want to increase the height of the bar, that means I need to recreate the UI of the Compact bar in my own subclass (meaning adding the play button, text labels, etc) and then set my own height.

If this is correct, it looks like I need to use this API right?

- (void)setCustomBarViewController:(LNPopupCustomBarViewController*)customBarViewController

The call site is:

popupBar.customBarViewController = customMapBar

Yeah, if you use the custom bar view controller, you will need to recreate the layout on your own.

Internally, I use https://github.com/cbpowell/MarqueeLabel for the labels.

If you still want to fork, you can look into changing LNPopupBarHeightCompact in Private/LNPopupBar.m and how that is used to determine the height. You might need to modify the layout method to make it look better with a higher bar.

@iDevelopper Thank you for pointing me in the right direction!

@LeoNatan Thank you for answering! This is awesome! I think I may talk with designer and who knows, come up with something completely custom and have fun with it. Awesome library and hope you continue to maintain it!

Thank you for the kind words!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dancarasco picture dancarasco  路  6Comments

amosavian picture amosavian  路  7Comments

johnswifttt picture johnswifttt  路  5Comments

johnswifttt picture johnswifttt  路  5Comments

RajChanchal picture RajChanchal  路  3Comments