[quote='745841022, endecotp, /thread/719047?answerId=745841022#745841022, /profile/endecotp']
I'm just looking at another documentation bug which I reported in July 2022 FB1056690
[/quote]
That bug got very lost. I’m not actually sure what happened, but my best guess is that you filed it against a user-level component. I’ve taken steps to get it back on the right path.
It was easy to accidentally file a user-level bug bug in a user-level component [See the footnote at the end of this post.] back in the day, because the component list was a massive popup and all the developer-level components were sorted at the end. These days we have a top-level item, Developer Technologies & Resources, and if you’re a developer filing a code-level issue it’s always good to start there. I call this out in Bug Reporting: How and Why?.
Coming back to the original issue, FB11739379
definitely made it to the right place, although it wasn’t the driver for the fix reported by endecotp.
AgentFriday, I’d like to clarify your actual concern here. The page you referenced is the Objective-C documentation. The Swift equivalent says:
class CGColor
and I presume that’s OK by you.
Now, returning to the Objective-C doc, I see this:
typedef struct CGColor * CGColorRef;
Are you specifically complaining about the keyword struct
in the above?
If so, I think you’re misreading this. That declaration actually defines two types:
struct CGColor
, which is an incomplete C struct typeCGColorRef
, which is a C pointer type
Strictly speaking neither type is an object, because this is a C header file and C doesn’t support objects.
This type is actually a CF-style type, which means it’s declared in C but has Objective-C like semantics. Many such types are bridged to Swift as Swift classes, and that’s exactly what happens here. However, it’s not the struct CGColor
that’s bridged to Swift’s CGColor
, but rather the CGColorRef
is bridged to Swift, being renamed to CGColor
along the way.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"