This is my code ,I am trying to add value in Array and populate them into Tableview .
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return [self.greekLetter count];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *SimpleIdentifier = @"SimpleIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleIdentifier];
if(cell == nil){
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:SimpleIdentifier];
}
cell.textLabel.text = self.greekLetter[indexPath.row];
return cell;
}
when i add the value herd code value it is showing correct in table view.
self.greekLetter=@[@"prem",@"nath",@"kumar",@"shree"];
I want to add value dynamically to the array and it will show in table view. Can some one pls help me.