I have two questions about iOS apps.
-
I have turned on “Photos Access” in Build Settings, and am using the ImagePicker control to import photos from the photo app linked to the device’s Apple ID into the app. However, when I want to open photos with ImagePicker and import multiple photos into the app, I currently have to open ImagePicker and add them one by one. I don’t need to use ImagePicker, but is it possible to select multiple photos?
-
I have a large MobileCanvas set up on the screen, and is there a way to zoom in and out of the picture displayed on the Canvas by pinching with two fingers only within this Canvas?
Thank you @Jeremie_L .
I can use MBS, but I was not able to select more than one at a time just by using this class. Do I need to set any special parameters?
Thank you.
Thanks @Jeremie_L .
I tried various things with the Xojo program of iOS Kit, but I couldn’t find any part related to zooming in/out with two fingers. I would be grateful if you could give me more details.
Thank you.
Thank you @Art_Gorski .
I am also trying this method that was suggested to me. However, the x and y coordinates of DrawPicture when resized cannot be reproduced well with the code written here, and it seems that some adjustments are necessary.
Also, in my case, I am developing something like a paint app, and I will be drawing with a pen on the enlarged picture, so it will take some time to adjust it.
Thank you.
I believe you can do this with the Gesture Recogniser object.
Before I learned that this existed, I rolled my own by detecting the fact that two points were in use,
recording their start positions, then watching how they changed.
I find the distance between them , and adjust the ‘zoom factor’ accordingly.
//In the pointerdrag event
If pointerinfo.ubound = 1 Then //multi touch ..
var thisdistance as double
var adjby as integer
static lastx,lasty as integer
thisdistance = abs(pointerinfo(0).position.DistanceTo( pointerinfo(1).position))
if lastdistance = -1 then
//just store it
lastdistance = thisdistance
else
adjby = 0
if thisdistance > lastdistance and abs (thisdistance - lastdistance) >= 10 then
adjby = 1 // I change my zoom settings in increments of 1
end if
if thisdistance < lastdistance and abs (thisdistance - lastdistance) >= 10 then
adjby = -1
end if
lastdistance = thisdistance
zoom.Value = zoom.Value + adjby
end if
Me.refresh
Exit Sub
else
lastdistance = -1
End If
1 Like
Thank you @Jeff_Tullin .
I’ll give this a try too, and report back on the results later.
i note that lastx and y are unused here.
Lastdistance and thisdistance are defined elsewhere