title: how to change width UITableViewCell and use in UITableView
body: <p>I have one class <code>ViewController</code> that I to create <code>TableView</code> in it with code not nib file and I want custom cell with <code>UITableViewCell</code> that has nib file.
  I create TableView with code that has 320px width and I want create custom cell with <code>UITableViewCell</code> that my cells had 300px width and put in my TableView.</p>
  
  <p>notice: I want these cells put center my table and these cells have 10px distance from two side!!!</p>
  
  <p>this is my code:</p>
  
  <p><strong>ViewController.m</strong></p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      table = [self makeTableView];
      [self.view addSubview:table];
      [self.view setBackgroundColor: RGB(193,60,46)]; //will give a UIColor objct
      name = [[NSArray alloc]initWithObjects:@"1",@"2",@"3",@"4",@"5", nil];
      // Do any additional setup after loading the view from its nib.
  }
  - (BOOL)prefersStatusBarHidden
  {
      return YES;
  }
  -(UITableView *)makeTableView
  {
      CGFloat x = 0;
      CGFloat y = 0;
      CGFloat width = self.view.frame.size.width;
      CGFloat height = self.view.frame.size.height;
      CGRect tableFrame = CGRectMake(x, y, width, height);
  
      UITableView *tableView = [[UITableView alloc]initWithFrame:tableFrame style:UITableViewStyleGrouped];
  
      tableView.rowHeight = 60;
      tableView.sectionFooterHeight = 22;
      tableView.sectionHeaderHeight = 22;
      tableView.scrollEnabled = YES;
      tableView.showsVerticalScrollIndicator = YES;
      tableView.userInteractionEnabled = YES;
      tableView.bounces = YES;
      tableView.backgroundColor = [UIColor clearColor];
      tableView.delegate = self;
      tableView.dataSource = self;
  
      return tableView;
  }
  
  #pragma mark Table View Data Source Methods
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
      return 1;
  }
  -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
      return 5;
  }
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
      CustomCell *cell = (CustomCell *)[self.table dequeueReusableCellWithIdentifier:@"myCell"];
      if (cell == nil)
      {
          NSArray *topLevelObject = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil];
  
          for (id currentObject in topLevelObject) {
              if ([currentObject isKindOfClass:[CustomCell class]]) {
                  cell = (CustomCell *)currentObject;
                  break;
              }
          }
      }
      // Configure the cell...
      cell.titleLable.text = [name objectAtIndex:indexPath.row];
  
      return cell;
  }
  </code></pre>
  
  <p>this is my code : <a href="https://www.dropbox.com/s/8b5hp6x7qwy343y/TableCode.zip" rel="nofollow">TableCode</a></p>