Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DavidBlack

macrumors 6502a
Original poster
Jan 27, 2013
606
239
Somewhere In Apple's HQ ;)
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?
 

Attachments

  • Screen Shot 2013-08-28 at 2.06.53 PM.png
    Screen Shot 2013-08-28 at 2.06.53 PM.png
    549 KB · Views: 113

pmau

macrumors 68000
Nov 9, 2010
1,569
854
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?
 

DavidBlack

macrumors 6502a
Original poster
Jan 27, 2013
606
239
Somewhere In Apple's HQ ;)
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?

Thanks for your help but I did the steps you stated above already for a prototype but mine I did not use a SplitView.
 

Sonnestah

macrumors regular
Mar 2, 2013
152
0
Thanks for your help but I did the steps you stated above already for a prototype but mine I did not use a SplitView.

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:
 

multinode

macrumors regular
Feb 4, 2011
150
0
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:

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.
 

Sonnestah

macrumors regular
Mar 2, 2013
152
0
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.

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
 

multinode

macrumors regular
Feb 4, 2011
150
0
Let's just be helpful

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

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.
 

Blakeasd

macrumors 6502a
Dec 29, 2009
643
0
This is an example of what I will like.

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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.