Swift for Beginners: Select Photo from Library iOS (2020)

Поделиться
HTML-код
  • Опубликовано: 7 июл 2024
  • iOS Academy offers the #1 course for iOS Development for Beginners. Learn to create iPhone and iPad apps from scratch. Everyone these days has an app idea; learn the important skill of making those apps, make yourself more marketable, change industries to get a different job, and enjoy the ride!
    This video is brought to you by Skillshare - an only community of teachers sharing awesome skills. Use the following link to get 2 months of FREE premium: www.skillshare.com/r/user/afraz
    💻 Source Code: / iosacademy
    🎥 Subscribe for more: ruclips.net/user/iOSAcademy?su...
    😎 Like my teaching style? Check out some of my most popular courses! courses.iosacademy.io

Комментарии • 57

  • @garrettshawstad7540
    @garrettshawstad7540 3 года назад +5

    Awesome! Could you provide info or a vid for saving said photo that’s now imported and shown in the app? Closing app removes it from ui, but can it stay after closing?

  • @RahulSharma-ru9yp
    @RahulSharma-ru9yp Год назад

    Thank you, you explain very well and step by step.

  • @michap.7343
    @michap.7343 3 года назад +2

    Man, you're the MVP!!! Love the channel, keep up the good work

  • @runningman7001
    @runningman7001 Год назад +4

    Why do I get an error in line 35?
    Writing :”Cannot find ‘imageView’ in scope.

  • @jaylensmith6308
    @jaylensmith6308 2 года назад

    This is perfect! Anyway to have it select only 2 images?

  • @v1lIo
    @v1lIo 3 года назад +3

    Man, you are truly awesome!
    You literally saved me)

  • @edcunningham5562
    @edcunningham5562 3 года назад +2

    thanks, i love how you describe whats happening very logically

    • @iOSAcademy
      @iOSAcademy  3 года назад

      Thanks

    • @edcunningham5562
      @edcunningham5562 3 года назад

      @@iOSAcademy also do you have any idea how to only allow the user to select a square crop of an image from in photo library?

    • @edcunningham5562
      @edcunningham5562 3 года назад

      @@iOSAcademy nevermind, found the solution- set editing as false in the iamge picker and used the 3rd party library CropViewCropper to handle cropping

  • @BranGaming20
    @BranGaming20 2 года назад

    i need to send the image to api post method after it changed, where i should call the api code? in extension?

  • @bitsurfer0101
    @bitsurfer0101 2 года назад

    How would change the didTapButton function in order to select videos?

  • @ABC-tv9zy
    @ABC-tv9zy 10 месяцев назад

    Thank👍

  • @brianwalsh7040
    @brianwalsh7040 3 года назад +5

    Life saver thank you!
    What is the difference of using extension like you did vs calling the delegates with the class declaration like this
    class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { ..... }

    • @selvavigneshnagarajan6409
      @selvavigneshnagarajan6409 3 года назад

      Bro, I have a error in my console which says Connection to plugin invalidated while in use while opening Photo Library. What do I have to do?. Please Guide me through.

  • @jonathanhernandez3628
    @jonathanhernandez3628 2 года назад +1

    awsome saved my entire day!

  • @thainam2000
    @thainam2000 Год назад

    How to set ratio when pick image, ex 1x1, 2x3, 3x2. please help me!

  • @jestinsaji8246
    @jestinsaji8246 2 года назад

    how can i set an option like select gallery or camera

  • @VictorMoreno-ed2dl
    @VictorMoreno-ed2dl 2 года назад +1

    Incrredible lessons

  • @DandunAdi
    @DandunAdi 4 года назад +3

    09:30 you can use info[UIImagePickerController.InfoKey.editedImage]

  • @heewonJ-ys2og
    @heewonJ-ys2og Год назад

    Great video

  • @seanharris5594
    @seanharris5594 3 года назад

    Does anyone know how to modify this code to select a video?

  • @alextodorow835
    @alextodorow835 Год назад

    How would I save this image to a database and have the selected image stay and upload as the selected image?

  • @donnyc2165
    @donnyc2165 3 года назад +1

    Thanks for the video! Can you do a video for the PHPickerViewController?

    • @iOSAcademy
      @iOSAcademy  3 года назад +1

      Thanks & i have one already

    • @donnyc2165
      @donnyc2165 3 года назад

      @@iOSAcademy I’ll look it up. Thanks so much for your videos!

  • @lujain3335
    @lujain3335 4 года назад +1

    this video was useful ,however chancel and choose don't work well with me
    does anyone know why?

    • @gurikn9289
      @gurikn9289 3 года назад

      Add dismiss(animated: true, completion: nil) after imageview.image = image

  • @himanskss3749
    @himanskss3749 3 года назад

    how to select video?

  • @Brillig2
    @Brillig2 Год назад

    Instead of struggling with that key, inside the [] just type a . (then you get a list of available keys). Select the one you want. Simple.

  • @weebpianoguy720
    @weebpianoguy720 3 года назад +1

    would this also work with the tap gesture?

    • @weebpianoguy720
      @weebpianoguy720 3 года назад

      NVM AFTER WATCHING THIS TUTORIAL I DID THE SANME THING WITH A TAP GESTURE AND IT WORKED
      THXXX SO MUCH IOS ACADEMY

    • @weebpianoguy720
      @weebpianoguy720 3 года назад +1

      Already did =)

  • @wrustem2
    @wrustem2 3 года назад +1

    If I want select several photos, which I can do it ?

    • @iOSAcademy
      @iOSAcademy  3 года назад

      Youd need a custom component

  • @laviniaenroute6525
    @laviniaenroute6525 3 года назад

    I wrote the code for the imageview but it's not showing up when I'm trying to drag and connect it to the storyboard

    • @iOSAcademy
      @iOSAcademy  3 года назад

      Either add it as a subview or make sure you add constraints

  • @rehanshah3485
    @rehanshah3485 3 года назад

    How i select a video kindly guide me

    • @iOSAcademy
      @iOSAcademy  3 года назад

      You can set file type on the picker itself

  • @aksanazir753
    @aksanazir753 3 года назад

    i want this image to upload on firebase without displaying it. can u please help?

    • @iOSAcademy
      @iOSAcademy  3 года назад

      You can just do it in the background

    • @BranGaming20
      @BranGaming20 2 года назад

      @@iOSAcademy what does in the background mean?

  • @theyreheretokillus
    @theyreheretokillus 2 года назад +1

    no safari

  • @jelanidejonge4640
    @jelanidejonge4640 3 года назад

    my image is not loading but i get no build errors

    • @jelanidejonge4640
      @jelanidejonge4640 3 года назад

      when i do an else statement the image i put in the else statement loads

  • @janmensik9150
    @janmensik9150 2 года назад

    today you need pick photo and take photo under same button

  • @sonso7096
    @sonso7096 2 года назад

    Nghe dọng buồn cười vải

  • @sandhyanallamilli2842
    @sandhyanallamilli2842 Год назад +2

    STOP ZOOOOOOOOOOOOOOOOOOOOOOOOOOOOMING BRO PLEASE

  • @qaiserkhan5772
    @qaiserkhan5772 2 года назад

    Better to make videos in Urdu Brother that would help plenty of those who can't understand English meanwhile user accent is much different to understand for some ppl...

  • @sashamaksyutenko7169
    @sashamaksyutenko7169 11 месяцев назад

    hello
    how to add photos which i want to menu where i choosing photos - image picker ? i have that photos in assets