I wish verify a number letter in UITextfield, and also if my textfield is empty. But, I have a problem between NSUInteger and int. Thanks for your answers.
- (void)saveProfile {
NSUInteger *minID = [_userID.text length];
if ([_userID.text isEqualToString:@""] == NO || minID >= 4) {
// Succes
} else { // Error }
}
Change this code:
to
The length property is defined like:
So the
length
getter method will return aNSUInteger
notNSUInteger *
Refer : NSString class reference for more details