Hi everyone I am working on a game and I have run into a really weird issue and was hoping to get some help. Basically sometimes the text is a bit long to show in one textbox so I wanted it to break down a string and store the undisplayed text in a string to be used in the next message box. So when I use this code..
NSString * Talkin1 =...
I am trying to print out a 5 digit number as follows:
int rdmNr = arc4random()%100000;
NSLog(@"%i",rdmNr);
I always would like to have 5 digit numbers. Example outputs should be:
00001
10544
00555
78801
But with the previous code I would also get 1 or 555 without 0s. I also tried %5i, but the I just get more white spaces.
...
Hi there
Was is the best solution so far for a strike out text on the iPhone
I heard of multiple solutions:
Something wth three20
Image as a subview
UIWebView
and something with a NSAttributedString, but I don't find a working example for that.
Cheers
...
Does anyone have better solution or ideas than
http://stackoverflow.com/questions/2099349/using-objective-c-cocoa-to-unescape-unicode-characters-ie-u1234
for unescaping unicode characters in NSString?
...
i have to make a web request but It' format creating problem for me
it is like
i require www.abc.com?userID="YourUserID"
here the problem is i am creating following
NSURL * url = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.abc.com?userID=%@",myID]];
which will create a url with string www.abc.com?userID=12345
but...
I am using following lines of code to convert the data (NSData) to NSString. I am getting nil value from string. But I get around 640 bytes from the server. The problem occurs only when we convert data to NSString. I used NSASCIIStringEncoding, NSUTF8StringEncoding, NSUnicodeStringEncoding for encoding parameter. Can someone shed light o...
Hi !
I'm a bit stuck in a project.
I was writing some code to get a JSON file and store it in an NSString before parsing it into a NSArray.
But I get an error:
2010-10-27 20:59:44.813 GeraldKervyn[21752:207] -JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading chara...
Hello,
I've looked at quite a few of the related questions and cannot find a similar problem or a solution so my apologies if there is a duplicate out there somewhere.
Anyway, I'm trying to generate a file's NSURL to use with an NSXMLDocument. I have the following components:
const NSString * PROJECT_DIR = @"~/SP\\ BB/";
const NSStrin...
I have an NSString that already contains a pList.
How do I turn it into an NSArray?
(WITHOUT saving it to disk, only to reload it back with arrayWithContentsOfFile, and then have to delete it.)
Where is the make arrayWithPlist or arrayWithString method?
(Or how would I make my own?)
NSArray *anArray = [NSArray arrayWithPlist:myPlistS...
Hello. I'm trying to figure out how to take the individual characters in an NSString object and create UILabels from them, with the UILabel text set to the individual character.
I'm new to Cocoa, but so far I have this...
NSString *myString = @"This is a string object";
for(int i = 0; i < [myString length]; i++)
{
//Store the cha...
I have having a very odd issue when utilizing this UIAlertView. When viewing a Physician they have several offices. Upon selecting one you get an alert that offers to call this location or display it on a map. To create the alert and to have data at the ready when the alert is dismissed, I declared 4 NSStrings (although I probably only n...
Hey everyone,
I am encountering an issue while posting a variable with Xcode:
While running this code the app crashes while posting the variable to a webservice:
NSArray *array = [stringFromFile componentsSeparatedByString: @","];
NSString *time = [array objectAtIndex:1];
UTCorLocal = time;
NSLog(@"%@", UTCorLocal);
UTCorLocal varia...