For example, do I need to use CGRectMake? Or is there a layout manager I can use as an alternative and not pass the x/y coordinates?
Code:
int x=0;
while (anObject = [enumerator nextObject]) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.tag = x+1;
button.frame = CGRectMake(35, 10+40+5+45*x, 250, 40);
[button setTitle:[anObject objectForKey:@"name"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(teamPick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];
x++;
}