suicidesafetyplan / safetyplan-ios

Suicide Safety Plan is a free mobile application for suicide prevention.
MIT License
23 stars 10 forks source link

Native iOS Dark Mode Support #4

Closed eddielement closed 4 years ago

eddielement commented 4 years ago

Right now the app forces light mode even if the user is in dark mode.

NinjaSnail42 commented 4 years ago

This should be pretty easy and straight forward. I can work on this. Does anyone have certain colors in mind? I will probably try to use similar dark grays and blacks that in the system apps.

eddielement commented 4 years ago

Sounds great! I'd use the System Background Color for the background and the Label Color for all text in the Storyboards. Otherwise, taking the colors from the system apps sounds like a good approach.

NinjaSnail42 commented 4 years ago

I'm having troubles getting this to work. Dark mode should already be somewhat working when you run an app on iOS 13 from Xcode, but I get nothing. I have tried changing the iOS target to iOS 13, I have tried setting UI Interface Mode to Dark in the Info.plist file, and still nothing... I've done this on my own application with no issue, so I'm not sure if there is some conflicting configuration that I am missing or what.

eddielement commented 4 years ago

Strange - it works for me if I just delete the User Interface Style from the Info.plist and then open a simulator, go to settings and set it for dark mode.

NinjaSnail42 commented 4 years ago

Thanks! I didn't realize that User Interface Style was already defined.... I was trying to define it again to force Dark Mode. Whoops.

NinjaSnail42 commented 4 years ago

I'm looking to get some feedback on Dark Mode. I was going with the primary system background color (black/white) but I'm thinking that secondary system background color looks better (very dark gray/very light gray). Thoughts?

Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-09 at 00 43 11 Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-09 at 00 43 15 Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-09 at 00 43 13 Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-09 at 00 43 08

eddielement commented 4 years ago

They look roughly equivalent to me. Maybe we can do a hybrid like Apple does on their settings app? Where the parts with text on it are a lighter gray whereas the parts that are empty are dark.

image

NinjaSnail42 commented 4 years ago

This issue can be closed now since the changes have been merged. I don't have the ability to close it though.

eddielement commented 4 years ago

Thanks! :)