Alignment is incorrect when PMCalendar loads the very first time
sogwiz opened this issue · 6 comments
Hi,
I like this component alot but I've been noticing an issue that's a blocker. When I present the Calendar for the very first time in my app, the alignment is off (screenshot) attached. All subsequent calls to show the calendar work just fine and the calendar is aligned properly.
The logs look the same both when it's not aligned and when it is aligned:
not working
PMLOG: -[PMDaysView drawRect:] [Line 847] End
2012-12-29 10:02:25.025 liveWants[75899:1a603] {{257, 152}, {35, 16}}
working
PMLOG: -[PMDaysView drawRect:] [Line 847] End
2012-12-29 10:01:39.954 liveWants[75857:1a603] {{257, 152}, {35, 16}}
Have you noticed this issue before? In summary, it works fine except for the very first time.
I've tried initializing the calendar numerous ways but this is how I currently initialize it:
{code}
PMCalendarController *calendarController = [[PMCalendarController alloc] initWithSize:CGSizeMake(300, 200)];
[calendarController presentCalendarFromRect:CGRectMake(100, 100, 10, 10)
inView:self.view
permittedArrowDirections:PMCalendarArrowDirectionUp | PMCalendarArrowDirectionLeft
animated:YES];
{code}
Environment: iphone 6.0 simulator
Have you tried enclosed test project? The same behavior?
i have same bug. how to fix it ?
@kovpas it works fine from the sample project, but not from my project.
In my project, I was instantiating the calendar via the following line of code:
{code}
calendarController = [[PMCalendarController alloc] initWithSize:CGSizeMake(300, 200)];
{code}
In the sample project, it is instantiated via a similar call to this:
{code}
calendarController = [[PMCalendarController alloc] initWithThemeName:@"default"];
{code}
It works fine when I use the instantiation from the sample project. @LeaguePlayer , hope this helps you as well
Yes, I confirm the problem. Temporary solution I can suggest - change default size in a theme file. Works fine then.
Fixed in the develop branch.