Swiftpack.co - cuzv/Popover as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by cuzv.
cuzv/Popover 3.0.2
Popover is an UIPopoverController like control for iOS.
⭐️ 57
🕓 4 years ago
iOS
.package(url: "https://github.com/cuzv/Popover.git", from: "3.0.2")

Popover

Popover is an UIPopoverController like control for iOS.

How does it look like?

How to use

import PopoverSwift

// In view controller
let image = UIImage(named: "collection_hightlight")
let item0 = PopoverItem(title: "发起群聊", image: image) { debugPrint($0.title) }
let item1 = PopoverItem(title: "添加胖友", image: image) { debugPrint($0.title) }
let item2 = PopoverItem(title: "扫一扫", image: image) { debugPrint($0.title) }
let item3 = PopoverItem(title: "收付款", image: image) { debugPrint($0.title) }
let items = [item0, item1, item2, item3]

let controller = PopoverController(items: items, fromView: rightTopButton, direction: .down, style: .withImage)
popover(controller)        

Notice

  • v0.x for swift 2.2
  • v1.x for swift2.3
  • v2.x for swift3.x
  • v3.x for swift4.x

GitHub

link
Stars: 57
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Support large number of items
6 years ago
  • merge #6, thanks @o0oKodako0o
  • adapt for swift 3.1

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics