views:

42

answers:

1

I have a UIText View that I need to populate with a link that can be gained from currentItem.link. But I can't seem to work out how to populate the text view with the link.

I'm assuming you have to load the view with some sort of IBAction?

+1  A: 

You should be able to change the contents of a UITextView by setting its text property. For example, in your view controller just do:

self.myTextView.text = [NSString ... ];

If there's no myTextView property in your view controller, declare an IBOutlet for it as a property and connect the text view to that in Interface Builder.

Nimrod
I have this line: [t statuses_update:twitterMessageText.text delegate:self requestSelector:@selector(status_updateCallback:)]; in my View controller - should I be adding that code in there somewhere?
Graeme
I don't know what this mysterious `t` object is but it sounds like a twitter client and you're passing it the text a user entered for their twitter status along with the target/action for a callback for success/fail on the update process.... I don't see where this currentItem comes into play.
Nimrod
Yeah its for a post to Twitter window - that's the problem I'm trying to work out where to put the code to place the URL link to the item they are "sharing" on Twitter in the text box before the view loads. I followed the tutorial here to setup the Twitter view if that helps http://icodeblog.com/2009/07/09/integrating-twitter-into-your-applications/
Graeme
I would set twitPostController.twitterMessageText.text = urlString before you display the view.
Nimrod