Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
iOS Development
Can Somebody Tell Me Whats Wrong?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Nethfel" data-source="post: 1337516" data-attributes="member: 89124"><p>If it's in the app delegate, it's easy to get it in the view controller - just get a handle to the app delegate and then request the ivar (assuming you have a property for your data ivar set up in the app delegate) - which means you'd move ImageStrings *theDataObject to be an IVar and setup a property for it</p><p></p><p>you would get it from something similar to...</p><p></p><p>[code]</p><p>YourAppDelegateName *appDelegate = (YourAppDelegateName *)[[UIApplication sharedApplication] delegate];</p><p>[/code]</p><p></p><p>then you would get the data..</p><p></p><p>self.localRetainOfData = appDelegate.theDataObject;</p><p></p><p>then you would just access the data from the local ivar of the class.</p><p></p><p>Keep in mind, passing data between view controllers (direct passing, not accessing through the app delegate) requires use of the segue methods where you can set data values in the destination view controllers (this is going from view A to view B, not from app launch to view a)</p></blockquote><p></p>
[QUOTE="Nethfel, post: 1337516, member: 89124"] If it's in the app delegate, it's easy to get it in the view controller - just get a handle to the app delegate and then request the ivar (assuming you have a property for your data ivar set up in the app delegate) - which means you'd move ImageStrings *theDataObject to be an IVar and setup a property for it you would get it from something similar to... [code] YourAppDelegateName *appDelegate = (YourAppDelegateName *)[[UIApplication sharedApplication] delegate]; [/code] then you would get the data.. self.localRetainOfData = appDelegate.theDataObject; then you would just access the data from the local ivar of the class. Keep in mind, passing data between view controllers (direct passing, not accessing through the app delegate) requires use of the segue methods where you can set data values in the destination view controllers (this is going from view A to view B, not from app launch to view a) [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
iOS Development
Can Somebody Tell Me Whats Wrong?
Top