From 2785538dd711a8bdc1e5c96d577a03358babb224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulais?= Date: Thu, 6 Aug 2020 18:45:04 +0200 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 0e8e079..d518a75 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,18 @@ button.configuraton = .init(color: .orange, font: .cookie) ### `BMCManager` +`BMCManager` is a singleton that is used to configure both username and presenting view controller. The username is the one you've chosen on https://www.buymeacoffee.com, and the presenting view controller is the one that will be used to present donation flow when user tap on the `BMCButton`. +It can be configured in the `viewDidLoad` function: + +```swift +override func viewDidLoad() { + super.viewDidLoad() + + BMCManager.shared.username = "appcraftstudio" + BMCManager.shared.presentingViewController = self +} +``` + ## Installation ### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html)