Created
April 17, 2013 12:48
-
-
Save larryaasen/5403964 to your computer and use it in GitHub Desktop.
UIDevice+LAExtras - vibrate the device and get the OS name and version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIDevice+LAExtras.h | |
// Konugo | |
// | |
// Created by Larry Aasen on 3/26/13. | |
// | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIDevice (LAExtras) | |
@property(nonatomic, readonly, retain) NSString *systemNameVersion; // "iOS 6.0.1" | |
+ (void)vibrate; | |
@end | |
// | |
// UIDevice+LAExtras.m | |
// Konugo | |
// | |
// Created by Larry Aasen on 3/26/13. | |
// | |
// | |
#import "UIDevice+LAExtras.h" | |
#import "AudioToolbox/AudioServices.h" | |
@implementation UIDevice (LAExtras) | |
- (NSString *)systemNameVersion | |
{ | |
return [NSString stringWithFormat:@"%@ %@", self.systemName, self.systemVersion]; | |
} | |
+ (void)vibrate | |
{ | |
AudioServicesPlaySystemSound (kSystemSoundID_Vibrate); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment