简体   繁体   English

如何在用户应用程序中调用/创建iPhone日历

[英]How To Call/Create iPhone Calendar In A User Application

I would like to know whether we can create a calendar using NSCalender and show it in our dedicated application. 我想知道我们是否可以使用NSCalender创建日历并将其显示在专用应用程序中。 We can create a NSCalender object by 我们可以通过创建NSCalender对象

****NSCalendar *japaneseCalendar = [[NSCalendar alloc] initWithCalendarIdentifier : NSJapaneseCalendar];**** **** NSCalendar * japaneseCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSJapaneseCalendar]; ****

But how can we show this calender in out application. 但是,我们如何在外部应用程序中显示此压延机。 Is there any way to show the default calander in our application when a user click a button. 用户单击按钮时,有什么方法可以在我们的应用程序中显示默认日历。

Please please guide me, i am hanging here for last few days. 请指导我,我最近几天一直在这里闲逛。

Thank You Rahul 谢谢拉胡尔

NSCalendar has nothing to with the Calendar app on the iPhone, it's simply a class used to represent a calendar for whatever reason you need one. NSCalendar与iPhone上的Calendar应用无关,它只是用于表示日历的类,无论您需要什么原因。

I'm not sure that this can be done on the iPhone from within an app. 我不确定是否可以在iPhone上通过应用程序完成此操作。

- --

After re-reading your question, I think I misunderstood what you were asking. 重新阅读您的问题后,我想我误会了您的要求。

If you want to display some kind of calendar view within the app using that particular calendar, you'll have to create you own view and draw the calendar into it. 如果要使用特定日历在应用程序中显示某种日历视图,则必须创建自己的视图并将日历绘制到其中。

You may be able to find some code on the internet to accomplish this already. 您可能已经可以在互联网上找到一些代码来完成此任务。

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

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