Skip to content

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

@kangyeting

Description

@kangyeting
  • (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 里面就可以了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions