Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のアプリケーションでは、縦型を作ろうとしていますUISegmentControl。垂直モードでは問題なく動作していますが、ラベルも垂直です。UISegmentControlラベルを水平にするにはどうすればよいですか?
UISegmentControl
セグメントサブビューを参照してラベルを見つけ、ラベルを回転させてみてください。
for(UIView *v in segmentedView.subviews) { if([v isKindOfClass:[UILabel class]]) { double angle = 45.0; v.transform = CGAffineTransformMakeRotation(M_PI * angle / 180.0); // rotate to 45 degree } }