CGRectMake로 버튼 크기를 조정하는 데 문제가 있습니다. 아래에서 볼 수 있듯이 작동해야하지만 전혀 변경되지 않습니다.버튼 크기에 대한 CGRectMake 관련 문제
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];
나는 두 가지 질문이 있다고 생각한다. 세로 모드와 가로 모드에 따라 단추 크기가 어떻게 다른지 설명합니다.
8x3 픽셀 버튼이 어떻게 생겼는지 알고 있습니까? – Joe
+1 Joe 변경했습니다. –
어쩌면 지금 가치있는 것을 볼 수있을 것입니다. 이제이 기사 http://www.techotopia.com/index.php/IOS_4_iPhone_Rotation,_View_Resizing_and_Layout_Handling에서 "코딩 레이아웃 및 크기 변경"섹션으로 이동하십시오. – Joe