I try the code from this thread:
but i get this Error:
Output without UIColorToColor:
How to use NativeObject borderColor to reset border color
Using the DraggableView class that was attached to some other post, I am adding an Undrag method to the class. I like that it changes the border of the panel to red to show it is dragging, but upon "fixing" its location, I want the border to return to the original color. I am storing the...
www.b4x.com
B4X:
Dim NaObj As NativeObject = pnl
Dim BorderUIColor As Int = NaObj.UIColorToColor(NaObj.GetField("layer").GetField("borderColor"))
B4X:
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Application_Active
Error occurred on line: 237 (ASSegmentedTab)
-[__NSCFType getRed:green:blue:alpha:]: unrecognized selector sent to instance 0x600003861a40
Stack Trace: (
CoreFoundation __exceptionPreprocess + 242
libobjc.A.dylib objc_exception_throw + 48
CoreFoundation +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
CoreFoundation ___forwarding___ + 1455
CoreFoundation _CF_forwarding_prep_0 + 120
B4i Example -[B4I UIColorToColor:] + 75
B4i Example -[B4INativeObject UIColorToColor:] + 97
CoreFoundation __invoking___ + 140
CoreFoundation -[NSInvocation invoke] + 305
B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1650
B4i Example -[B4IShell runMethod:] + 401
B4i Example -[B4IShell raiseEventImpl:method:args::] + 1775
B4i Example -[B4IShellBI raiseEvent:event:params:] + 1357
B4i Example +[B4IDebug delegate:::] + 72
B4i Example -[b4i_assegmentedtab _setcircleclip:::] + 429
B4i Example -[b4i_assegmentedtab _base_resize:::] + 665
CoreFoundation __invoking___ + 140
CoreFoundation -[NSInvocation invoke] + 305
B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1650
B4i Example -[B4IShell runMethod:] + 401
B4i Example -[B4IShell raiseEventImpl:method:args::] + 2361
B4i Example -[B4IShellBI raiseEvent:event:params:] + 1357
B4i Example +[B4IObjectWrapper raiseEvent:::] + 273
B4i Example __30-[B4IPanelView layoutSubviews]_block_invoke + 858
libdispatch.dylib _dispatch_call_block_and_release + 12
libdispatch.dylib _dispatch_client_callout + 8
libdispatch.dylib _dispatch_main_queue_callback_4CF + 1045
CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
CoreFoundation __CFRunLoopRun + 2781
CoreFoundation CFRunLoopRunSpecific + 567
GraphicsServices GSEventRunModal + 139
UIKitCore -[UIApplication _run] + 912
UIKitCore UIApplicationMain + 101
B4i Example main + 112
libdyld.dylib start + 1
)
B4X:
<B4INativeObject: <CGColor 0x600003442dc0> [<CGColorSpace 0x6000034486c0> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1; extended range)] ( 1 1 1 1 )>