简体   繁体   English

将日期选择器添加为子视图

[英]Add date picker as a subview

I am trying to add a date picker to my iPad application. 我试图将日期选择器添加到我的iPad应用程序。 How do I add this as a sub view? 如何将其添加为子视图?

Here is what I use 这是我用的

UIDatePicker *datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 40, 0, 0)];
// ... populate your date picker and format it as you see fit.
[self.view addSubview:datePicker];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM