2011-04-09 37 views

回答

0

嘗試按鈕以下操作添加到您的按鈕

UIControlEventTouchDownRepeat 

UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 
    button.frame = CGRectMake(100.0, 100.0, 80.0, 50.0); 
    [button setTitle:@"Tap Me!" forState:UIControlStateNormal]; 
    [button addTarget:self action:@selector(touchDownRepeat:) forControlEvents:UIControlEventTouchDownRepeat];  
    [self.view addSubview:button]; 
0

這聽起來hackish的,但你可以子類的UIButton並重寫日e觸摸事件,並且如果[觸摸tapCount] == 2,你會發生什麼。

不要開始扔東西!我知道這不是優雅。