I am having an issue with resizing my button with CGRectMake. As you can see below, it should be working, but it doesn’t change at all.
GameTwo = [UIButton buttonWithType:UIButtonTypeRoundedRect];
GameTwo.titleLabel.font = [UIFont systemFontOfSize:22];
GameTwo.titleLabel.lineBreakMode = UILineBreakModeHeadTruncation;
[GameTwo setTitle:(@"Game Two") forState:UIControlStateNormal];
GameTwo.frame = CGRectMake(10, 10, 100, 50);
[GameTwo addTarget:self action:@selector(gameTwo) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:GameTwo];
I guess i have two questions as well. How does one change button size depending on portrait mode and then for landscape mode.
Works perfect. (This is what was in the original question)
The issue was I was trying to use another function to place were the button should go. I didn’t understand that the first two variables in this case
(10, 10...)were the placement of the button. Now i do.Cheers.