Xcode - 导航控制器内的视图控制器
我已经设置了一个导航控制器,并将其中的视图控制器设置为我已经创建的另一个视图控制器的类。问题是,我有一个 UIDatePicker 捕捉到后一个视图控制器的底部,并且当应用程序加载时,UIDatePicker 被部分遮挡。
显然这是因为第二个视图控制器的高度大于导航控制器内视图控制器的高度。
抱歉,我知道这一切听起来很令人困惑,但是有人可以帮助我吗?
亲切的问候。
I have set up a navigation controller, and the view controller within that is set to the class of another view controller I have already created. The problem is, I have a UIDatePicker snapped to the bottom of the latter view controller, and when the app loads up the UIDatePicker is partially obscured.
Obviously this is because the height of the second view controller is larger than that of the view controller within the navigation controller.
I'm sorry, I know this all sound confusing, but can anyone help me out?
Kind regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要设置视图和 UIDatePicker 的框架,以便它们不会相互遮挡。
You need to set the frames of both the view and the UIDatePicker so they do not obscure one another.
设置 view1 和 view2 的高度,使其不会遮挡日期选择器(因为您无法更改 datePicker 的大小)。
Set the view1 ad view2 height that doesn't obscure the date picker (As you cannot change the size of a datePicker).