Skip to content

Instantly share code, notes, and snippets.

@wethu
Created May 26, 2014 12:26
Show Gist options
  • Select an option

  • Save wethu/816e5d78fb2a6b40caa2 to your computer and use it in GitHub Desktop.

Select an option

Save wethu/816e5d78fb2a6b40caa2 to your computer and use it in GitHub Desktop.
@implementation
- (void)viewDidLoad {
[super viewDidLoad];
[self loadClientDetails];
}
// This is probably achieved a better way, could be the issue
- (void)loadClientDetails {
self.businessName.text = self.client.businessName;
self.contactName.text = self.client.contactName;
self.shopNo.text = self.client.shopNo;
self.streetNo.text = self.client.streetNo;
self.streetName.text = self.client.streetName;
self.suburb.text = self.client.suburb;
self.state.text = self.client.state;
self.postcode.text = self.client.postcode;
self.phone.text = self.client.phone;
self.fax.text = self.client.fax;
self.email.text = self.client.email;
self.mobile.text = self.client.mobile;
}
@end
@implementation
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
self.selectedClient = [clients objectAtIndex:indexPath.row];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
[segue.destinationViewController setClient:self.selectedClient];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment