From 9aa0a674625e77dd6768f50cf45710cb152b5d96 Mon Sep 17 00:00:00 2001 From: Sharkes Monken Date: Mon, 14 Feb 2022 15:41:54 +0800 Subject: [PATCH] [UPDATE] Styling option --- README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7e9c9da9..6c8a0ac4 100644 --- a/README.md +++ b/README.md @@ -189,18 +189,16 @@ CountryManager.shared.country(withCode: "MY") ## Styling Options There are few styling options provided by the library such auto-hiding or styling views. ```swift - -let countryController = CountryPickerWithSectionViewController.presentController(on: self) { ... } - -// Styling country flag image view -countryController.flagStyle = .corner // E.g .corner, ,circular or .normal - -// Hide flag image view -countryController.isCountryFlagHidden = true // False - -// Hide country dial code -countryController.isCountryDialHidden = true // False - +CountryPickerWithSectionViewController.presentController(on: self, configuration: { controller in + // Styling country flag image view + controller.configuration.flagStyle = .circular + + // Hide flag image view + controller.configuration.isCountryFlagHidden = true + + // Hide country dial code + controller.configuration.isCountryDialHidden = true + }) ``` ## Contributing