【问题标题】:Tapku Library - Show Appointment DetailTapku 图书馆 - 显示预约详情
【发布时间】:2012-10-22 15:12:58
【问题描述】:

我有一个显示多个事件的 TKCalendarDayTimelineView。当我单击一个事件时,它会触发 gotSingleTapAtPoint 方法。使用这种方法,我想在新视图中显示被点击的事件的详细信息。我该怎么做?有没有办法确定从选定的点选择了什么事件?

- (void)tapDetectingView:(TapDetectingView *)view gotSingleTapAtPoint:(CGPoint)tapPoint
{
    //get the selected event, use the details to init a new view
    CGPoint pointInTimeLine = CGPointZero;
    pointInTimeLine = [view convertPoint:tapPoint toView:self.scrollView];
}

【问题讨论】:

    标签: iphone objective-c ios ipad tapku


    【解决方案1】:

    您应该实现TKCalendarDayTimelineViewDelegate 协议的可选calendarDayTimelineView:eventViewWasSelected 方法。不要乱搞tapDetectingView:gotSingleTapAtPoint

    - (void)calendarDayTimelineView:(TKCalendarDayTimelineView*)calendarDayTimeline eventViewWasSelected:(TKCalendarDayEventView *)eventView 
    {
       // Access the event that was tapped by "eventView.sourceEvent". Something like:
       EKEvent *event = eventView.sourceEvent;
       // Now use EKEventViewController to display the event
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-11
      • 1970-01-01
      • 1970-01-01
      • 2013-03-04
      • 2016-02-05
      • 1970-01-01
      相关资源
      最近更新 更多