iOS Question Imageview: remove bitmap ?

MitchBu

Well-Known Member
Licensed User
Longtime User
I tried this to remove the bitmap from an imageview:


B4X:
myImageview.bitmap = null

The app fails silently. Is there something I need to know ?

Thank you.
 

MitchBu

Well-Known Member
Licensed User
Longtime User
Best to use B4XImageView (XUI Views) and clear it with Clear method.

ImageView.Bitmap = Null should also work. I guess that the problem is somewhere else.

I made sure to remove any code after ImageView.Bitmap = Null. Apparently it is that which quits.

I will try Xui views. Thank you Erel :)
 
Upvote 0

MitchBu

Well-Known Member
Licensed User
Longtime User
In B4i, XUIViews is only Version 2.35, so it does not have B4XImageView.

As for the error I get:


B4X:
End Placer
---IVChecklogo_Click
yes, delete picture
Error occurred on line: 686 (Main)
Object was not initialized (UIImage)
Stack Trace: (
  CoreFoundation       6FD5304A-9759-3E22-A863-456EAB55F4CC + 1157612
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       6FD5304A-9759-3E22-A863-456EAB55F4CC + 120016
  Check Printer Plus   -[B4IObjectWrapper object] + 136
  Check Printer Plus   -[B4IImageViewWrapper setBitmap:] + 72
  CoreFoundation       6FD5304A-9759-3E22-A863-456EAB55F4CC + 1175856
  CoreFoundation       6FD5304A-9759-3E22-A863-456EAB55F4CC + 8656
  Check Printer Plus   +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
  Check Printer Plus   -[B4IShell runMethod:] + 448
  Check Printer Plus   -[B4IShell raiseEventImpl:method:args::] + 1648
 Check Printer Plus   -[B4IShellBI raiseEvent:event:params:] + 1580
 Check Printer Plus   -[B4IDebugResumableSub resume::] + 356
 Check Printer Plus   -[B4I checkAndRunWaitForEvent:event:params:] + 516
 Check Printer Plus   -[B4IShellBI raiseEvent:event:params:] + 1436
 Check Printer Plus   __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
 libdispatch.dylib    04B54A98-8EAD-371E-8C12-AD116CB118E2 + 393880
 libdispatch.dylib    04B54A98-8EAD-371E-8C12-AD116CB118E2 + 397952
 libdispatch.dylib    04B54A98-8EAD-371E-8C12-AD116CB118E2 + 65628
 CoreFoundation       6FD5304A-9759-3E22-A863-456EAB55F4CC + 632288
 CoreFoundation       6FD5304A-9759-3E22-A863-456EAB55F4CC + 608904
 CoreFoundation       CFRunLoopRunSpecific + 572
 GraphicsServices     GSEventRunModal + 160
 UIKitCore            3405666F-F281-3F71-BA86-83E5A27AB5B0 + 11723736
 UIKitCore            UIApplicationMain + 164
 Check Printer Plus   main + 128
 libdyld.dylib        FC5D448B-5EE3-3786-86E7-CCE6C21A212B + 5480
)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top