2

Is there anyway to have the UIBarMetrics of a custom UIToolbar change when the device is rotated? I would prefer it happen automatically but if there is something I can do during rotation that would also be ok. I would like to use UIAppearance so manually adjusting the height of the bar won't work.

4

1 に答える 1

0

私はあなたが必要だと思います

UIToolbar * toolbar=[UIToolbarの外観];

[toolbar setBackgroundImage:[UIImage imageNamed:@ "toolbarLandscapePhone"] forToolbarPosition:UIToolbarPositionBottom barMetrics:UIBarMetricsLandscapePhone];

BarMetricsをUIBarMetricsLandscapePhoneに簡単に設定できます

于 2013-01-26T00:28:23.950 に答える