MarcBruins / FSCalendar-Xamarin-iOS

Binding for FSCalendar
MIT License
36 stars 6 forks source link

numberOfRowsInMonth is always 6 #12

Open singhal2 opened 7 years ago

singhal2 commented 7 years ago

Please update the binding for Xamarin iOS nuget.

- (NSInteger)numberOfRowsInMonth:(NSDate *)month
{
    if (!month) return 0;
    if (self.showsPlaceholders) return 6;
    NSDate *firstDayOfMonth = [self beginingOfMonthOfDate:month];
    NSInteger weekdayOfFirstDay = [self weekdayOfDate:firstDayOfMonth];
    NSInteger numberOfDaysInMonth = [self numberOfDatesInMonthOfDate:month];
    NSInteger numberOfPlaceholdersForPrev = ((weekdayOfFirstDay - self.firstWeekday) + 7) % 7;
    NSInteger headDayCount = numberOfDaysInMonth + numberOfPlaceholdersForPrev;
    NSInteger numberOfRows = (headDayCount/7) + (headDayCount%7>0);
    return numberOfRows;
}
MarcBruins commented 7 years ago

Please make a PR and update the lib to the latest

singhal2 commented 7 years ago

I updated the library though nuget. I am unable to bind the libraries myself. Any help is appreciated