How to get the height of the tabbar programmatically?

前端 未结 7 677
遥遥无期
遥遥无期 2021-01-31 13:53

I\'ve found out that the height of a UITabBar is 49px (or 50px, depending on the source).

Because I don\'t like to use too much hard-coded values in my code I was wonder

7条回答
  •  -上瘾入骨i
    2021-01-31 14:23

    UITabBar is inherited from UIView as long as you mhave access to your UITabBar instance you can access and modify the frame of UITabBar,

    CGRect myRect = myTabBar.frame;
    

提交回复
热议问题