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

iOS13下会出现第一次无法点击按钮问题 #10

Open
kangyeting opened this issue Feb 19, 2020 · 0 comments
Open

iOS13下会出现第一次无法点击按钮问题 #10

kangyeting opened this issue Feb 19, 2020 · 0 comments

Comments

@kangyeting
Copy link

  • (void)addToKeyWindow
    {
    if (!self.superview) {
    UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
    [keyWindow addSubview:self];

    }
    }

  • (void)commonInit
    {
    [self addSubview:self.dimBackgroundView];
    [self addSubview:self.shareSheetView];

    self.frame = CGRectMake(0, 0, ZY_ScreenWidth, ZY_ScreenHeight);

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hide) name:ZY_HideNotification object:nil];
    }

是把 [self addSubview:self.dimBackgroundView];
[self addSubview:self.shareSheetView];
俩行代码 , 挪到了 commonInit 里面就可以了

@maplestory1990
Copy link

  • (void)addToKeyWindow
    {
    if (!self.superview) {
    UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
    [keyWindow addSubview:self];
    }
    }

  • (void)commonInit
    {
    [self addSubview:self.dimBackgroundView];
    [self addSubview:self.shareSheetView];
    self.frame = CGRectMake(0, 0, ZY_ScreenWidth, ZY_ScreenHeight);
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hide) name:ZY_HideNotification object:nil];
    }

是把 [self addSubview:self.dimBackgroundView];
[self addSubview:self.shareSheetView];
俩行代码 , 挪到了 commonInit 里面就可以了

按你的处理正常了,非常感谢。

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