У меня есть код для программного создания кнопок, и вот он
UIImage *aroundImage = [UIImage imageNamed:@"locBar.png"];
UIImage *aroundImageDown = [UIImage imageNamed:@"locBarColor.png"];
UIButton *aroundButton = [UIButton buttonWithType:UIButtonTypeCustom];
[aroundButton setFrame:CGRectMake(240, 369, 80, 48)];
[aroundButton setImage:aroundImage forState:UIControlStateNormal];
[aroundButton setImage:aroundImageDown forState:UIControlStateHighlighted];
[aroundButton setImage:aroundImageDown forState:UIControlStateSelected];
[aroundButton addTarget:self action:@selector(aroundMe) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:aroundButton];
Итак, теперь я установил рамку для кнопки, но что, если это приложение будет видно на iPhone4 в разрешении 640x960. Тогда у меня есть разные изображения "[email protected] и [email protected]", и они должны быть с другим CGRectMake, или они должны быть? Мой вопрос в том, как настроить кнопку для обоих разрешений и сделать это программно.