Unless you have this in your implementation, it won't work as you expected.
@synthesize string2pass = string2pass;
..or you can fix it by deleting the line:
NSString *string2pass;
Your log is logging the value of string2pass variable you declared. But there is another variable _string2pass.
NSLog(@"%@", string2pass);
The @property you declared, is backed by a variable name _string2pass if you don't explicitly write a @synthesize statement. Not writing an @sythesize statement is the same as declaring one like so:
@synthesize string2pass = _string2pass;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…