自定义一个UIButton放在导航条的titleView上面
UIButton的位置在正中央,但是UIButton的label却在靠右,点击UIButton的时候又显示在正中央,小白求大神解答,跪谢!!
自定义一个UIButton放在导航条的titleView上面
UIButton的位置在正中央,但是UIButton的label却在靠右,点击UIButton的时候又显示在正中央,小白求大神解答,跪谢!!
试试这个
UIView * view = [[UIView alloc] init];
view.frame = button.bounds;
[view addSubview:button];
self.navigationItem.titleView = view;
2 回答1.1k 阅读
1 回答1k 阅读✓ 已解决
1 回答2.8k 阅读
1 回答1.4k 阅读
1.7k 阅读
1 回答942 阅读
1 回答781 阅读