You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
810 B
39 lines
810 B
// |
|
// LaunchCameraButton.m |
|
// CameraWithAVFoundation |
|
// |
|
// Created by Gabriel Alvarado on 2/18/15. |
|
// Copyright (c) 2015 Gabriel Alvarado. All rights reserved. |
|
// |
|
|
|
#import "LaunchCameraButton.h" |
|
#import "CameraStyleKitClass.h" |
|
|
|
@interface LaunchCameraButton () |
|
|
|
@property BOOL isPressed; |
|
|
|
@end |
|
|
|
@implementation LaunchCameraButton |
|
|
|
- (void)drawRect:(CGRect)rect |
|
{ |
|
[CameraStyleKitClass drawLaunchCameraWithFrame:self.bounds pressed:self.isPressed]; |
|
} |
|
|
|
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event |
|
{ |
|
self.isPressed = YES; |
|
[self setNeedsDisplay]; |
|
[super touchesBegan:touches withEvent:event]; |
|
} |
|
|
|
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event |
|
{ |
|
self.isPressed = NO; |
|
[self setNeedsDisplay]; |
|
[super touchesEnded:touches withEvent:event]; |
|
} |
|
|
|
@end
|
|
|