Swiftpack.co - shaokui-gu/GM-Dialog as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by shaokui-gu.
shaokui-gu/GM-Dialog 0.0.5
A Dialog Extension for GM
⭐️ 0
🕓 2 years ago
iOS
.package(url: "https://github.com/shaokui-gu/GM-Dialog.git", from: "0.0.5")

GM+Dialog

A extension of GM.

How to use it

alert :

      GM.showAlert(title: "这是一个alert?".localized, message: "确定?", confirmTitle: "确定", confirmAction: { action in
      ///......
      }, cancelTitle: "取消", cancelAction: nil)

actionSheet :

let sourceRect = CGRect(x: self.bounds.midX, y: 64 + 20 + 96 / 2, width: 96, height: 96)
 GM.showActionSheet(title: nil, message: nil, actions: [
            UIAlertAction.init(title: "拍照".localized, style: .default, handler: { action in
                self.takePhoto()
            }),
            UIAlertAction.init(title: "从相册选择".localized, style: .default, handler: { action in
                self.selectFromAlbum()
            }),
            UIAlertAction.init(title: "取消".localized, style: .cancel, handler: nil)
 ], sourceRect: sourceRect)

sourceRect used for iPad

GitHub

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

Dependencies

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