Before closing the post as duplicate,believe me,i am searching this for 2 days but still nothing. I will try to be as clear as possible:
I have a view with a textview.I need to set focus automatically on the textview so the keyboard ill appear.
PostView.h
@interface PostView : UIViewController{
UITextView *txtPesto;
}
@property (nonatomic,retain) IBOutlet UITextView *txtPesto;
@end
PostView.m
#import "PostView.h"
@implementation PostView
@synthesize txtPesto;
- (void)viewDidLoad
{
[super viewDidLoad];
[txtPesto becomeFirstResponder];
}
For some very strange reason my code is not working,although i have tried many samples and different approaches. Any help?
Answer from my comment (for closing question): Right click on textView, and "new referncing outlet", maybe that will be helpful?