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

Binju

macrumors member
Original poster
Jan 31, 2010
65
0
I want to get the value of a textfield and want to compare with the string.

I used the below code

username =@"test";


Code:
if ( [txtusername text]  == username)

{

  NSLog(@"Equal");

}

The above code is not working eventhough I entered the "test" in the txtusername.
 

Binju

macrumors member
Original poster
Jan 31, 2010
65
0
Code:
NSLog(@"Textbox Username=%@",[txtusername stringValue]);

gives null value
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.