Table View Cell Action In Xcode 8 (Swift 3)

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

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

  • @Алеся-н9п
    @Алеся-н9п 2 ปีที่แล้ว

    For the first time I see that it's possible to write variables outside the class/structure in the project except for the playground O.o
    Incredible!

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

    This concept is essential and almost always horribly explained especially here on youtube. This was simple, but very essential. Can't thank you enough.

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

    man you are awesome! very clear and detailed. my transition from Python has been a joy with your videos

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

      Super glad to hear that Eric. Thank you for that:)

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

    This was so helpful! Thank you for taking the time to clarify exactly what the functions did.

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

      Hi there jen7jack, I cant seem to get my file to work when I add the myImageView syntax. If I removed it, it works seemlessly ... here is the code snippet I was using ... tipimage.image = UIImageView(named: study_tips[myindex] +".png") .... if you spot any errors please let me know ... so my array is called study tips and I want to display a study tip icon image similar to what he used in the exercise ... thanks in advance

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

    you always used to upload a very helpful video for me but now I'm not able to provide gapping between cells.
    Your help will really let me escape from this.
    Waiting for a favourable response.
    Thanks

  • @kuldeepmaheshwari1209
    @kuldeepmaheshwari1209 5 ปีที่แล้ว

    Bro a grand salute to you . you are my programming god

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

    you deserve a grammy

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

    So simple :D I tried following along with other videos on TH-cam but failed. Thank you :)

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

    Great! Do you have a video that shows how to create different landscape designs than the portrait view?
    The calculator app on the iPhone is a good example of what I'm looking for. In portrait it's a simple calculator, but in landscape it expands to have more information + keeps the portrait stuff on the right + has the label stretch over the top.

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

    Great tutorial! Answered everyone of my questions.

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

      Super glad to hear that!

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

    OMG thank you thank you I've been looking for this for months!

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

    You are my hero! Thank you so much for making this tutorials

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

    Can this be done with local videos instead of images? Your videos are great!

  • @Jorge-uj9yb
    @Jorge-uj9yb 7 ปีที่แล้ว

    AMAZING!!! love it, I was looking for examples like this for 1 month, GREETINGS FROM PERÚ!

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

      Glad that the video was able to help you out!:)

  • @ethansarif-kattan5445
    @ethansarif-kattan5445 7 ปีที่แล้ว

    You are literally amazing

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

    Loving your videos so far! Keep up the good work :)

  • @EnderOkada
    @EnderOkada 5 ปีที่แล้ว

    Great video! Thank you.

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

    Excellent tutorial once again!

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

    Hey, very good tutorial. Quick question, if I have other a hundred cells in my tableview and I want to reroute each one to a view controller, what is the best practice that I can do to route to those hundred view controllers without manually creating all those view controllers? Please get back to me, this will help me a lot! thank you in advance.

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

    hey, really appreciated the video! your explanation was awesome.

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

    Hi Sebastian !! Im learning swift by watching ur videos they are helping me a lot ......would u please upload video for app deployment ...u have done it for submitting app to appstore.....but features like test flight , beta version and how to create certificates - production and development etc etc not their can u make one tutorial by combining all these things!

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

    this was very helpful, THANK YOU

  • @SandeepSingh-lg7bq
    @SandeepSingh-lg7bq 7 ปีที่แล้ว

    Super video, you made it very easy to understand. Thanks bro..... keep it up

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

    Great videos, how to make custom static cell at the bottom of dynamic cell? please help!

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

    Hi, can it be done the same for custom tableview? All tutorials are showing implementation for uitableviews, but none for custom tableview.

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

    Hey, thanks for this! im using it with firebase and works like a charm, Im just having one issue and that is when I go to the second view controller and then back to the Table view, the data that was in the table view is duplicated, for example if I had (Cat,Dog,Rabbit) when i go back to the table view it becomes (Cat,Dog,Rabbit,Cat,Dog,Rabbit). Any idea why.

  • @Rick-eo3qr
    @Rick-eo3qr 7 ปีที่แล้ว

    Really great video!!! You're a hero!😀😀👌👌

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

    Thank you for this great tutorial.
    var and arrays are above the class TableViewController. I understand it is more easy to perform segue to the viewController and find data everywhere with less code, but is there a problem to do this way?. Maybe the AppStore do not validate this method or it is a solution only for small app? (ps : sorry for my english)

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

    Hi, Sebastian! Thank you for your videos! They've been helping me out a lot! Do you have Github?

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

      Super glad to hear that!:) No I Dont:/

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

    Great tutorial! and the explanation, awesome!!! cheers Swift Guy!

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

    Is it possible to group the list?
    example:
    food:
    view 1
    animal:
    view 2 /3

  • @MarvelousLXVII
    @MarvelousLXVII 5 ปีที่แล้ว

    How did the pets and petDesc arrays pass to the new view controller?

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

    thanks, its very simple explanation

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

    Great videos and didactic. Congrats

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

    its really helped me ... good explanation.. i appreciate that.

  • @hyewonpark9432
    @hyewonpark9432 5 ปีที่แล้ว

    thank you for clear and easy explanation x)

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

    Great tutorial, thank you!!
    Is it possible to lock the other views, and unlock 1 each day? Would be great if you could make a video about this! Thumbs up!

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

    Hello Sebastian
    I could not get this to work.
    You introduce this tutorial suggesting one watch your tutorial 'How To Create Custom TableView Cells. I did. It worked. In this tutorial you implement dataSource and delegate outlets. You also implement UITableViewDelegate and ...DataSource .
    But in Table View Cell Action implementing these protocols(?) produces errors. Do you have any idea of the issue I am trying to understand. Thanks

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

    Thank you, that tutorial really helped me!

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

    Hey there is no button u show in your thumbnail?

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

    Thank you very much. Subscribing now.

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

    this solved my problem. Thx.

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

    Thanks for the video. How would I add an arrow to the right of dog,cat,rabbit to indicate that it opens up another view?

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

      UITableViewCell has an accessoryType property you can set it like this
      cell.accessoryType = .disclosureIndicator
      this ll automatically set arrows for your cells

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

    Great tutorial. How about a tutorial that shows a segue to another tableview when user taps cell. Thanks

  • @OlafPeter
    @OlafPeter 5 ปีที่แล้ว

    you are the best my brother

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

    Great video!!!

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

    cool!It`s exactly in time for me:)

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

    New to swift. WOuld u be able to upload and/or let me know if you have any video available for Loading custom tableview from API data ? I am getting lost by looking other video .... Appreciated.

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

    Hello Swift Guy! Could you please tell me the negatives of declaring a global variable after it's submitted on App Store? Because I heard that declaring global variables causes bugs...

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

    Exactly what i wanted.

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

    Hey!
    in this part:
    titleLabel.text = orador[myIndex]
    descLabel.text = texto[myIndex]
    myImageView.image = UIImage(named: orador[myIndex] + ".png")
    a fatal error appears: Unexpectedly found nil while unwrapping an Optional value.
    The only different thing I did was to change the name of the variables pets = orador and texto = petDesc.
    I tried to change myIndex to row (a tip from a comment bellow) but it didn't work anyway.
    Think you can help?

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

    thank you, i love you

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

    Thank you for the video.
    I implemented it the way you proposed, but the variable "myIndex" is not updated when I click on the cell. Please advice.

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

      Got it! My segue was made from the Table Cell View, instead of the Table View Conroller.

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

      @@ronaldvalerasantana9399 I made sure my segue is on TableViewController but still cannot access myIndex. do you remember how you accessed it?

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

      @@samuelfungcl I access myIndex variable by assigning the IndexPath "Row" property of the TableView (on didSelectRowAt action).
      This variable is used to keep track of each Cell that you access, so you can go back to the previous one.
      Make sure your segue is declared on the View property (visually).
      I wrote this code almost exactly 3 years ago (just two days shy for 3 years). I had to update XCode! Send me an email if it doesn't work.

  • @HungNguyen-oz1jc
    @HungNguyen-oz1jc 6 ปีที่แล้ว

    How do I create the detail of the pet like manually after each animal cell selection?

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

    is there anyway i can do this but with firebase? sense i have a app already with NSMutableArray not an "var xxx = ["item1", "item2",]" but iam only trying to go furter with the cell and this method does not work with NSMutableArrays

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

    Hi please can i be in i test your apps but can i email the project files as my app is not on the app store

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

    how do you do the same thing above with sections implemented?

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

    Hey, this is great. finding it hard to display the picture of cats and rabbits in their respective pages. Any help would be great.

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

    You are amazing!

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

    Thx from Russia! :)

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

      Haha awesome - would like to visit Russia sometime! You are welcome!

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

    wow thanks a lot bro!! I really love your videos!! Keep it up! :D
    I've subscribed you! Thanks thanks

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

      Glad to hear that! You are welcome:)

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

    Bra video :) Hvor lærte du deg swift?

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

    I wanna make an absent present list for groups of students, when I select on each group at the table I need to see the list of students in that group and I want that the list be checkbox able , please help me how can I do that

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

    cool!It`s,, Do you have other tutorial explain how to add date and notification for date ???
    Please Advice

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

    Losts of thanks. Clear and useful. Please, if you dispose of a bit of your precious time, a short explanation about draggable images and pangesture recognizer.

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

    HI there I am just working through with this tutorial. I am trying to implement this tutorial and was looking to have this architecture repeated 2 times. 1 for each choice that the user can tap. the user can choose from 2 buttons that will load 2 different sets of data . I have you tutorial working, but when i set up an other view / table view this table view does not show any data. I have set up a separate cocoa touch class file for this second view with all the necessary code . Any ideas as to why it would not work.

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

      i just figured out my mistake so no need to reply! thanks!!

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

      Great job!

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

    very helpful.
    thanks

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

    thanks for the video. this is what I've been looking for. I tried the tutorial. I got stuck along the way. When typing the titleLabel = pet[myIndex] in the ViewController I got an error. It says "Use of unresolved identifier 'myIndex'. Any way to resolve this? Do you know where I went wrong?

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

      Put the variable outside the class...

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

      Firebase Database ll not work inside the view did load functionif we put outside the class

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

      Drew you need to say title.text = pet [myindex]

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

      Thanks a lot! your one sentence saved my day! :)

  • @محمدفلاحة-ش8ع
    @محمدفلاحة-ش8ع 7 ปีที่แล้ว

    i want to learn how i can drag and drop image in swift 3 xcode 8?
    can you help me,please?

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

    very helpful. Thanks buddy :)

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

    fun and on point thanks

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

    so helpful thanks

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

    Could you do a tutorial for this with JSON API please?

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

    Te amooo, muchas gracias :')

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

    Im pretty new to coding but is there any reason Xcode won't let me do a ".count" with a matrix location
    Matrix.myIndex.count

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

    Awesome dude

  • @brendanberkowitz9494
    @brendanberkowitz9494 5 ปีที่แล้ว

    How do I add a search Bar to the table view?

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

    when i try to use the function "didSelectRowat" i get an error. instance row member can not be used at index Path. what's the solution?

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

    Thank's for sharing :)

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

    ty for this video

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

    thank you

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

    can anyone tell me how we can add the storyboard entry point (->)in main.storyboard if we deleted that by mistake?

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

    you are the best . thanks a lot
    I have a problem
    when I want to add image I get this error
    Type 'UIImage.Type' has no subscript members
    any help?? tnx

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

      Soraya Anvari you need to make sure that the names are exact like name of ur images and also you need to make sure that the file format is what ur images formats are in this video he used .jpg but your can be different like .png etc
      Also "you need to connect uiimageview to ur viewcontroller"

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

    if We are using Firebase database to fill our array. How can we make the array global,it shows an error

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

    This helped me a lot, but i cant figure out how i can code to get from one tableview to another one and then to something like this 😅

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

      I know, right? Why is doing the simplest thing so freaking complicated??
      Everything's so convoluted--there's a mix between doing things through the storyboard, programatically...Classes, labels, etc. that need to be named correctly...You can even programmatically add new UI options to the Storyboard interface *facepalm* (Why aren't all the possible UI features available in the first place?) Some simple things are impossible to do through the Storyboard and can only be done programmatically...It's always a toss-up of what programming is going to overwrite the settings you chose in the Storyboard and vice versa. Also, many UI design choices you try to apply in the Storyboard don't cary over at all when you actually launch your app. What is going on with this mess..Not to mention all the bugs that require cleaning the code or restarting XCode altogether or deleting IBoutlets and reassigning them

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

    I only could get "0" when I try to print out the "indexPath.row", and I still couldn't solve this problem.

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

    My images are not showing any suggestions?

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

    thank u so much :D

  • @tims.5823
    @tims.5823 5 ปีที่แล้ว

    As soon as I click on any row I get an NSException. It doesn't perform a segue. Although I did everything exactly as you did. I am getting frustrated since it's not even witchcraft :(

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

    How do I then make a "sliding gallery" with descriptions

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

    Can you add some subtitles? It'll help someone who have issues in hearing or their speaker is broken, thanks:)

  • @CJ-uu2sy
    @CJ-uu2sy 7 ปีที่แล้ว

    would global variables be the best way to do this?

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

      Depends on for what. If you are looking to store the data, then most likely no. Then Core Data would be your best option:)

    • @CJ-uu2sy
      @CJ-uu2sy 7 ปีที่แล้ว

      What I did was put the data in prepareForSegue, what do you think about doing it this way? Great tutorials btw!

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

      Actually not that great you should make new swift file where you ll create structure , you can kick of it in viewDidLoad . you can do little stuff in prepareForSegue but for more Expensive stuff its not recommended . You can actualy use userDefautls which is permanet data storage for this task

    • @CJ-uu2sy
      @CJ-uu2sy 7 ปีที่แล้ว

      I created an object class, then sent the object through the segue

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

      You could simple have var pointing to that class why do you bother segueing object

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

    How can you access pets from previous ViewController??

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

      did you manage to solve this?

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

    i have done the same and it doesnt match most of the times

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

    Any one knows how to add different sounds (mp3) to the animals? in the view with the animals explanation?

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

      You can us AVFoundation Framework
      AVAudioPlayer *_audioPlayer;
      NSString *path = [NSString stringWithFormat:@"%@/WeatherPark_08sep07.mp3", [[NSBundle mainBundle] resourcePath]];
      NSURL *soundUrl = [NSURL fileURLWithPath:path];
      // Create audio player object and initialize with URL to sound
      _audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundUrl error:nil];
      wherever u want to start playing call [_audioPlayer play];
      Happy Coding :)

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

    Hi...
    i am facing problem cause its not showing images of animals in image view...can u pls help me out

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

      maybe the name of the pet is not the same as the picture file name (check capitalization also)

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

    الطريقة الصحيحة
    the right way
    To End 48:22
    th-cam.com/video/1YIQUppwbvI/w-d-xo.htmlm22s

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

    Why You use global variables?

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

    Hi, you can make a video when you explain a method for create an app for download ipa file direct on device?(example cydia impactor but for iOS) you can create this?

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

    How can gifs do? help me