プログラムでボタンのサイズを変更したいのですが、パラメーターを変更しても効果がありません。
btnCancel = [UIButton buttonWithType:102];
[btnCancel setFrame:CGRectMake(22.0f, 7.0f, 40.0f, 40.0f)];
[btnCancel setTitle:@"Anuluj" forState:UIControlStateNormal];
[btnCancel setTintColor:[UIColor redColor]];
[btnCancel addTarget:self action:@selector(cancelTyping) forControlEvents:UIControlEventTouchUpInside];
理由はありますか?パラメータに好きな量を与えることができますが、結果は同じです-幅はテキストの長さに制限されます。