I'd like to Display UIDatePicker only when user the UITextField is Clicked. When the date is picked, it should be shown in the same UITextField.I want to implement UIDatePicker programmatically.I know how to write the code of UITextField Programmatically. I even don't know how to call the UIDatePicker.
Date of Birth.m
UITextField txtDOB=[[UITextField alloc]initWithFrame:CGRectMake(10, 190, 300, 20)];
txtDOB.borderStyle=UITextBorderStyleNone;
txtDOB.backgroundColor=[UIColor clearColor];
[txtDOB setUserInteractionEnabled:NO];
txtDOB.font=[UIFont systemFontOfSize:14.0];
txtDOB.contentVerticalAlignment=UIControlContentVerticalAlignmentCenter;
txtDOB.textAlignment=NSTextAlignmentLeft;
txtDOB.delegate=self;
[self.view addSubview:txtDOB];