Hello, I have a string from which using for-loop ,each char has been converted into ascii and then xored with an integer. I converted each output back to its relevant char. I need to print all those output characters all at once on the label field in the iphone GUI.
I not able to get the part where I need to print them all onto the label field. Here is the code. Any help is appreciated. Thanks in advance
I not able to get the part where I need to print them all onto the label field. Here is the code. Any help is appreciated. Thanks in advance
Code:
-(IBAction)result {
NSString *str = [[NSString alloc] initWithFormat:@"%@", [sword text]];
for ( NSInteger i=0; i<[str length]; i++ )
{
unichar c = [str characterAtIndex:i];
int asciiCode1 = ([kword.text intValue]);
int z = asciiCode1 ^ c;
int a = (char)z;
}
label.text = [NSString stringWithFormat:@" %c", a];
Last edited by a moderator: