hi,
what would be the correct way to display a horizontal line at the current time in IGCalendarView day view?
Thank you
Mark
i added timer to bring my current time view on top and it did the trick
thank you
Hi Mark,
Thanks for the sample.
Yea, the appointment is loading Async, so it occurs after you add your subview.
The only suggestion i can make right now, is to have the "currentTimeView" update on a timer tick. You'll probably want that anyway, so that it's always correct, not matter how long they're on that particular day.
-SteveZ
Steve,
I have modified infragistics calendar sample to demonstrate my problem.
Just drill down to today's day and there is 1 appointment there. Initially my test UILable is under appointment but once you slide the day left or right and then come back it is on top.
Perhaps I am missing something.
Hey Mark,
Did you try just calling bringSubViewToFront off of your custom view's superview?
Stephen,
here is what I ended up doing.
in DayChanged for today date I add another view to "MultiDayViewArea" at the offset calculated based on a time. That works great.
The problem I have that that view is covered by the appointment view (if there is an appointment at the current time), the strange thing is - if i change the date and then go back the view stays on top. So initially it is displayed under and i cannot figure out how to make it on top or perhaps make change the actual appointment view alpha.
if (dateTime.ToShortDateString() == DateTime.Now.ToShortDateString()) {
var calendarViewContainer = GetView(calendar, "CalendarViewContainer"); if (calendarViewContainer != null) { var dayView = GetView(calendarViewContainer, "DayView"); if (dayView != null) { var multiDayViewArea = GetView(dayView, "MultiDayViewArea"); if (multiDayViewArea != null) {
try {
var scrollView = (UIScrollView) multiDayViewArea.Subviews[0].Subviews[0].Subviews[0];
_dayLine = new UILabel(new CGRect(0, getCurrentTimeOffset(), scrollView.Frame.Width, 2)) { AutoresizingMask = UIViewAutoresizing.FlexibleWidth, TextAlignment = UITextAlignment.Left, BackgroundColor = UIColor.Red,
};
scrollView.AddSubview(_dayLine);
} catch (Exception) { }
} } }
}