自定义一个AUIView,

AUIView * v=[AUIView new];

self.navigationItem.titleView = v;

 

在AUIView类内重写 setFrame

  1. - (void)setFrame:(CGRect)frame  
  2. {  
  3.     [super setFrame:frame];  
  4.     self.center = CGPointMake(self.superview.center.x, self.center.y);  
  5. }  

内容从这里来  http://blog.csdn.net/wsxzk123/article/details/44755787

相关文章:

  • 2021-04-25
  • 2021-12-28
  • 2021-11-20
  • 2021-09-03
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
猜你喜欢
  • 2021-12-10
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2021-04-21
相关资源
相似解决方案