Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

动画问题 #11

Closed
ad0ma opened this issue Dec 22, 2015 · 12 comments
Closed

动画问题 #11

ad0ma opened this issue Dec 22, 2015 · 12 comments

Comments

@ad0ma
Copy link

ad0ma commented Dec 22, 2015

1,设置动画无效
2,设置网格扫描动画崩溃,崩在两处设置frame的地方- LBXScanNetAnimation.m的96和111行

@MxABC
Copy link
Owner

MxABC commented Dec 22, 2015

用我的demo?

@ad0ma
Copy link
Author

ad0ma commented Dec 22, 2015

不是demo,demo效果没问题。用的是LBXScan,以及创建好pch文件并导入
#import "LBXScanViewStyle.h"
#import "LBXScanViewController.h"
#import "SubViewController.h"

@MxABC
Copy link
Owner

MxABC commented Dec 22, 2015

调用的代码看下呢

@ad0ma
Copy link
Author

ad0ma commented Dec 22, 2015

  • (IBAction)scanClick:(id)sender {

    //设置扫码区域参数设置

    //创建参数对象
    LBXScanViewStyle *style = [[LBXScanViewStyle alloc]init];

    //矩形区域中心上移,默认中心点为屏幕中心点
    style.centerUpOffset = 44;

    //扫码框周围4个角的类型,设置为外挂式
    style.photoframeAngleStyle = LBXScanViewPhotoframeAngleStyle_Outer;

    //扫码框周围4个角绘制的线条宽度
    style.photoframeLineW = 6;

    //扫码框周围4个角的宽度
    style.photoframeAngleW = 24;

    //扫码框周围4个角的高度
    style.photoframeAngleH = 24;

    //扫码框内 动画类型 --线条上下移动
    style.anmiationStyle = LBXScanViewAnimationStyle_NetGrid;

    //线条上下移动图片
    style.animationImage = [UIImage imageNamed:@"CodeScan.bundle/qrcode_scan_light_green"];

    //SubLBXScanViewController继承自LBXScanViewController
    //添加一些扫码或相册结果处理
    SubViewController *vc = [SubViewController new];
    vc.style = style;

    //vc.isQQSimulator = YES;
    [self presentViewController:vc animated:YES completion:nil];

}

@MxABC
Copy link
Owner

MxABC commented Dec 22, 2015

//线条上下移动图片
style.animationImage = [UIImage imageNamed:@"CodeScan.bundle/qrcode_scan_light_green"];
这个图片你检查一下有有没有

CodeScan.bundle/qrcode_scan_light_green 这个图片没有放在 LBXScan里面的

@ad0ma
Copy link
Author

ad0ma commented Dec 22, 2015

我猜到了,谢谢

@ad0ma
Copy link
Author

ad0ma commented Dec 22, 2015

不好意思,打的全局断点。又崩在那里了。

@ad0ma
Copy link
Author

ad0ma commented Dec 22, 2015

报错信息:Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [187.5 nan]'

@MxABC
Copy link
Owner

MxABC commented Dec 22, 2015

代码发我邮箱lbxia20091227@foxmail.com,我看下呢

@ad0ma
Copy link
Author

ad0ma commented Dec 22, 2015

已发

@MxABC
Copy link
Owner

MxABC commented Dec 22, 2015

缺图片啊,把我demo里面CodeScan.bundle copy到你工程里面就可以了

@ad0ma
Copy link
Author

ad0ma commented Dec 22, 2015

在 2015年12月22日,下午8:47,MxABC notifications@github.com 写道:

缺图片啊,把我demo里面CodeScan.bundle copy到你工程里面就可以了


Reply to this email directly or view it on GitHub #11 (comment).

。。。这个并没有在readMe看到,不好意思

@ad0ma ad0ma closed this as completed Feb 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants