Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

freemusic86

macrumors newbie
Original poster
Feb 4, 2012
12
0
Hi,

This, I am sure is really simple but:

I have done some looking around at some other post on here but none of them seem to work either. So, my question is using the Twitter API built into iOS, how do I include the text from a label into the initial Twitter text.

I have:

Code:
[tweetSheet setInitialText:@"I have just generated the following numbers from The Lottery App: %@", label1.text];


Could anyone help? - Thanks in advance

Free iPhone
 
Last edited:
You might need to familiarize yourself with how to use NSString..

You've halfway got it but you are missing something.

setInitialText, takes an NSString as a single argument.

You are trying give it an NSString and another NSString, so you need those 2 strings put into 1 string first, then give it to setInitialText

There's a method for that, that takes numerous strings, and returns a single string object :)
https://developer.apple.com/library...lasses/NSString_Class/Reference/NSString.html


Have fun :D
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.