小编use*_*428的帖子

UILongPressGestureRecognizer关闭UIButton突出显示

我有一个UILongPressGestureRecognizer添加到UIButton.当我按下UIButton时,它会按预期突出显示.但是,当调用UILongPressGestureRecognizer选择器时,突出显示将被关闭.

    UILongPressGestureRecognizer *longpressGesture = 
     [[UILongPressGestureRecognizer alloc] initWithTarget:self
                                            action:@selector(longPressHandler:)];
    longpressGesture.minimumPressDuration = 5;
    [longpressGesture setDelegate:self];
    [self.myUIButton addGestureRecognizer:longpressGesture];
    [longpressGesture release];

    - (void)longPressHandler:(UILongPressGestureRecognizer *)gestureRecognizer {
    NSLog(@"longPressHandler");
}
Run Code Online (Sandbox Code Playgroud)

在上面的示例中,按住按钮5秒后调用选择器.在调用选择器之前,该按钮会突出显示,但在调用选择器时会突然显示该按钮,即使我仍然按下该按钮.

任何人都可以解释为什么会发生这种情况,以及如何预防?我希望按下按钮在整个按下时保持高亮显示.谢谢.

iphone ios4 ios

19
推荐指数
1
解决办法
8731
查看次数

Xcode 4快速帮助不显示大量iOS信息

刚刚使用默认安装安装了Xcode 4,我正在编写iOS应用程序.

但是,当我使用"快速帮助"功能时,通常显示的唯一内容是所选符号的名称及其所在的头文件.是否有任何方法可以显示更多信息,例如"快速帮助"示例中显示的信息. Xcode 4用户指南,如:声明,摘要,参考等.或者iOS可能没有广泛的快速帮助?

xcode ios

4
推荐指数
1
解决办法
2097
查看次数

标签 统计

ios ×2

ios4 ×1

iphone ×1

xcode ×1