Table View Question.

Discussion in 'Mac Programming' started by DavidBlack, Aug 28, 2013.

  1. macrumors 6502a

    DavidBlack

    Joined:
    Jan 27, 2013
    Location:
    Somewhere In Apple's HQ ;)
    #1
    Hi, I have a app going to making it's a tutor app with videos. When the user selects a table cell I want to load a movie, can anyone point me in the right direction?
     

    Attached Files:

  2. macrumors 68000

    Joined:
    Mar 29, 2009
    Location:
    USA
    #2
    What have you tried so far?
     
  3. thread starter macrumors 6502a

    DavidBlack

    Joined:
    Jan 27, 2013
    Location:
    Somewhere In Apple's HQ ;)
    #3
    I haven't tried anything as yet.
     
  4. macrumors 6502a

    Joined:
    Nov 9, 2010
    #4
    Sorry, that made me laugh. You are outlining a complex idea, asking about TableViews and then you say you have not tried anything ???

    Wow ...
     
  5. thread starter macrumors 6502a

    DavidBlack

    Joined:
    Jan 27, 2013
    Location:
    Somewhere In Apple's HQ ;)
    #5
    I know it sounds funny... but I am asking for someone to point me in the right direction.
     
  6. macrumors 6502a

    Joined:
    Nov 9, 2010
    #6
    You open Xcode, create a new project.
    You open the main XIB/Storyboard
    You drag a SpliView in the Window
    You drag a TableView to the left side od the SplitView.
    You drag a Custom View Class to the right.
    You connect all outlets to you controller and datasource and so on.

    I would never design it that way, but if you need a rapid prototype, this ia basically what you do.

    Then you implement your datasource and TableView delegate.
    Everytime you select a an item on the left, you insert a Movie View as a subview on the right, removing one that's already there.

    What's your actual question?
     
  7. thread starter macrumors 6502a

    DavidBlack

    Joined:
    Jan 27, 2013
    Location:
    Somewhere In Apple's HQ ;)
    #7
    Thanks for your help but I did the steps you stated above already for a prototype but mine I did not use a SplitView.
     
  8. macrumors regular

    Joined:
    Mar 2, 2013
    #8
    You asked for someone to help by pointing you to the right direction, he gives you the right direction and then you reply with "I did not use splitview"?

    I don't get it.:confused:
     
  9. macrumors regular

    Joined:
    Feb 4, 2011
    #9
    Why the confusion/putdown? He tried something, but he's looking for another way from us AND maybe he doesn't know how to insert a movieview.

    Be cool man.
     
  10. macrumors regular

    Joined:
    Mar 2, 2013
    #10
    Confused because he said he followed the steps provided BUT did not use a splitview. That means he actually did not follow it as 3rd step asks him to use one.

    Thats what I dont get
     
  11. macrumors regular

    Joined:
    Feb 4, 2011
    #11
    Let's just be helpful

    I read his comments as that he had already done some preliminary coding on his own without the split view. Note the key word "ALREADY" in his response.

    Nevermind ... I don't want us to belabor the point. I'm just opting for tolerance ... all of us at times ask what may seem to be stupid questions.
     
  12. thread starter macrumors 6502a

    DavidBlack

    Joined:
    Jan 27, 2013
    Location:
    Somewhere In Apple's HQ ;)
    #12
    This is an example of what I will like.
     

    Attached Files:

  13. macrumors 6502a

    Joined:
    Dec 29, 2009
    #13
    I think I understand your problem.

    To get whatever row is selected you can do this:

    Code:
    id selectedItem = [yourTableView itemAtRow:[yourTableView selectedRow]];
    
    With the data that is returned you could use a switch or if-else statement (really anything of deciding nature) to determine what video to play depending on what is selected.

    The videos can be played via a QTMovieView, which you can read more about here.

    Just place a QTMovieView next to your table view -- and voila -- switch the videos out as needed.
    Hopefully this can help you out!
     

Share This Page