Skip to content

event of tableview cell of presented not normal ! confused! #1

Description

@Dast1Woop

func shareBtnDidClick(btn: UIButton) {

    shareListVC.modalPresentationStyle = .popover
    
    shareListVC.popoverPresentationController?.sourceView = shareBtn
    
    let btnW = shareBtn.bounds.size.width
    let btnH = shareBtn.bounds.size.height
    shareListVC.popoverPresentationController?.sourceRect = CGRect.init(x: 20.0/102 * btnW,
                                                                        y: shareListVC.preferredContentSize.height * 0.66//0.66时,permittedArrowDirections必须为[]
                                                                        
                                                                        , width: btnW, height: btnH)
    

    shareListVC.popoverPresentationController?.delegate = self
    
    shareListVC.delegate = self
    
    //自定义背景View,可解决present出tv的圆角问题。但是会导致 tv的cell点击事件经常不响应!!!😓

// PopoverBackgroundConditioner.shared.arrowColor = .yellow
// PopoverBackgroundConditioner.shared.arrowSize = CGSize.init(width: 1, height: 1)
//可设置隐藏三角形,但是圆角不符合 UI
shareListVC.popoverPresentationController?.permittedArrowDirections = []

// shareListVC.popoverPresentationController?.popoverBackgroundViewClass = PopoverBackgroundView.self

    present(shareListVC, animated: true, completion: nil)
}

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