Xcode 13 SwiftUI Color Literal missing - swiftui

I am using the Xcode 13 beta and noticed the Color Literal suggestion when trying to choose a color with a picker does not show up (in previous versions I would do Color(Color Literal()) and a color picker would show up. Any thoughts on this?

Just type
#colorLiteral( for color or #imageLiteral( for image and it will appear immediatly

Edit (September 26, 2021): As of Xcode 13.0 (13A233), color literals seem to be working now.
It's a known issue. From the release notes:
#colorLiteral, #imageLiteral, and #fileLiteral aren’t rendered. (75248191)
But other than that, note that init(_ color: UIColor) is deprecated, so you can't do something like Color(UIColor.blue). This applies to color literals too.
Instead, use the new init(uiColor: UIColor).

Solved like this in Xcode 13.4:
Put a SPACE after "=" when assigning. Yes, it's that ridiculous. Then double click to pick a color.
So:
var someColor = #colorLiteral(
After that can select a color.

Related

SwiftUI: Status bar color for specific view

I have a specific view in my application where I need the status bar to be white (dark mode).
I've tried setting the .preferredColorScheme(.dark) but as the documentation mentions, that affects all the views in my window which is not what I'm looking for.
I've taken a look at this but it seems to be done using SceneDelgate which I am not making use of.
Is there any workaround to this?
For iOS 16, you can set .toolbarColorScheme for a specific View. Unfortunately, this is not supported on older iOS Versions. As a workaround that does not involve SceneDelegate, you could manipulate UIToolBar.appearance() directly with a new tint color. This has nothing to do with the preferred color scheme (e.g., light or dark mode), but could have the same effect.

How to disable VS2019's syntax coloring for C++ and make it look like VS2017

I'm a light theme user, and I guess that makes me unpopular, but I'm sure there are still some light theme users out there. I have switched to VS2019 and the light theme (called Blue Theme) was a nightmare. It turned out it was an issue and the solution can be found in this thread.
My other question is the C++ syntax coloring in VS2019. It's just too many colors and makes it really hard for the eyes (once again if using the light theme).
I have looked but don't know where can I disable this new fancy syntax coloring and go back to VS2017's syntax coloring in VS2019. Any tips?
Here's a screenshot of what I have in VS2019:
I think it's a bit too much. I don't wanna see purple, green, red and brown.
As per this Microsoft link there is supposed to be this Color Scheme and it can be set to VS2017, as per this screenshot:
But for some reason I don't have it and I have just updated it and this what my Text Editor->C/C++->View looks like:
It looks the only way to solve this problem is to change the colors one by one. But you may ask, how do I come up with colors, I'm not a graphic/UI/UX designer? Here's how. You open the colors in VS2017 in Options->Fonts and Colors and select Text Editor in Show settings for:, and there when you scroll down you will see the colors for all C++ keywords.
That was Step 1. In Step 2 you go to the same dialog in VS2019, and one buy one change VS2019 settings to match those of VS2019. Having two monitors or one wide monitor helps.
Here's the screenshot:

Using PencilKit in dark mode results in wrong color

When in dark mode, it seems that all the color set in PKInkingTool are reversed in brightness. If I choose a bright red I got a dark red, and vice versa.
For example, if I use UIColorPickerViewController to select a color:
PKInkingTool(.pencil, color:color, width:10)
The color that shows up in PKCanvasView is not the correct color. The only way that seems to work is not to support dark mode.
overrideUserInterfaceStyle = .light
Is there a way to get PencilKit to use the correct color rather than convert color automatically?
You can use 'colorUserInterfaceStyle' for 'PKToolPicker' but in that case if you want to save the drawn part you might have to concern.
colorUserInterfaceStyle = .light

Removing text shadow/blur from chart.js charts

There is a mild shadow/blur effect on the text in the chart. I haven't figured out how to remove that. Does anyone know how to do so? I'm using version 2.7.1. Thanks!
Does it do the same cross-browser?
Are you able to change the font? Perhaps its not a good screen display font.
Are you using a mac?
Take a look at font-smoothing on MDN. Note it is not standard.
Could be something to do with font aliasing.
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

Resharper Current Line Expression background color

İn Version 2017.3 there is a cool feature called Current Line Expression, i have a problem with the "Dark with light editor" and "Dark" themes of visual studio 2017 , as you can see in the attached image, Resharper is using a very dark red colour in the text, which makes it hard to read when the background is black .
Is there any way i can change the background colour or the text colour ?
Thank you in advance .
This issue has been addressed already in the latest update (v.2017.3.1) which I've got today (December, 27th).
The background color on Dark Theme has certainly changed to a brighter color which now effectively makes the values much easier to read.
I haven't found any direct reference to this issue on the release notes, though.
https://blog.jetbrains.com/dotnet/2017/12/22/resharper-ultimate-2017-3-1-bugfix-available/
https://youtrack.jetbrains.com/issues?q=in:ReSharper%20Fix%20version:%202017.3.1%20
So, the advice would be, update to 2017.3.1 ASAP.
Hope this helps!