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

有时候会影响addBadge那个superview的位置 #26

Open
ChokShen opened this issue Feb 20, 2019 · 3 comments
Open

有时候会影响addBadge那个superview的位置 #26

ChokShen opened this issue Feb 20, 2019 · 3 comments

Comments

@ChokShen
Copy link

我的情况是cell里面有一个按钮需要添加badge,结果按钮的位置出现错误查看层级打印坐标(0,0,64,35),但是我的坐标不是这个,注释掉添加badge的代码,位置显示正确
ps:我用的是frame布局

@jkpang
Copy link
Owner

jkpang commented Feb 20, 2019

你导入的PPBadgeView的代码是master分支还是使用CocoaPods导入的?
方便贴一下代码吗?
@ChokShen

Sent from PPHub For GitHub

@ChokShen
Copy link
Author

直接下载下来的,应该是master,没用pod
后来改成这样就可以了
continueChatBtn.titleLabel?.pp.addBadge(number: order?.unreadNum ?? 0)
continueChatBtn.titleLabel?.pp.moveBadge(x: 10, y: 0)
之前直接是用continueChatBtn.pp.addBadge

@jkpang
Copy link
Owner

jkpang commented Feb 20, 2019

嗯嗯,master代码我已更换成了AutoLayout布局方式,可能还不稳定。如果是手动导入,可以下载打过tag的代码 @ChokShen

Sent from PPHub For GitHub

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