Skip to content

SunZhiC/SZCPopoverView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SZCPopoverView

Update to Swift 5.2

A simple popover View

image

let popoverView = SZCPopOverView(origin: point, width: 200, height: 100, direction: .bottomLeft)
popoverView.backView.layer.cornerRadius = 5
        
let labelOne = UILabel(frame: CGRect(x: 0, y: 0, width: 200, height: 50))
labelOne.text = "Take a photo"
let labelTwo = UILabel(frame: CGRect(x: 0, y: 50, width: 200, height: 50))
labelTwo.text = "Choose from library"
        
popoverView.backView.addSubview(labelOne)
popoverView.backView.addSubview(labelTwo)
        
popoverView.popView()

It is very easy to use.

1.Creat a popoverView, set its backView‘s origin point,width,height and direction.

2.Add your custom view to backView.

3.Pop popoverView.

4.And more, you could set backView’s property and popoverView's property.

Releases

No releases published

Packages

No packages published

Languages