kuglee / TermiWatch

Terminal Watch Face for Apple Watch
MIT License
2.11k stars 174 forks source link

Can't change colors #29

Closed ZachAttackMLR closed 4 years ago

ZachAttackMLR commented 4 years ago

In Interface.storyboard, I was easily able to change the fonts used, which was great. After getting that to work, I wanted to change the colors of "user@watch ...", along with the colors of "[TIME]", "[DATE]", etc.

This can't be done in the storyboard for some reason, so I tried to do it programmatically. When I create new IBOutlets (and then set the colors), nothing changes on the storyboard and the colors aren't updated.

I'm super new to Swift, so I'm assuming I'm just setting the colors incorrectly, but from all my Googling I can't figure out what I'm doing wrong. Any help would be appreciated. Thanks!

kuglee commented 4 years ago

It should be the same as the other ones. You can change them in the storyboard. Try cleaning the build folder, and build again.

ZachAttackMLR commented 4 years ago

Figured out the problem. As suspected, there wasn't any issue with your code, but rather how Xcode handled me changing the colors in the storyboard. I first changed the color of one label to a custom color, and that custom hex color stuck around in the "Colors" pop-up (but not in "Recently Used Colors") when I was trying to change the colors of other labels. Since I gave up earlier and closed Xcode, I re-launched Xcode, and changing one label's color to a custom color from the storyboard magically worked. I then attempted to change other labels to the same color using the exact same process, and it didn't work.

The solution is dumb, but worked. Apparently in Xcode (at least on my machine), in order to change the color of a different label, I had to re-input the text's original color (in this case #FFFFFF), hit enter/return, close the "Colors" window, select a new label, and then go back to the label I was trying to change and input the custom color. This worked perfectly without any need to alter code.

Closing since it's obviously now a non-issue. Thanks for the quick response and help!

ZachAttackMLR commented 4 years ago

In case anyone is curious, here's what I ended up with. Changed the font to Hack Nerd by adding the .ttf file to the same directory SF-Mono-Regular.otf, changed text and colors for the labels not connected to IBOutlets, and then adjusted some spacing. The hex for the green color is #5BEE96, and #F5C013 for the yellow.

IMG_0256