openedx / openedx-app-ios

The mobile app for iOS for the Open EdX Platform.
Apache License 2.0
20 stars 16 forks source link

fix: navigation bar colors #232

Closed rnr closed 8 months ago

rnr commented 8 months ago

This PR fixes bug with Navigation Bar background and title colors in dark mode.

295306543-aa89d0b1-3501-43a3-a317-d6f82b2fe70f

By some reason calculated UIColor doesn't work for navigation bar (like Theme.Colors.textPrimary.uiColor()) and I added UIColors struct into Theme.

After fix Navigation Bar looks like this:

37253/6793dc56-1831-44c6-af30-11fc26d28cd2
saeedbashir commented 8 months ago

@rnr I'm only able to replicate the issue when I revert the changes of CourseContainerView i.e., when I remove the background color.

Could you please check it again to see if you are able to reproduce the issue by using uiColor() in UINavigationController viewWillLayoutSubviews.

rnr commented 8 months ago

@rnr I'm only able to replicate the issue when I revert the changes of CourseContainerView i.e., when I remove the background color.

Could you please check it again to see if you are able to reproduce the issue by using uiColor() in UINavigationController viewWillLayoutSubviews.

@saeedbashir yes I'm able For navigationBar.titleTextAttributes = [.foregroundColor: Theme.Colors.textPrimary.uiColor()] - no title as you see:

Screenshot 2024-01-16 at 08 57 47

To see problem with navigationBar.backIndicatorImage you need to change accentColor to non-blue color (because it gets default color when error):

Screenshot 2024-01-16 at 09 03 07