iOS Question iPad Pro 13.4.1 and SelectFromPhotoLibrary

MarcoRome

Expert
Licensed User
Longtime User
Hi all this code work without problem with iPhone:

B4X:
Sub btnChoosePicture_Click
    Dim sf As Object = xui.Msgbox2Async( "VUOI CAMBIARE LA FOTO DEL TUO PROFILO ?", "App Leemon", "SI", "", "No", Null)
    Wait For (sf) Msgbox_Result (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        InitCamera
        cam.SelectFromSavedPhotos(Sender, cam.TYPE_IMAGE)
    End If
End Sub

But on iPad when i tap on button nothing happen ( No open Gallery )
if i have this code:
B4X:
Sub btnChoosePicture_Click
        InitCamera
        cam.SelectFromSavedPhotos(Sender, cam.TYPE_IMAGE)
End Sub
without MsgBox2Async work without problem also on iPad

Any idea ?
Thank you
Marco
 

MarcoRome

Expert
Licensed User
Longtime User
if replace Sender with img_uno, work
B4X:
cam.SelectFromSavedPhotos(img_uno, cam.TYPE_IMAGE)
 
Upvote 0
D

Deleted member 103

Guest
without MsgBox2Async work without problem also on iPad
then only use Msgbox, MsgBox2Async is, in my opinion, not absolutely necessary in iOS.
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
then only use Msgbox, MsgBox2Async is, in my opinion, not absolutely necessary in iOS.
Dear Filippo unfortunately it isn't so. Even by inserting an MsgBox2 on the ipad Pro 13.4.1 (both from tests carried out by us and from tests carried out by apple for this reason we realized that the ipad was not running) the problem remains
 
Upvote 0
D

Deleted member 103

Guest
Try it this way, I'll do it that way too.
B4X:
Sub btnChoosePicture_Click
    Dim image As ImageView = Sender
    InitCamera
    cam.SelectFromSavedPhotos(image, cam.TYPE_IMAGE)
End Sub
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Change your code to:
B4X:
Sub btnChoosePicture_Click
    Dim btn As B4XView = sender
    Dim sf As Object = xui.Msgbox2Async( "VUOI CAMBIARE LA FOTO DEL TUO PROFILO ?", "App Leemon", "SI", "", "No", Null)
    Wait For (sf) Msgbox_Result (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        InitCamera
        cam.SelectFromSavedPhotos(btn, cam.TYPE_IMAGE)
    End If
End Sub
 
Upvote 0
Top