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

存在bug #2

Open
YinDongWu opened this issue Aug 10, 2017 · 0 comments
Open

存在bug #2

YinDongWu opened this issue Aug 10, 2017 · 0 comments

Comments

@YinDongWu
Copy link

在demo中按钮的返回动作是错误的:

  • (void)didTappedReturnButton:(UIButton *)button
    {
    if (self.navigationController == nil) {
    [self dismissViewControllerAnimated:YES completion:nil];
    } else {
    if (self.parentViewController) {
    [self.parentViewController dismissViewControllerAnimated:YES completion:nil];
    } else {
    [self.navigationController popViewControllerAnimated:YES];
    }
    }
    }
    这里的。 if (self.parentViewController) {
    [self.parentViewController dismissViewControllerAnimated:YES completion:nil];
    } else {
    [self.navigationController popViewControllerAnimated:YES];
    }这个判断存在错误,应当改为这样:
  • (void)didTappedReturnButton:(UIButton *)button
    {
    if (self.navigationController == nil) {
    [self dismissViewControllerAnimated:YES completion:nil];
    } else {
    if (!self.parentViewController.parentViewController) {
    [self.parentViewController dismissViewControllerAnimated:YES completion:nil];
    } else {
    [self.navigationController popViewControllerAnimated:YES];
    }
    }
    }
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