I am newbie for iPhone application. Below is what I have...
When I enter Item name, I get proper screen with Done option. When I click Done, keyboard get hided.
Same happen for Time also.
Now when I click on description and type something, I get screen as below.
Now my problem is, I can't see UITextView
and because of that I can't see what I am typing.
How can I show the UITextView
so that I can see what I am typing.
First take these whole controls in UIScrollView
and set as it is,
after just in UITextView
delegate method textViewDidBeginEditing
set the frame of view like bellow...
-(void)textViewDidBeginEditing:(UITextView *)textView
{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3];
yourScrollView.frame = CGRectMake(yourScrollView.frame.origin.x, -160, yourScrollView.frame.size.width, yourScrollView.frame.size.height);
[UIView commitAnimations];
}
and also set same like before after return like bellow...
-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
if ([text isEqualToString:@"\n"])
{
[textView resignFirstResponder];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
yourScrollView.frame = CGRectMake(yourScrollView.frame.origin.x, 0, yourScrollView.frame.size.width, yourScrollView.frame.size.height);
[UIView commitAnimations];
return NO;
}
return YES;
}
you can also set the frame of UIView
instead of UIScrollView
..
Also first give the Delegate to UITextView
and add this delegate in .h
file
i hope this helpful to you...