UIView height is not right on iPhone 5

后端 未结 4 1579
别那么骄傲
别那么骄傲 2020-12-28 08:34

I am migrating my apps over and on one I use a UIPickerView. In the viewDidLoad method I create the picker and set it\'s y origin to be self.view.frame.si

4条回答
  •  眼角桃花
    2020-12-28 09:30

    I've been dealing with the same issue. I tried getting the views frame in - (void)viewDidLoad but discovered that it's not updated until - (void)viewWillAppear:(BOOL)animated gets called.

    So try getting the views frame in - (void)viewWillAppear:(BOOL)animated and you should be alright.

提交回复
热议问题