//
//  MedicalInfoTableViewController.m
//  MedicalHelp
//
//  Created by mac on 7/11/14.
//  Copyright (c) 2014 mac. All rights reserved.
//

#import "MedicalInfoTableViewController.h"

@implementation MedicalInfoTableViewController

@synthesize arrayPlaces,placeType;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    [self.navigationItem setTitle:placeType];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = nil;
    
    cell = (UITableViewCell *)[[[NSBundle mainBundle]loadNibNamed:@"CustCellMapTable" owner:self options:nil]objectAtIndex:0];
    
    UILabel *hName = (UILabel *)[cell viewWithTag:101];
    UITextView *hAddress = (UITextView *)[cell viewWithTag:102];
    
    NSArray *arrPlace = [arrayPlaces objectAtIndex:indexPath.section];
    
    hName.text = [arrPlace objectAtIndex:0];
    hAddress.text = [arrPlace objectAtIndex:1];
    
    return cell;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return arrayPlaces.count;
}

@end
