2016-04-02 2 views

Antwort

3

Sie sollten dies versuchen.

//check if the device supports 3DTouch 
if(self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable){ 
    [self registerForPreviewingWithDelegate:self sourceView:self.view]; 
}else{ 
    [[[UIAlertView alloc] initWithTitle:@"Error" message:@"3DTouch not available" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil] show]; 
}