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

Pop Arrow disappears when table view pop over drawn below its button #96

Open
ZalakSA opened this issue Oct 31, 2017 · 13 comments
Open

Comments

@ZalakSA
Copy link

ZalakSA commented Oct 31, 2017

I want table view pop over below its button but when I make it down arrow disappears

Here is my code:-

  let startPoint = CGPoint(x: self.view.frame.width - 60, y: self.rightButtomButton.frame.origin.y + self.rightButtomButton.frame.size.height)

    
    let tableView = UITableView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: 135))
    tableView.delegate = self
    tableView.dataSource = self
    tableView.isScrollEnabled = false
    let popover1 = Popover(options: nil, showHandler: nil, dismissHandler: nil)

    popover1.show(tableView, point: startPoint)

Here is screen shot:-
simulator screen shot - iphone 8 - 2017-10-31 at 18 48 23

Why I am not able to get arrow in case of table view ? If delegate & datasource not given then arrow will appear.

Please guide me.

Thanks,
Zalak

@nandantal
Copy link

Have u found any solution to this ?

@l12ab
Copy link

l12ab commented Nov 3, 2017

yes i have this issue too, so fall bak to version 1.0.4

@alexsteinerde
Copy link

+1

@nandantal
Copy link

To fix it on this version, create one UIView and add items programmatically . Don't use tableview

@corin8823
Copy link
Owner

corin8823 commented Nov 5, 2017

It is displayed in the demo project, but where is the difference?

@salvasp
Copy link

salvasp commented Nov 9, 2017

Try to set the arrow size with the options

popover = Popover(
                    options: [
                        .type(PopoverType.down),
                        PopoverOption.blackOverlayColor(UIColor.black.withAlphaComponent(0.7)),
                        PopoverOption.sideEdge(8),
                        PopoverOption.arrowSize(CGSize(width: 12, height: 6))], //here
                    showHandler: nil, dismissHandler: nil)

@arizale
Copy link

arizale commented Nov 15, 2017

you just need to clear background of view actually

@kramsretep
Copy link

kramsretep commented Nov 15, 2017

I discovered that commenting out Popover.layoutSubviews() fixes this problem. I don't know if that breaks other use cases, however.

The change offered by salvasp above doesn't work for me.

@Maxatma
Copy link

Maxatma commented Nov 22, 2017

I have same too. Also backed to 1.0.4

@ktinguer
Copy link

I have the same issue, I'm using swift 4

@tuanmoza
Copy link

To resolve this issue
i use version 1.0.4 and fix it to Swift 4

@chetan-duke
Copy link

Any luck so far with latest version?

@CoderFenchHU
Copy link

CoderFenchHU commented Nov 6, 2023

override open func draw(_ rect: CGRect) {
 ...
 
    color.setFill()
    //        arrow.fill()
    let maskLayer = CAShapeLayer()
    maskLayer.path = arrow.cgPath
    self.layer.mask = maskLayer
}

try to use Mask replay Fill

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