Can I determine / how, if a device has vibration or not?
问题 I have some settings that enable/disable vibration for certain actions, but I find it pointless to display them if the device doesn't have the ability to vibrate. Is there a way to check if the person is using an iPod touch and if it has vibration? 回答1: This code should do it - be aware it 'assumes' the iPhone is the only device with Vibration capability. Which it is for the moment... - (NSString *)machine { static NSString *machine = nil; // we keep name around (its like 10 bytes....)