【问题标题】:How to get the popover when we touch on the view当我们触摸视图时如何获得弹出框
【发布时间】:2011-11-21 09:27:10
【问题描述】:

我想在日历视图上显示弹出框,如 ical 应用程序。有人可以建议如何做到这一点吗?请给我答案。 在弹出窗口或任何触摸事件的 ical 应用程序中。 当我们触摸日历视图时是否有可能获得弹出框?

【问题讨论】:

    标签: iphone uipopovercontroller touch-event


    【解决方案1】:

    看看http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPopoverController_class/Reference/Reference.html

    我假设您使用的是 iPad。此 cals 不能在 iPhone 设备上使用。

    【讨论】:

    • 感谢您的回复,但这没有用。您能建议任何有用的信息
    • 能否更详细地解释您的问题。你试过什么?
    • 我有一个带日期的日历视图。所以当我点击日期时,我想显示像 ical app 这样的弹出框。我怎样才能得到那个?
    • 为什么 UIPopoverController 没用?
    • Eventview *event =[[Eventview alloc]initWithNibName:@"Eventview" bundle:nil ]; UIPopoverController *popOver =[[UIPopoverController alloc]initWithContentViewController:event]; popOver.popoverContentSize = CGSizeMake(320,480); [popOver presentPopoverFromRect:button.frame inView:self.view allowedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
    【解决方案2】:

    您可以使用 UITapGestureRecognizer 来识别日历视图上的触摸。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多