Skip to content

Keyboard 和 customview 并不在同一坐标系,在presentViewController的view中弹出popview的话,customViewMaxY计算不对 #40

@chance168

Description

@chance168

Keyboard 和 customview 并不在同一坐标系,在presentViewController的view中弹出popview的话,customViewMaxY计算不对,可以这样修改:
- (void)keyboardWillShow:(NSNotification *)notification这个方法中修改:
CGFloat customViewMaxY = self.customView.pv_Bottom + self.avoidKeyboardSpace;
改成

CGRect cf = [self.customView convertRect:self.customView.bounds toView:[UIApplication sharedApplication].keyWindow];
CGFloat customViewMaxY = cf.origin.y + cf.size.height + self.avoidKeyboardSpace;

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