titleview

UINavigationBar TitleView with subtitle

ⅰ亾dé卋堺 提交于 2019-11-30 14:42:23
问题 I want a titleView inside my UINavigationBar which has two lines of text instead of only one My current implementiation works well when I have a "Back"-Button and an "Edit" Button because it looks nearly centered. The problem is when I only have one of the Buttons. It looks really weird and wrong because the view centers itself on the available space. UINavigationBar with left and right Button UINavigationBar with only one Button This is my current implementation: CGRect frame = self

UINavigationBar TitleView with subtitle

我是研究僧i 提交于 2019-11-30 11:36:52
I want a titleView inside my UINavigationBar which has two lines of text instead of only one My current implementiation works well when I have a "Back"-Button and an "Edit" Button because it looks nearly centered. The problem is when I only have one of the Buttons. It looks really weird and wrong because the view centers itself on the available space. UINavigationBar with left and right Button UINavigationBar with only one Button This is my current implementation: CGRect frame = self.navigationController.navigationBar.frame; UIView *twoLineTitleView = [[UIView alloc] initWithFrame:CGRectMake