Hi all,
I am right now restricting the uitextfield length as below
Code:
NSString* newText = [textView.text stringByReplacingCharactersInRange:range withString:text];
CGSize tallerSize = CGSizeMake(textView.frame.size.width-15,textView.frame.size.height*2);
CGSize newSize = [newText sizeWithFont:textView.font constrainedToSize:tallerSize lineBreakMode:
UILineBreakModeWordWrap];
[textView setSelectedRange:range];
if ( newSize.height > 325 )
{
return NO;
}
else if( newSize.height == 325 && [text isEqualToString:@"\n"] )
{
return NO;
}
else
return YES;
which works fine. but in my application the user can change the text size.
if the user types the font in 10px size and types to the total length.when the user agin change his font size to 30 means my uitextdfield hides the texts.
how can i fix this problem.
Thanks for any help.