小编Wal*_*zzi的帖子

为什么我的iPhone不振动?

当我选择UITableView中的单元格时,我尝试使用Vibration.

在我的didselectedRowAtIndexPath我已经把这个代码:

    #pragma mark - DidselectRow

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    //SPINNER
    [spinner startAnimating];


    //[self performSelector:@selector(pushDetailView:) withObject:tableView afterDelay:0.1];

    int *riga = indexPath.row;
    [NSThread detachNewThreadSelector:@selector(pushDetailView) toTarget:self withObject:riga];

    ////////////////////////////////////////////////////////////////////////////////
    //                          VIBRATION ALLERT                                  //
    ////////////////////////////////////////////////////////////////////////////////

    // Issue vibrate
    //AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
    AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);
    NSLog(@"Vibra?");
    ////////////////////////////////////////////////////////////////////////////////
    //                          VIBRATION ALLERT  FIN                             //
    ////////////////////////////////////////////////////////////////////////////////



    NSLog(@"Seleziono l'immagine: %@", [photoTitles objectAtIndex:indexPath.row]);

    //creo un'istanza di DettaglioView
    DettaglioView *dettaglioImmagine = [[DettaglioView alloc] initWithNibName:@"DettaglioView" bundle:nil];



    //Inseirsco il titolo nella Navigation BAR della vista
    dettaglioImmagine.titoloSource = [photoTitles objectAtIndex:indexPath.row];

    dettaglioImmagine.imageCoverSource = [photoURLsLargeImage objectAtIndex:indexPath.row];
    NSLog(@"imageCoverSource: %@", …
Run Code Online (Sandbox Code Playgroud)

objective-c iphone-vibrate vibration ios

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

标签 统计

ios ×1

iphone-vibrate ×1

objective-c ×1

vibration ×1