JSON data into UITableView with images (Swift 4 + Xcode 9.0)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 110

  • @swiftwithyash
    @swiftwithyash  2 ปีที่แล้ว

    👋 New video available with better resolution & GitHub repo 👋
    th-cam.com/video/8dn9HzNigm8/w-d-xo.html

  • @tuhodboi6360
    @tuhodboi6360 2 ปีที่แล้ว

    Swift with Yash is BEYOND GODLIKE! Thanks Man

  • @peronawu9265
    @peronawu9265 4 ปีที่แล้ว +2

    I can't believe this old tutorial helps me to solve my problem. THANKS.

  • @timothychang8284
    @timothychang8284 6 ปีที่แล้ว +2

    Your tutorials are amazing! It's easy to follow along, and very clear. Thank you so much!

  • @vyankateshshivnikar7932
    @vyankateshshivnikar7932 ปีที่แล้ว +1

    Very Nicely explained... Thanks brother.

  • @cyberespia
    @cyberespia 6 ปีที่แล้ว +2

    Excellent tutorial has served me a lot ... an additional question please:
    How to Add Pull to Refresh ?

  • @DrJoJoBoxer
    @DrJoJoBoxer 6 ปีที่แล้ว

    Excellent videos! I've watched 4 of your JSON videos. I like your content. I'm going to try to do some app on my own and have some examples to look at now for guidance. I look forward to more uploads from you.

  • @СанияДаулетханова
    @СанияДаулетханова ปีที่แล้ว

    thank u so much for the video! it helped me a lot!!^^

  • @eloh6434
    @eloh6434 6 ปีที่แล้ว

    Very good video. I know its for a quick tutorial on how to pass data and parse, but for beginners I'd suggest you use guard let instead of force-unwrap for future videos. This will help people who are learning to get into the habit of coding without such error prone syntax. Nevertheless, great video! Keep it up.

    • @swiftwithyash
      @swiftwithyash  6 ปีที่แล้ว

      I agree with you, thank you for your suggestion :).

  • @aliDevJourney
    @aliDevJourney ปีที่แล้ว

    thanks for this amazing video buddy

  • @Fonzrell1
    @Fonzrell1 6 ปีที่แล้ว

    Thank you!
    How did you create your own api?

  • @venkateshchejarla5120
    @venkateshchejarla5120 6 ปีที่แล้ว +1

    Hey there! it's a nice tutorial and it will be much better if you can explain on how to do this with "POST" method.

    • @theboywhocriedswag
      @theboywhocriedswag 6 ปีที่แล้ว

      Venkatesh Chejarla yes can you please do this?

  • @indiraamangeldinova2180
    @indiraamangeldinova2180 6 ปีที่แล้ว

    COOOOL!!!!!!! your tutorial really helped me! Thanx very much!!!!

  • @abhilashchoudhary8790
    @abhilashchoudhary8790 4 ปีที่แล้ว

    beside showing data to next vc can show that json data on alert dialouge

  • @yunusnoahoberst1677
    @yunusnoahoberst1677 7 ปีที่แล้ว

    So you download the JSON and save it locally on the phone, and then generate a table view using the downloaded data? So then you could also view the data when offline, and only download it the first time the app is launched, and reload it whenever the user had internet access?

  • @kaisouasli6019
    @kaisouasli6019 6 ปีที่แล้ว

    Hello programmers ;) !
    Nice Tuto Yash! I like the new music intro !!
    should we implement a nested enum CodingKey to rename keys as "attack_type", in order to respect Apple guidelines ?!

  • @kirid7856
    @kirid7856 6 ปีที่แล้ว

    Hi , Great tutorial. Thank you so much. Can you please show how to add search bar to this tutorial. I watched your previous videos on swift3. but could not able to get it on this tutorial.

    • @swiftwithyash
      @swiftwithyash  6 ปีที่แล้ว

      Thank you :) I will look into search bar and try to make a video on that.

    • @kirid7856
      @kirid7856 6 ปีที่แล้ว

      Yp.py hi. Still waiting for the searh bar :) just a reminder

  • @abdulsamedkilic
    @abdulsamedkilic 3 ปีที่แล้ว +1

    hi thank you for video. When I run the codes on my own computer, I get an error. Can you help me? I couldn't find the source code from the link. Can you share the source code again?
    ERROR :
    ------------------------
    keyNotFound(CodingKeys(stringValue: "attact_type", intValue: nil), Swift.DecodingError.Context(codingPath: [_JSONKey(stringValue: "Index 0", intValue: 0)], debugDescription: "No value associated with key CodingKeys(stringValue: \"attact_type\", intValue: nil) (\"attact_type\").", underlyingError: nil))
    -------------------------

  • @jonditsveniashvili8319
    @jonditsveniashvili8319 3 ปีที่แล้ว

    2021 Great tutorial bro

  • @free-palestine000
    @free-palestine000 3 ปีที่แล้ว

    thanks bro you are amazing

  • @6sl5j3hc2iroa8fjr
    @6sl5j3hc2iroa8fjr 3 ปีที่แล้ว

    How can I update simultaneously data between web server(msyql+apache+php) and iphone .

  • @flgadams
    @flgadams 6 ปีที่แล้ว +1

    Nice. Could you please explain why we need @escaping and Dispatch ? Thanks for the great video!

    • @swiftwithyash
      @swiftwithyash  6 ปีที่แล้ว

      I will try to do it in future video.

    • @vyankatesha.shivnikar696
      @vyankatesha.shivnikar696 2 ปีที่แล้ว

      @@swiftwithyash if video has been created will you share the link?

  • @yashbhatt8581
    @yashbhatt8581 6 ปีที่แล้ว

    badia videos

  • @HassansTech
    @HassansTech 7 ปีที่แล้ว

    Can you do this tutorial for Xcode 8 Swift 3 ASAP please??

  • @tusharelangovan7302
    @tusharelangovan7302 4 ปีที่แล้ว +1

    I am getting a json error

  • @mohamedmc878
    @mohamedmc878 2 ปีที่แล้ว

    I just love you

  • @praveent8848
    @praveent8848 3 ปีที่แล้ว

    Wht if url for image has spaces..... %20% and how to overcome it ..... if their r n number of images in api link.... but some links has spaces in between link....
    Any idea?

  • @RyuuzakiJulio
    @RyuuzakiJulio 6 ปีที่แล้ว

    Sorry if someone asked before. What keyboard are you using?

  • @Am1rFT
    @Am1rFT 6 ปีที่แล้ว

    In the first page, I faced the JSON ERROR which says " The data couldn’t be read because it is missing." what is wrong with mycode?!?!?

  • @MrSaud58
    @MrSaud58 6 ปีที่แล้ว

    ? Thank you, what is your search method

  • @programacion7344
    @programacion7344 4 ปีที่แล้ว

    thank you for the tutorial.

  • @gafroninja
    @gafroninja 6 ปีที่แล้ว

    6 seconds in, . Dota 2!!! :D liked already

    • @deangelokasen5942
      @deangelokasen5942 3 ปีที่แล้ว

      a trick: you can watch series at Flixzone. Me and my gf have been using it for watching a lot of movies lately.

    • @remingtontanner5004
      @remingtontanner5004 3 ปีที่แล้ว

      @Deangelo Kasen Definitely, been watching on Flixzone} for since november myself :)

    • @tysonneil6915
      @tysonneil6915 3 ปีที่แล้ว

      @Deangelo Kasen yup, I've been using Flixzone} for years myself :D

  • @sophiashao9499
    @sophiashao9499 2 ปีที่แล้ว

    Do you have a link for this code's github repository?

  • @amromansour8669
    @amromansour8669 6 ปีที่แล้ว

    Great job , please Are you configure demonstration or sample for SiriKit xcode 9 , INSEARCHForBillsIntent?

  • @harshalYanpallewar
    @harshalYanpallewar 6 ปีที่แล้ว

    hi there, i have been using the model object to store the values but you are using structure instead. any particular reason for that or just a matter of choice.....

  • @swiftcoadingcafe3355
    @swiftcoadingcafe3355 4 ปีที่แล้ว

    if we have to create data by self then what we shoud do? in the place of your url plz

  • @EdsCorporateKen
    @EdsCorporateKen 6 ปีที่แล้ว

    Great tutorial man. Thanks =]

  • @StrifePulse
    @StrifePulse 3 ปีที่แล้ว

    Project link doesn’t work, any updated link?

  • @AlexSatriani
    @AlexSatriani 6 ปีที่แล้ว +5

    whats ur mmr :D ?

  • @ИосифЛейбо-х6ж
    @ИосифЛейбо-х6ж 6 ปีที่แล้ว

    XCode say "Could not attach to pid : “7202”
    Ensure “tableVeiw-JSON” is not already running, and iosif has permission to debug it." at first run, when we check downloadJSON(). I wrote all like you. can you help me?

  • @PutraTrie
    @PutraTrie 4 ปีที่แล้ว

    how to add uisearchbar in this code?

  • @Zezistor
    @Zezistor 4 ปีที่แล้ว

    Thank you!

  • @ganeshrommula4868
    @ganeshrommula4868 6 ปีที่แล้ว

    How I should take if it is dictionary format....

  • @MrSaud58
    @MrSaud58 6 ปีที่แล้ว +1

    thank you sir!
    Please find the search bar method

    • @swiftwithyash
      @swiftwithyash  6 ปีที่แล้ว +1

      Sure

    • @MrSaud58
      @MrSaud58 6 ปีที่แล้ว +1

      Please How ?!Yp.py

    • @MrSaud58
      @MrSaud58 6 ปีที่แล้ว

      💔☹️

  • @spreader5502
    @spreader5502 7 ปีที่แล้ว

    Hey yash, great video... I was wondering if it is possible to publish your own json data online and pull it into the app. I've been trying and so far no luck

    • @swiftwithyash
      @swiftwithyash  7 ปีที่แล้ว

      Yes :)

    • @spreader5502
      @spreader5502 7 ปีที่แล้ว

      Could you maybe detail it shortly for me? Whatever I publish is returning the JSON error detailed in the swift code. If you'd rather email me it's brightworks2017@gmail.com. I'd really appreciate it

  • @hamayunzeb8765
    @hamayunzeb8765 6 ปีที่แล้ว

    Mashallah ........

  • @shaileshprabhudesai6013
    @shaileshprabhudesai6013 6 ปีที่แล้ว +1

    Hello sir please guide to parse son for login page & registration page in iOS using swift

    • @MrSaud58
      @MrSaud58 6 ปีที่แล้ว

      th-cam.com/video/UPKCULKi0-A/w-d-xo.html

  • @ifateh2925
    @ifateh2925 7 ปีที่แล้ว

    Hello Yash, I have watched your all videos , all are very nice. I have a request to you, can you please make a video about encodable and Decodable in hindi.. please.

    • @swiftwithyash
      @swiftwithyash  7 ปีที่แล้ว +1

      Hello Fateh,
      Nice to know you like my videos. I cannot make a video in Hindi because i have diverse audience to teach. I am really sorry for that.
      What i can do is, i will make a video of encodable and decodable in english. You watch it, if you still have any doubt you can mail me.
      Don't worry those concept are simple and fun.
      We here at Yp.py always find a way out. :)
      Thank you,
      Yp.py and team

    • @ifateh2925
      @ifateh2925 7 ปีที่แล้ว

      Yp.py thanks.

  • @thetpaing9891
    @thetpaing9891 6 ปีที่แล้ว

    Thanks

  • @akashneeli140
    @akashneeli140 4 ปีที่แล้ว

    Thank you 🙏 ☺️

  • @alirezaeramabadi4207
    @alirezaeramabadi4207 6 ปีที่แล้ว

    thank you man ❤️

  • @madhuuda4015
    @madhuuda4015 4 ปีที่แล้ว

    in cell for row at func in table view i got error . var madhu = [DataModel](),declared as global.
    cell.textlabel?.text = madhu[indexPath.row]..error showing that Cannot assign value of type 'DataModel' to type 'String?'.please solve this

    • @zachfarmer1696
      @zachfarmer1696 2 ปีที่แล้ว

      I'm getting this same issue, any fixes for this?

  • @user-pj6wy2cz3v
    @user-pj6wy2cz3v 6 ปีที่แล้ว

    My JSON return data like:
    {
    "count": 1
    "news": [
    {
    "text": "text"
    "date": "12.34.56"
    }
    ]
    }
    what should i do to get "text" value and "date" value. when trying to init var news = [String], im getting parsing error, smth like dictionaries wasn't expected

    • @user-pj6wy2cz3v
      @user-pj6wy2cz3v 6 ปีที่แล้ว

      now i know hot to get it, but i cant really put it inside table. give me some tips please

  • @theglobalrecreation292
    @theglobalrecreation292 4 ปีที่แล้ว

    i don't know why I'm getting this error JSON ERROR i follow your whole idea i even go to emulator settings and "Allow HTTP Service" but still i m getting JSON ERROR I'm Also usig same api

    • @jarapps9760
      @jarapps9760 4 ปีที่แล้ว

      struct HeroStats: Decodable {
      let localized_name : String
      let img: String
      let primary_attr: String
      let name: String
      }
      make sure this is correct.

  • @abubakerkaballo1071
    @abubakerkaballo1071 6 ปีที่แล้ว

    Can you teach us how to upload photos? please

    • @kyoiori99
      @kyoiori99 6 ปีที่แล้ว

      you can upload photos with multipart form data using Alamofire

  • @badftj
    @badftj 7 ปีที่แล้ว

    thank you sir!

  • @bernhardsummer5623
    @bernhardsummer5623 7 ปีที่แล้ว

    Followed the exact steps, however when I run the app, I always receive a Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386 ) at part: destination.hero = heros[(tableView.indexPathForSelectedRow?.row)!] . What can I do to solve this?

    • @swiftwithyash
      @swiftwithyash  7 ปีที่แล้ว

      Try it again. Send me full error.

    • @bernhardsummer5623
      @bernhardsummer5623 7 ปีที่แล้ว

      Thanks for your fast reply. The full error message is: Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

  • @Abdi-uy1kh
    @Abdi-uy1kh 6 ปีที่แล้ว

    Could you please tell me how to make the json data. How would I make it if i wanted to make my own app with its own data from a server. For example I want to make a store app and I need to get images and labels from a server how would i make the api like in the description?

    • @arwal9303
      @arwal9303 6 ปีที่แล้ว

      same as you. i wanna know how .. help us

    • @Abdi-uy1kh
      @Abdi-uy1kh 6 ปีที่แล้ว

      Arwa L, I found out the answer which is, you have to use node.js,Go, python or java to make the api. Any server side language. Swift has one called server side swift but it is not that great. I will learn Node.js to make apis

    • @gafroninja
      @gafroninja 6 ปีที่แล้ว

      You can create a static JSON file without all of that. Search create JSON File online. Fill in your details, save and upload somewhere.

  • @karthickdarkstar
    @karthickdarkstar 6 ปีที่แล้ว

    I got the son error instead of successful, how should I rectify that.

    • @swiftwithyash
      @swiftwithyash  6 ปีที่แล้ว

      Can you be more descriptive?

    • @karthickdarkstar
      @karthickdarkstar 6 ปีที่แล้ว

      Yp.py i got the JSON ERROR instead of successful at 10:13, i dont know how should i rectify that. And also i have nested dictionary and then array in my json . Will the nested dictionary affect the method u follow for paresing .

  • @mohdshadab05
    @mohdshadab05 7 ปีที่แล้ว

    Nice video brooo

  • @turalveli2196
    @turalveli2196 7 ปีที่แล้ว

    Hi, can you make slide menu?

    • @swiftwithyash
      @swiftwithyash  7 ปีที่แล้ว

      I have exactly what you want :)
      th-cam.com/video/mmSEidHEGL8/w-d-xo.html
      Let me know if you like it or not.
      Thank you :)

  • @Afroz50
    @Afroz50 6 ปีที่แล้ว

    Thank yo very much Yp. I love to watch your videos and like you way of presentation. I have used your code of JSON decoding but I am getting tough time to handle null record. Would you please suggest some code to deal with null.
    "SiteType": 1,
    "SeaTemp": null,
    "SeaLevel": null,
    "Velocity": "N/A",
    I am getting the following error;
    valueNotFound(Swift.String, Swift.DecodingError.Context(codingPath: [Foundation.(_JSONKey in _12768CA107A31EF2DCE034FD75B541C9)(stringValue: "Index 0", intValue: Optional(0)), SwiftTest.WeatherStats.(CodingKeys in _FC90364A6CFA746F6BCC27292B607B0C).SeaTemp], debugDescription: "Expected String value but found null instead.", underlyingError: nil))

    • @jeremyolu2787
      @jeremyolu2787 3 ปีที่แล้ว

      in your struct where you declare your json attributes , make the nullable field an optional e.g var title: String?

  • @Govind_Lipne
    @Govind_Lipne 4 ปีที่แล้ว

    How to set a cell color according to number of legs
    I mean different colour for 4 legs
    Different colour for 3 leg superhero

    • @swiftwithyash
      @swiftwithyash  4 ปีที่แล้ว

      Before setting the cell color you can have if else statement to check whether the hero has 4 legs or 3.

  • @abogdzie
    @abogdzie 6 ปีที่แล้ว

    How I hate storyboards. Bleeee.

  • @cjdawg1250
    @cjdawg1250 4 ปีที่แล้ว

    I am getting error from inside downloadJSON function. When i go to the detail view controller it crashes and my error is that my tableView.reloadData() is coming back nil after i swap screens