iphone - swipe directions and loop text string -
Help me ... I'm stuck I'm trying to create something like an ordinary game like Angry Birds Swipe . How do I know this code? I have two labels and a swipe-driving code (top, bottom, left or right, any direction)
I want to move label1.text ("333333777777555555888888") to label2.text with label number ("3758"). That's why I can improve the artificial intelligence game. How can I do this?
Here is the code. Thanks. I'm not completely sure of this To reduce the string, so that only one of the numbers can use this function. : (NSString *) first {// if "1112222334445" is earlier, the return value of this function will be "12345" NSString * end = [NSString stringWithString: @ ""]; // return string variable final; // will track changes in numbers (int i = 0; i & lt; [first length]; i ++) {char charAtIndex = [first characterTitindex: i]; If (last! = Fourand index) // If the last character is different from the current character / set the current character in final form, and add the last = four artandx to that character for the return string; End = [end stringBuffading format: @ "% c", last]; }} NSLog (@ "First:% @, Termination:% @", First, End); // start / end string returns and prints; } for
+ (NSString *) Remove DuplicateNumbersFromString what you want but I think that's it.
Comments
Post a Comment