The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-11-2009, 05:47 PM
What's Jailbreak?
 
Join Date: Mar 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
AppDelegate - sending text from an UILabel

I have recently completed an exercise using two views, and the appDelegate to display a slider Value on a label on a different view from the slider itself. (label is updated with a refresh button.) It all works fine. Now i want to do the same thing, only send text from one view to the other. I tried to manipulate the code, but keep getting the error...(in something not a structure or union). Below is a snip of code of the action which dismisses the view and pulls the slider value.....I rather it pulled just a plain old UILabel and displayed the same text in my other UILabel in second view. Please let me know if you can help sort me out.

-(IBAction)returnToMainView{
XXXXAppDelegate *mainDelegate = (XXXXAppDelegate *)[[UIApplication sharedApplication]delegate];

mainDelegate.sli = slider.value;

[self dismissModalViewControllerAnimated:YES];
}



In second View where the value is retrieved:

-(IBAction)refresh{
XXXXAppDelegate *mainDelegate = (XXXXAppDelegate *)[[UIApplication sharedApplication]delegate];

NSString* convert = [NSString stringWithFormat:@"%f", mainDelegate.sli];

valueLBL.text = convert;

}

Thank you.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion

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



Go to Top
ModMyI

All times are GMT -6. The time now is 01:47 PM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Top