I have an instance where when I have a user click on a tappable view, I want them to be able to choose between launching a Photo Gallery picker screen or a Camera picker screen. I was able to get them to work individually, but when I tried to write a function/code block, I could not figure out how to get the image from the green success block. I know that I may need a delegate, or to access it, but I cannot figure out how to get the picture from that green colored response. If you could show me how to do this via a function, that would be great.
Also, do I have to use an alert view to choose between both? I saw a function that allowed an actionsheet, but did not allow the action sheet to have “options” unless I missed something?
In order to use the green success block, you need to add an empty Function Property in order for the properties dropdown to appear.
Then you can drag and drop the
brown block from the Function Properties, and after you have added it to the canvas, you can select
editedImage from the dropdown.
You can use this Image in an Image View but you need to use the relevant block
set Image as Image is not the same to the Image Asset.
OK, I think that makes sense, I will try that.
Could you show me what I would need to put in the delegates, as it shows up with a red ! when I try to manually create it
There is no need to use delegates.
You can use these blocks
Thank you, so what would I use as the true false? I assume I don’t use an action sheet, or I can make this part of one?
Yes, you can use an Action Sheet.
Specifically, you will need to create a Function Property of type
Alert Screen to store temporarily the ActionSheet. Then you can setup your action sheet with actions, and finally present it.
Got it, I was attempting to do this and i was very close, but was missing this part of it, thank you very much!
I had to modify this function a bit, it didn’t work as posted here, but I got it to work
Cool. You can post your result if you want.