我注意到了iOS 9中的一個錯誤,或者可能是我沒有正確使用某些東西。iOS 9在iOS 9中旋轉後,UINavigation欄內容不居中?
在針對iPhone的空項目下面的代碼:
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Show" style:UIBarButtonItemStylePlain target:self action:@selector(test:)];
self.navigationItem.rightBarButtonItem = anotherButton;
self.navBar.items = @[self.navigationItem];
我添加了一個自定義的按鈕,導航欄屬性。我注意到,在從縱向旋轉到橫向之後,按鈕向下移動,導航欄中的按鈕未正確居中。如果我編譯的iOS 8.4例如
Portrait Screen Landscape Screen 此代碼工作正常,但不能在iOS 9
有沒有人遇到過嗎?
謝謝!
感謝您的回答,但我確實是你從開始描述:)。 –