views:

27

answers:

2
NSString *ref = [item stringByMatching:myregex1 capture:2];
NSString *value = [item stringByMatching:myregex1 capture:3];

I simply need to add this to my orderTable uitableview, how the hell do i do it:P. i cannot find a simple way of doing this please help :)

i would like it to be in the uitableview like this

(@"%@ :: %@", ref, value)

Thanks

+1  A: 

You'll have to add this to your dataSource and then do a [orderTable reloadData];

synced
Can you explain how to add to datasource please ? i have never used table view before
if you have created a TableViewController datasource and delegate is added by default... if you have added UITableView to UIView (in INterface builder) then you need to add datasource and delegate... to do that.. add this in you .h file NOTE: add only code from < to >...rest just to help you where to add.. @interface FirstViewController : UIViewController <UITableViewDelegate,UITableViewDataSource>
KiranThorat
thanks now how do i add to the table ?
A: 

If you want it to be in a specific cell, then in the method cellForRowAtIndexPath:, check for the first or the last cell and do:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  // Cell Return
  cell.textLabel.text = [NSString stringWithFormat@"%@ :: %@", ref, value];
}
vodkhang
No sorry this is not helpful :/