Greg Stretch
Greg Stretch

Reputation: 1

Passing data between tabs in Xcode 4.3

I am trying to pass data from one tab to another in Xcode 4.3 but am struggling to get it to work. I am following a video tutorial on youtube and everything goes fine until the very end. As he uses an older version of Xcode (I am using Xcode 4.3.1) I cant find a way to achieve what he does.

Here is the video:

http://www.youtube.com/watch?v=4WOWSgSTZO0

Between 5:40 and 6:30 he opens his mainwindow.xib and control drags from his app delegate to his 2 views that he wants to share data between and that completes his work. I just can't find a way to achieve this in my version of Xcode using storyboards, can anyone point me in the right direction?

Upvotes: 0

Views: 819

Answers (1)

Dima
Dima

Reputation: 23624

Depending on what kind of data you are trying to pass around, you can probably store it in the App Delegate and pull it from there out of each view controller.

You can access the app delegate from anywhere in your application like this:

[[UIApplication sharedApplication] delegate].whateverProperty

You will need to import your App Delegate header file into any files that do this.

Upvotes: 1

Related Questions