iOS Question Solved - xResizeAndCrop

tsteward

Well-Known Member
Licensed User
Longtime User
When using xResizeAndCrop by Klaus
I get the following error when trying to use your library on iOS.
Works fine on Android (gee I seem to be saying that a lot)

Line is:
xResizeAndCrop1.CroppedView = pnlCroppedImage

Error is:
Error occurred on line: 381 (xResizeAndCrop)
CALayer bounds contains NaN: [0 0; nan 115]
Stack Trace: (
CoreFoundation <redacted> + 252
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation <redacted> + 0
QuartzCore <redacted> + 168
QuartzCore <redacted> + 140
UIKitCore <redacted> + 412
LARA 4 -[UIView(B4I) setWidth:] + 164
LARA 4 -[B4IViewWrapper setWidth:] + 96
LARA 4 -[B4XViewWrapper setWidth:] + 60
LARA 4 -[b4i_xresizeandcrop _extractcroppedimage:] + 1980
LARA 4 -[b4i_xresizeandcrop _setcroppedview::] + 1040
CoreFoundation <redacted> + 144
CoreFoundation <redacted> + 292
LARA 4 +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
LARA 4 -[B4IShell runMethod:] + 448
LARA 4 -[B4IShell raiseEventImpl:method:args::] + 1648
LARA 4 -[B4IShellBI raiseEvent:event:params:] + 1580
LARA 4 __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
libdispatch.dylib <redacted> + 24
libdispatch.dylib <redacted> + 16
libdispatch.dylib <redacted> + 1068
CoreFoundation <redacted> + 12
CoreFoundation <redacted> + 1924
CoreFoundation CFRunLoopRunSpecific + 436
GraphicsServices GSEventRunModal + 104
UIKitCore UIApplicationMain + 212
LARA 4 main + 128
libdyld.dylib <redacted> + 4
)
 

tsteward

Well-Known Member
Licensed User
Longtime User
Also not sure why this line is underlined saying it was not initialised
Private xResizeAndCrop1 As xResizeAndCrop
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
In B4I you need to call Initialize subroutine before using any class method.
No need to worry about a custom view due to LoadLayout. But for standard class you need to call Initialize explicitly.
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
In B4I you need to call Initialize subroutine before using any class method.
No need to worry about a custom view due to LoadLayout. But for standard class you need to call Initialize explicitly.
Thank you, that helped me to re-look at my code and realise that I had a copy and paste error in the designer.
 
Upvote 0
Top