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

iOS 17: New “Floating" Popup Bar Style #538

Closed
LeoNatan opened this issue Jun 5, 2023 · 10 comments
Closed

iOS 17: New “Floating" Popup Bar Style #538

LeoNatan opened this issue Jun 5, 2023 · 10 comments

Comments

@LeoNatan
Copy link
Owner

LeoNatan commented Jun 5, 2023

IMG_5512

@iDevelopper
Copy link
Contributor

Hello,

Do you think it's a toolbar? It is really very white and transparent at the same time!

@LeoNatan
Copy link
Owner Author

It’s almost done implementing it. The floating background is actually the standard system chrome material, while the tab bar has a thin material.

I’m not sure yet how to implement so the tab bar gets the thin material automatically.

@LeoNatan

This comment was marked as outdated.

@LeoNatan
Copy link
Owner Author

LeoNatan commented Aug 25, 2023

It's now almost pixel accurate. I think it's good enough for me, considering there are more capabilities in my framework than Apple's implementation (limited to Music).

Simulator Screenshot - iPhone 14 Pro Max - 2023-08-25 at 16 46 36

The only thing left is to decide how to deal with the UITabBar/UIToolbar appearance. By default, if user does no changes to the bottom view's appearance, this is how the floating popup bar will look like:

Simulator Screenshot - iPhone 14 Pro Max - 2023-08-25 at 16 49 15

As you can see, the tab bar's separator is there and the material is the default chrome material. I don't like this. I can probably do the bare minimum of hiding the separator, so it would look like this by default:

Simulator Screenshot - iPhone 14 Pro Max - 2023-08-25 at 16 49 41

Still not optimal, because there is not enough contrast between the tab bar and the floating popup bar, but much better. The issue with automatic effect modification is that the user might have changed the appearance of the bottom bar manually. So maybe I could limit my modification to only if the bottom bar has the default appearance.

@LeoNatan
Copy link
Owner Author

Out now in 2.15.0. Enjoy!

@iDevelopper
Copy link
Contributor

Hello,

There is a crash when setting _toolbar.compactAppearance to nil in LNPopupBar.m
Capture d’écran 2023-08-30 à 09 23 09

@LeoNatan
Copy link
Owner Author

I’ll investigate, thanks @iDevelopper

@LeoNatan
Copy link
Owner Author

@iDevelopper What are you reporting exactly? I don't understand.

Calling self.navigationController.toolbar.compactAppearance = nil; works just fine.

@iDevelopper
Copy link
Contributor

I just ran the example (target LNPopupControllerExample), nothing more. Under iOS 17.0 on device iPhone 14 Pro & simulator, Xcode Version 15.0 beta 8 (15A5229m). The crash occurs following the execution of line 283 _toolbar.compactAppearance = nil; in LNPopupBar.m.

@LeoNatan
Copy link
Owner Author

Made changes to the shadow under the floating bar that required a surprising amount of changes to support. 🤣 Will push soon.

IMG_5846
IMG_5845

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

No branches or pull requests

2 participants