devinross / tapkulibrary

tap + haiku = tapku, a well crafted open source iOS framework
http://devinross.com/tapku/documentation
MIT License
3.9k stars 653 forks source link

Selecting date programmatically causes issue #227

Closed ExtremeMan closed 11 years ago

ExtremeMan commented 11 years ago

Hi,

I am experiencing issue when selecting data in code:

[_calendarView selectDate:[NSDate date]];

I have updated my example where this issue is reproduced: https://dl.dropbox.com/u/6872784/tmp/TapkuDemo.zip

Looks like the issue is caused because of this line of code is working incorrectly:

if([month isEqualToDate:[self.currentTile monthDate]]){

[self.currentTile monthDate] is nil there

devinross commented 11 years ago

You'd crash the app by passing nil as the date in selectDate:. You're app works a little weird because you're popping the view controller before its seen. The delegate method is called if you programmatically select a date (which thus calls the pop view controller method).

ExtremeMan commented 11 years ago

@devinross thanks for comments and fix.