How To Call/Create iPhone Calendar In A User Application - iphone

I would like to know whether we can create a calendar using NSCalender and show it in our dedicated application. We can create a NSCalender object by
****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.
I'm not sure that this can be done on the iPhone from within an app.
-
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.

Related

How to always show alert of my Cocoa application pop up all other applications?

I create the app simple. the app just remind work. I have problem how to my Alert always show pop up all other app. I tried code but my alert will hide when use other app I want my alert look like this alert in image
I tried code
let myPopup: NSAlert = NSAlert()
myPopup.messageText = "Notification"
myPopup.informativeText = "Hello world"
myPopup.alertStyle = NSAlertStyle.WarningAlertStyle
myPopup.addButtonWithTitle("OK")
myPopup.addButtonWithTitle("Cancel")
myPopup.runModal()
But when I use other app it hide.
I want always show alert.
You can tutorial code example help me ?
I just beginner. I want writer app remind simple. I spent a whole day to do it but i can't. please help me.
You can modify the windowLevel property of your alerts window object. NSModalPanelWindowLevel should give the desired effect.

Add a "Add Event" Page in your iOS App

I was wondering is there a way to add the following Add event screen to your iOS app, without actually creating it yourself, something like a method [show UIAddEvent].
Please let me know if there is way to do this.
Click to see Add Event Screen Image
You want the EventKitUI framework.
EKEventEditViewController is probably what you are looking for. The SimpleEKDemo sample on the developer site should get you started.

Tapku Calendar - How to implement List, Day and Month view using Tapku Calendar?

i want to implement a calendar application like Month View,Day View and Week View using Tapku library for my iPhone application.MonthView already there.So i am concentrating Day and week view.If anybody having any idea for this,Please let me know?
Please let me know How to start for implementing Day and MonthView.
Thanks in Advance,
Jayaprakash S
You can refer this GitHub link to see the implementation of a calendar application like Month View,Day View and Week View using Tapku library.
https://github.com/devinross/tapkulibrary/pull/57/files
Alternatively you can try MACalendarUI project which offers calendar user interface for iPhone applications.
https://github.com/muhku/calendar-ui

How to check if EKCalendar is visible

I run in the situation that at least local calendars of type EKCalendarTypeLocal are listed by EKEventStore but arent't shown and can not be selected in the calendar app on iOS.
if ([eventStore respondsToSelector:#selector(calendarsForEntityType:)]) cals = [eventStore calendarsForEntityType:EKEntityTypeEvent];
else cals = eventStore.calendars;
I found out that it has probably something to do with iCloud Accessing programmatically created calendar on iOS device.
I also created a local calendar successfully and could add events to it. This created calendar was not listed by EKEventStore but I get it with its identifier:
aCal = [eventStore calendarWithIdentifier:calId];
After I removed the iCloud account in the testing device all local calendars are shown also my own created. Is there any possibility to check if local calendars are hidden? So I can wrote an info text or hide them as well.
Have u solved?
Anyway, i'll try to answer.
As i understand iCloud don't let local calendars to be shown. If u turn of iCloud and then lead him back to on u will see a message like "Would u like to add your local calendar to iCloud?", so ... if the problem is just see the calendars in iCloud, extract your EKCalendar and change source in a EKSourceTypeCalDAV instead than EKSourceTypeLocal ... should be ok

Monotouch - add event to iphone calendar from my app

is it possible for my app to programatically add events (with permission from the user) to the iphones calendar?
cheers
w://
It's available in the iPhone 4 SDK, so in Monotouch. Take a look at EKEventStore and EKEvent. Here's the Apple docs.
Here's an example from a snippets page I keep:
public void CalendarEvents()
{
EKEventStore store = new EKEventStore();
EKCalendar calendar = store.DefaultCalendarForNewEvents;
// Query the event
if (calendar != null)
{
// Searches for every event in the next year
NSPredicate predicate = store.PredicateForEvents(NSDate.Now,DateTime.Now.AddDays(360),new EKCalendar[] {calendar});
store.EnumerateEvents(predicate, delegate(EKEvent currentEvent, ref bool stop)
{
// Perform your check for an event type
});
// Add a new event
EKEvent newEvent = EKEvent.FromStore(store);
newEvent.Title = "Lunch at McDonalds";
newEvent.Calendar = calendar;
newEvent.StartDate = DateTime.Now.Today;
newEvent.EndDate = DateTime.Now.Today.AddDays(1);
newEvent.Availability = EKEventAvailability.Free;
store.SaveEvent(newEvent, EKSpan.ThisEvent, new IntPtr());
}
}
A lateral thinking way around this is to consider creating an ICS file, then creating an email (which can be done programmatically) and then send it to the user or whomever they want. This is how I'm getting around this issue in my code. The beauty of it is it also doesn't create the sense in the user that your application is going to manage the dates, i.e. if they change something in your application that you'll cancel and rebook things on the fly.
It's not possible in the official iPhone API, so I doubt it's possible via mono touch.
Not directly possible with the SDK. You might try getting the user to subscribe to an online calendar published from your server, then upload events to that, but you'll probably run into all kinds of syncing issues.