iOS Question Strange nativeObject.RunMethod results

Semen Matusovskiy

Well-Known Member
Licensed User
I need to convert UIColor to CGColor (to set border color in a layer).
At first, I used Objective-C.
- (NSObject *) UIColorToCGColor: (UIColor *) u { return [u CGColor]; }
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 ?


    1.1 KB · Views: 50
Last edited: