Hi Guys,
I am having some form in that is consisting of 5 custom cells in a table view. Here is the code:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;}
\- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 5;
}
\- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"in here");
static NSString *MyIdentifier = @"MyIdentifier";
FreeSignupCell *cell = (FreeSignupCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
NSLog(@"shazam");
cell = [[[FreeSignupCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
switch (indexPath.row) {
case 0:
NSLog(@"index 0");
[cell setLabelContent:@"First Name"];
//self.firstName = [cell getText];
break;
case 1:
NSLog(@"index 1");
[cell setLabelContent:@"Last Name"];
//self.lastName = [cell getText];
break;
case 2:
NSLog(@"index 2");
[cell setLabelContent:@"Company (optional)"];
//self.company = [cell getText];
break;
case 3:
NSLog(@"index 3");
[cell setLabelContent:@"Website (optional)"];
[cell setText: @"http://"];
//self.website = [cell getText];
break;
case 4:
NSLog(@"index 4");
[cell setLabelContent:@"E-mail"];
//self.email = [cell getText];
break;
default:
[cell setLabelContent:@"E-mail"];
}
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 70.0;
}
The problem is that when I edit first field, that scroll quickly to the last one, app crashes with objc_mssend error.
Any ideas?