Hello,
I am new to iphone technology.I am right now preparing an application where the user is shown a table view as a registration form and he need to fill the data in the same form. i have taken custom cell with a label and text field. I am writing in the text box and fetching the same in a string variable that i am using to same data into the database using,
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
//NSMutableArray *contactObj;
static NSString *CellIdentifier = @"Cell";
CustomCellForEditContact *cell = (CustomCellForEditContact *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil){
cell = [[[CustomCellForEditContact alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]autorelease];
}
switch (indexPath.row)
{
case 0:
cell.label.text = @"Firstname ";
firstName= [NSString stringWithFormat:@"%@",cell.txtfield.text];
break;
case 1:
cell.label.text = @"Lastname ";
lastName= [NSString stringWithFormat:@"%@",cell.txtfield.text];
break;
default:
break;
}
return cell;
}
but my variable is showing me error like out of scope when i am debugging.what should i do as a solution?
Also,when i finish my writing,my keypad is not disabled.i used the method "resignFirstResponder" for the same but in vain. Due to this i am not able to display my datepicker.
Can anybody help me out??
Thanking you.