Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-07-2010, 04:28 PM   #1 (permalink)
Yko
Registered Member
 
Join Date: Sep 2010
Posts: 26
Yko is on a distinguished road
Default Passing data between view controllers

'm a newbie and a little frustrated. I am trying to pass data between the UITabBarController and failing hardly at it.

If anyone can help me, I will be grateful. I have a UITabBarController added to the AppDelegate views but I have no idea on how to pass data around. For example, my intuition tells me that I have to define a variable in "the root" which has connection to the tab bar controller so I guess that is the main app delegate. But, tbh, I don't even know where to define this variable in the app delegate. Is it inside the @interface? anywhere after it? before @end? And I tried initializing a NSString variable there and put the main app delegate.h in the other view controller but they cannot recognize the variable.

I should explain that it is slightly complicated because I am incorporating a 3rd party SDK (red laser) into my app and they have a wrapper view controller (overlay) which calls their SDK and they provide a function which returns the barcode after scanning. I am able to "collect" this barcode but I don't know how to pass it to other views/view controllers
Yko is offline   Reply With Quote
Old 09-07-2010, 05:03 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

this question has been asked and answered at least 1000 times on this forum, just do some searching here and you will find your answer
smithdale87 is offline   Reply With Quote
Old 09-07-2010, 07:03 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2010
Age: 37
Posts: 72
ImpresionesWeb is on a distinguished road
Default

Quote:
Originally Posted by Yko View Post
'm a newbie and a little frustrated. I am trying to pass data between the UITabBarController and failing hardly at it.

If anyone can help me, I will be grateful. I have a UITabBarController added to the AppDelegate views but I have no idea on how to pass data around. For example, my intuition tells me that I have to define a variable in "the root" which has connection to the tab bar controller so I guess that is the main app delegate. But, tbh, I don't even know where to define this variable in the app delegate. Is it inside the @interface? anywhere after it? before @end? And I tried initializing a NSString variable there and put the main app delegate.h in the other view controller but they cannot recognize the variable.

I should explain that it is slightly complicated because I am incorporating a 3rd party SDK (red laser) into my app and they have a wrapper view controller (overlay) which calls their SDK and they provide a function which returns the barcode after scanning. I am able to "collect" this barcode but I don't know how to pass it to other views/view controllers
Look for "singleton"
ImpresionesWeb is offline   Reply With Quote
Old 09-08-2010, 08:09 AM   #4 (permalink)
Yko
Registered Member
 
Join Date: Sep 2010
Posts: 26
Yko is on a distinguished road
Default

Quote:
Originally Posted by ImpresionesWeb View Post
Look for "singleton"
Thanks! I will look into it!
Yko is offline   Reply With Quote
Reply

Bookmarks

Tags
data, delegate, uiview, uiviewcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 334
11 members and 323 guests
bignoggins, carlandrews, flamingliquid, hzwegjxg, ilmman, jenniead38, linkmx, nadav@webtview.com, stanny, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:50 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0