yoomoney / yookassa-payments-swift

This library allows implementing payment acceptance into mobile apps on iOS and works as an extension to the YooMoney API
https://yookassa.ru/developers
MIT License
41 stars 41 forks source link

Есть ли возможность стилизации ViewController'а возвращаемого TokenizationAssembly? #33

Closed ivanovean closed 4 years ago

ivanovean commented 5 years ago

Добрый день! Спасибо за библиотеку, всё работает отлично. Возник следующий вопрос: существует ли какая-нибудь возможность стилизации ViewController'а возвращаемого TokenizationAssembly.makeModule? Мы используем только оплату через Apple Pay и желтый цвет индикатора не очень вписывается в дизайн приложения. Поэтому очень хотелось бы немного изменить цвет индикатора либо скрыть этот ViewController. Заранее спасибо за ответ.

MetalheadSanya commented 5 years ago

You can change tint color of view controller or window. This will change color of activity indicator

ivanovean commented 5 years ago

You can change tint color of view controller or window. This will change color of activity indicator

Насколько я вижу по коду, ActivityIndicatorView проставляется Styles.heavyLight, в таком случае activity проставляется Styles.secondary с spinnerColor = .mustard. Так что проставление tintColor на ситуацию не влияет.

self.paymentVC = TokenizationAssembly.makeModule(inputData: inputData, moduleOutput: inVC)
if let gPaymentVC = self.paymentVC {
   gPaymentVC.view.tintColor = UIColor(red: 110.0/255, green: 195.0/255, blue: 49.0/255, alpha:1)
   inVC.present(gPaymentVC, animated: true, completion: nil)
}
MetalheadSanya commented 5 years ago

We will fix this style for using tint color. On 19 Mar 2019, 17:15 +0300, ivanovean notifications@github.com, wrote:

You can change tint color of view controller or window. This will change color of activity indicator Насколько я вижу по коду, ActivityIndicatorView проставляется Styles.heavyLight, в таком случае activity проставляется Styles.secondary с spinnerColor = .mustard. Так что проставление tintColor на ситуацию не влияет. self.paymentVC = TokenizationAssembly.makeModule(inputData: inputData, moduleOutput: inVC)

if let gPaymentVC = self.paymentVC {

gPaymentVC.view.tintColor = UIColor(red: 110.0/255, green: 195.0/255, blue: 49.0/255, alpha:1)

inVC.present(gPaymentVC, animated: true, completion: nil)

}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ivanovean commented 5 years ago

We will fix this style for using tint color.

Many thanks

oltv00 commented 4 years ago

@ivanovean В версиях >=2.0.5 можно конфигурировать модель CustomizationSettings, передавая ее в TokenizationModuleInputData в параметре customizationSettings

Это будет менять цвет всех основных элементов