E epneeh Member Licensed User Longtime User Mar 11, 2025 #1 Hello, i'm porting my established android app to ios app, my app is using AS_TabMenuAdvanced which is working fine on android, unfortunately there's crash when setbitmap on middle icon B4X: Copy Dim wi As Int =tabMenu.MiddleButtonLabel.Width Dim he As Int =tabMenu.MiddleButtonLabel.Height tabMenu.MiddleButtonLabel.SetBitmap(LoadBitmapResize(File.DirAssets,"fr.png",wi,he,True)) Code: Copy Copying updated assets files (1) Application_Start init db Application_Active FCMConnected Class (b4i_httpjob) instance released. Class (b4i_ihttpclient) instance released. Class (b4i_httpjob) instance released. Error occurred on line: 483 (AS_TabMenuAdvanced) Type does not match (UILabel) Stack Trace: ( CoreFoundation __exceptionPreprocess + 242 libobjc.A.dylib objc_exception_throw + 62 CoreFoundation -[NSException initWithCoder:] + 0 HADIRKU -[B4XViewWrapper throwTypeDoesNotMatch] + 90 HADIRKU -[B4XViewWrapper SetBitmap:] + 195 CoreFoundation __invoking___ + 140 CoreFoundation -[NSInvocation invoke] + 302 HADIRKU +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1519 HADIRKU -[B4IShell runVoidMethod] + 184 HADIRKU -[B4IShell raiseEventImpl:method:args::] + 1696 HADIRKU -[B4IShellBI raiseEvent:event:params:] + 1354 HADIRKU -[b4i_fmhome _show] + 158 HADIRKU -[ResumableSub_main_initApp resume::] + 4616 CoreFoundation __invoking___ + 140 CoreFoundation -[NSInvocation invoke] + 302 HADIRKU +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1519 HADIRKU -[B4IShell runMethod:] + 384 HADIRKU -[B4IShell raiseEventImpl:method:args::] + 2098 HADIRKU -[B4IShellBI raiseEvent:event:params:] + 1354 HADIRKU -[B4IDelegatableResumableSub resume::] + 366 HADIRKU -[B4I checkAndRunWaitForEvent:event:params:] + 482 HADIRKU -[B4IShellBI raiseEvent:event:params:] + 1205 HADIRKU __37-[B4ICommon ReturnFromResumableSub::]_block_invoke + 279 libdispatch.dylib _dispatch_call_block_and_release + 12 libdispatch.dylib _dispatch_client_callout + 8 libdispatch.dylib _dispatch_main_queue_drain + 1417 libdispatch.dylib _dispatch_main_queue_callback_4CF + 31 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 CoreFoundation __CFRunLoopRun + 2515 CoreFoundation CFRunLoopRunSpecific + 536 GraphicsServices GSEventRunModal + 137 UIKitCore -[UIApplication _run] + 875 UIKitCore UIApplicationMain + 123 HADIRKU main + 104 dyld start_sim + 10 ??? 0x0 + 4645122885 ) Class (b4i_ihttpclient) instance released. any idea?
Hello, i'm porting my established android app to ios app, my app is using AS_TabMenuAdvanced which is working fine on android, unfortunately there's crash when setbitmap on middle icon B4X: Copy Dim wi As Int =tabMenu.MiddleButtonLabel.Width Dim he As Int =tabMenu.MiddleButtonLabel.Height tabMenu.MiddleButtonLabel.SetBitmap(LoadBitmapResize(File.DirAssets,"fr.png",wi,he,True)) Code: Copy Copying updated assets files (1) Application_Start init db Application_Active FCMConnected Class (b4i_httpjob) instance released. Class (b4i_ihttpclient) instance released. Class (b4i_httpjob) instance released. Error occurred on line: 483 (AS_TabMenuAdvanced) Type does not match (UILabel) Stack Trace: ( CoreFoundation __exceptionPreprocess + 242 libobjc.A.dylib objc_exception_throw + 62 CoreFoundation -[NSException initWithCoder:] + 0 HADIRKU -[B4XViewWrapper throwTypeDoesNotMatch] + 90 HADIRKU -[B4XViewWrapper SetBitmap:] + 195 CoreFoundation __invoking___ + 140 CoreFoundation -[NSInvocation invoke] + 302 HADIRKU +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1519 HADIRKU -[B4IShell runVoidMethod] + 184 HADIRKU -[B4IShell raiseEventImpl:method:args::] + 1696 HADIRKU -[B4IShellBI raiseEvent:event:params:] + 1354 HADIRKU -[b4i_fmhome _show] + 158 HADIRKU -[ResumableSub_main_initApp resume::] + 4616 CoreFoundation __invoking___ + 140 CoreFoundation -[NSInvocation invoke] + 302 HADIRKU +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1519 HADIRKU -[B4IShell runMethod:] + 384 HADIRKU -[B4IShell raiseEventImpl:method:args::] + 2098 HADIRKU -[B4IShellBI raiseEvent:event:params:] + 1354 HADIRKU -[B4IDelegatableResumableSub resume::] + 366 HADIRKU -[B4I checkAndRunWaitForEvent:event:params:] + 482 HADIRKU -[B4IShellBI raiseEvent:event:params:] + 1205 HADIRKU __37-[B4ICommon ReturnFromResumableSub::]_block_invoke + 279 libdispatch.dylib _dispatch_call_block_and_release + 12 libdispatch.dylib _dispatch_client_callout + 8 libdispatch.dylib _dispatch_main_queue_drain + 1417 libdispatch.dylib _dispatch_main_queue_callback_4CF + 31 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 CoreFoundation __CFRunLoopRun + 2515 CoreFoundation CFRunLoopRunSpecific + 536 GraphicsServices GSEventRunModal + 137 UIKitCore -[UIApplication _run] + 875 UIKitCore UIApplicationMain + 123 HADIRKU main + 104 dyld start_sim + 10 ??? 0x0 + 4645122885 ) Class (b4i_ihttpclient) instance released. any idea?
Solution E E epneeh Mar 11, 2025 Alexander Stolte said: but you can't compare android with ios, the label under ios can't be assigned an image, that's why i wrote the example project i showed you Click to expand... Thanks for clear explaination, i think i have to add normal button instead.
Alexander Stolte said: but you can't compare android with ios, the label under ios can't be assigned an image, that's why i wrote the example project i showed you Click to expand... Thanks for clear explaination, i think i have to add normal button instead.
Alexander Stolte Expert Licensed User Longtime User Mar 11, 2025 #2 epneeh said: MiddleButtonLabel.SetBitmap Click to expand... Its a label and not a image view. You cant add images to a label. Follow this example: [B4X] AS_TabMenuAdvanced Custom Middle Button In this example we add a MiddleButton that is larger than the internal one and is outside the TabMenu. https://www.b4x.com/android/forum/threads/b4x-xui-as-tabmenuadvanced.140907/ AS_TabMenuAdvanced1.MiddleButtonProperties.Visible = False 'Makes the lib. MiddleButton invisible... www.b4x.com Upvote 0
epneeh said: MiddleButtonLabel.SetBitmap Click to expand... Its a label and not a image view. You cant add images to a label. Follow this example: [B4X] AS_TabMenuAdvanced Custom Middle Button In this example we add a MiddleButton that is larger than the internal one and is outside the TabMenu. https://www.b4x.com/android/forum/threads/b4x-xui-as-tabmenuadvanced.140907/ AS_TabMenuAdvanced1.MiddleButtonProperties.Visible = False 'Makes the lib. MiddleButton invisible... www.b4x.com
E epneeh Member Licensed User Longtime User Mar 11, 2025 #3 Alexander Stolte said: Its a label and not a image view. You cant add images to a label. Follow this example: [B4X] AS_TabMenuAdvanced Custom Middle Button In this example we add a MiddleButton that is larger than the internal one and is outside the TabMenu. https://www.b4x.com/android/forum/threads/b4x-xui-as-tabmenuadvanced.140907/ AS_TabMenuAdvanced1.MiddleButtonProperties.Visible = False 'Makes the lib. MiddleButton invisible... www.b4x.com Click to expand... thanks for reply, i already check custom middle button, but none say it can add image this is a preview from same library on android, i know it is a label, on b4a it is version 1.11 on b4i it is version 1.17, but on android it is work adding image to middle button Upvote 0
Alexander Stolte said: Its a label and not a image view. You cant add images to a label. Follow this example: [B4X] AS_TabMenuAdvanced Custom Middle Button In this example we add a MiddleButton that is larger than the internal one and is outside the TabMenu. https://www.b4x.com/android/forum/threads/b4x-xui-as-tabmenuadvanced.140907/ AS_TabMenuAdvanced1.MiddleButtonProperties.Visible = False 'Makes the lib. MiddleButton invisible... www.b4x.com Click to expand... thanks for reply, i already check custom middle button, but none say it can add image this is a preview from same library on android, i know it is a label, on b4a it is version 1.11 on b4i it is version 1.17, but on android it is work adding image to middle button
Alexander Stolte Expert Licensed User Longtime User Mar 11, 2025 #4 epneeh said: but on android it is work adding image to middle button Click to expand... but you can't compare android with ios, the label under ios can't be assigned an image, that's why i wrote the example project i showed you Upvote 0
epneeh said: but on android it is work adding image to middle button Click to expand... but you can't compare android with ios, the label under ios can't be assigned an image, that's why i wrote the example project i showed you
E epneeh Member Licensed User Longtime User Mar 11, 2025 #5 Alexander Stolte said: but you can't compare android with ios, the label under ios can't be assigned an image, that's why i wrote the example project i showed you Click to expand... Thanks for clear explaination, i think i have to add normal button instead. Upvote 0 Solution
Alexander Stolte said: but you can't compare android with ios, the label under ios can't be assigned an image, that's why i wrote the example project i showed you Click to expand... Thanks for clear explaination, i think i have to add normal button instead.