I need to convert UIColor to CGColor (to set border color in a layer).
At first, I used Objective-C.
Worked as expected (result was <CGColor 0x600002a3e1c0>...).
But then I tried u.RunMethod ("CGColor", Null)). Result: <B4INativeObject: {length = 8, bytes = 0xc0e1a30200600000}>. As I understand, this is CGColorRef instead of CGColor. Why ?
At first, I used Objective-C.
B4X:
- (NSObject *) UIColorToCGColor: (UIColor *) u { return [u CGColor]; }
But then I tried u.RunMethod ("CGColor", Null)). Result: <B4INativeObject: {length = 8, bytes = 0xc0e1a30200600000}>. As I understand, this is CGColorRef instead of CGColor. Why ?
Attachments
Last edited: