私は、私のUITableViewのセルが選択されているときに振動を使用しようとしました。なぜ私のiPhoneは振動していないのですか?
私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: %@", dettaglioImmagine.imageCoverSource);
//passo alla vista del DettaglioView con l'animazione usando il pushViewController
[self.navigationController pushViewController:dettaglioImmagine animated:YES];
//pulisco lo style della cella selezionata togliendo il fondino blu
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
をしかし、私は、セルをクリックするとiPhoneが振動しません。 Sooなぜですか? 誰かが私を助けることができますか?
こんにちはAleksejs Mjaliks ....それは本当です...振動は私のサウンド設定ではありませんでした。どうもありがとう。 – WalterFantauzzi
Aleksejsさん、ありがとうございました! – WalterFantauzzi
@RyoSeaba正解を受け入れることを忘れないでください! :) –