Skip to content

Commit

Permalink
updata
Browse files Browse the repository at this point in the history
  • Loading branch information
shabake committed Apr 10, 2019
1 parent 0dd8718 commit cd54851
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
9 changes: 7 additions & 2 deletions GHCustom/GHCameraModuleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#import "GHCameraModuleView.h"
#import "GHPrivacyAuthTool.h"

@interface GHCameraModuleViewController ()<GHCameraModuleViewDelegate,GHCameraModuleDelegate>
@interface GHCameraModuleViewController ()<GHCameraModuleViewDelegate,GHCameraModuleDelegate,UIAlertViewDelegate>
/** 摄像头模块 */
@property (nonatomic , strong) GHCameraModule *cameraModule;
/** 扫描ui */
Expand Down Expand Up @@ -221,10 +221,15 @@ - (void)cameraModuleView:(GHCameraModuleView *)cameraModuleView button:(UIButton

- (void)cameraModule:(GHCameraModule *)cameraModule info:(NSDictionary *)info resultString:(NSString *)resultString {

UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"扫描结果" message:resultString delegate:nil cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"扫描结果" message:resultString delegate:self cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
[alertView show];
}

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex NS_DEPRECATED_IOS(2_0, 9_0) {

[self.cameraModule start];
}

#pragma mark - 懒加载
- (GHCameraModule *)cameraModule {
if (_cameraModule == nil) {
Expand Down
4 changes: 2 additions & 2 deletions GHCustom/GHScanView.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ - (void)layoutSubviews {
}

- (void)startAnimation {
[self endAnimation];

[UIView animateWithDuration:1 animations:^{
self.line.y = 2;
self.line.height = self.bounds.size.height - 2;

} completion:^(BOOL finished) {

if (finished) {
self.line.y = 0;
self.line.height = 2;
Expand All @@ -60,7 +60,7 @@ - (void)startAnimation {
}

- (void)endAnimation{
[self.line.layer removeAllAnimations];

}

- (void)drawRect:(CGRect)rect {
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ typedef NS_ENUM(NSInteger, UIGestureRecognizerState) {
UIGestureRecognizerStateRecognized = UIGestureRecognizerStateEnded
};
```

#### 属性
`delegate ` 手势代理

Expand Down Expand Up @@ -236,4 +237,11 @@ typedef NS_ENUM(NSInteger, UIGestureRecognizerState) {

### 如果对你有帮助请点帮我一个✨,小弟感激不尽



[参考1](https://blog.csdn.net/sinat_30336277/article/details/79276113)


[参考2](https://www.jianshu.com/p/080814eff67e)

---

0 comments on commit cd54851

Please sign in to comment.