Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从 [myUIDatePicker date] 创建新的 NSDate 对象?
你不需要创建一个新的 NSDate 对象,你可以使用它给你的那个。
NSDate *chosenDate = myDatePicker.date;
如果你真的需要创建一个新的 NSDate 对象,那么你可以调用[myUIDatePicker date].
[myUIDatePicker date]