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

在iOS8上会闪退 #5

Open
lovelytomy opened this issue Mar 8, 2017 · 0 comments
Open

在iOS8上会闪退 #5

lovelytomy opened this issue Mar 8, 2017 · 0 comments

Comments

@lovelytomy
Copy link

lovelytomy commented Mar 8, 2017

在iOS8上运行闪退,报错信息为
image
,主要原因是weekHeaderView使用的是从iOS9才有的UIStackView,所以在低于iOS9的设备上运行是,创建的这个weekHeaderView是nil,导致

[self addConstraint:[NSLayoutConstraint constraintWithItem:self.weekHeaderView
                                                     attribute:NSLayoutAttributeTop
                                                     relatedBy:NSLayoutRelationEqual
                                                        toItem:self.navigationBar
                                                     attribute:NSLayoutAttributeBottom
                                                    multiplier:1.0
                                                      constant:0]];

中的self.weekHeaderView为nil。建议换成FDStackView,可以支持到6+

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

1 participant