Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
Shy overrideable method (and appointments)
posted

Greetings, I am facing a peculiar issue with the events in my calendar.

They wont show at all times, but only in transition of a view to another! Let me explain:

First of all I use Xamarin.iOS. Now, I add said events using a class derived from the IGCalendarAppointmentDataSource class. It is my understanding from reading the API that when I implement this class, I must also implement the method colorForAppointmentsInIGCalendarView, however I am unable to do so, it is not found as an overrideable method from the Studio.

And so, I instantiate the events to a variable:
var appointments = new List();
I add them one by one there, using title, startDate and endDate correctly. If it makes any difference I also use the Location and Identifier properties of IGCalendarAppointment.

Then I instantiate my IGCalendarAppointmentDataSource derived, not-so-aptly named class AppointmentSource, passing the appointments.ToArray() to it. Afterwards I instantiate my
NSObject[] _appointmentSources;
variable, using the AppointmentSource like so:
_appointmentSources = new NSObject[]  { _appointmentSource };
And finaly I set the AppointmentDataSources property of my calendar to the _appointmentSources.

Now this is not working exactly. I am having the issue of the appointments being too shy to show all the time. When I go to the month or week views I do not see them at all, while they show up correctly in day view.

However, and here's the weird part, when I am in month view and switch to the week view (I always do it like so, I do not go to the day view from the month) they show up while the transitioning effect appears. Check the following picture to understand what I am trying to say:

As you can see in the eleventh of January 2 events show up (with Greek letters) as well as one in the 12th. How can I convince them to show up all the time instead of just when the transition happens? :)

vagg

Parents Reply Children