UINavigationItem titleView position

前端 未结 7 960
长发绾君心
长发绾君心 2021-02-13 03:45

I\'m using UINavigationItem\'s titleView property to set a custom UILabel with my desired font size/color. Here\'s my code:

self.headerLabel = [[UILabel alloc] i         


        
7条回答
  •  离开以前
    2021-02-13 03:58

    In stead of initWithFrame just use init and put [self.headerLabel sizeToFit] after your last line of code.

提交回复
热议问题