|
|
@ -15,11 +15,11 @@ import DTTJailbreakDetection |
|
|
|
class SplashScreenViewController: UIViewController { |
|
|
|
|
|
|
|
struct StringConstants { |
|
|
|
let descriptionFirst = "hassle_free_transfer_text".localized() |
|
|
|
let descriptionSecond = "connect_local_community_text".localized() |
|
|
|
let descriptionThird = "earn_reward_point_text".localized() |
|
|
|
let loginText = "login_text".localized() |
|
|
|
let newUserText = "new_user_text".localized() |
|
|
|
let descriptionFirst = "hassle_free_transfer_text".localized() |
|
|
|
let descriptionSecond = "connect_local_community_text".localized() |
|
|
|
let descriptionThird = "earn_reward_point_text".localized() |
|
|
|
let loginText = "login_text".localized() |
|
|
|
let newUserText = "new_user_text".localized() |
|
|
|
} |
|
|
|
|
|
|
|
// MARK: IBOutlets |
|
|
@ -53,7 +53,7 @@ class SplashScreenViewController: UIViewController { |
|
|
|
let imageThird = UIImage(named: "ic_splashThirdScreen") |
|
|
|
|
|
|
|
var languageIndex = 0 |
|
|
|
|
|
|
|
|
|
|
|
var languages: [SendMoneyCountryViewModel] = [] |
|
|
|
var selectedLanguage: SendMoneyCountryViewModel? { |
|
|
|
didSet { |
|
|
@ -63,27 +63,31 @@ class SplashScreenViewController: UIViewController { |
|
|
|
if code == "lk" { |
|
|
|
Localize.setCurrentLanguage("si") |
|
|
|
}else |
|
|
|
|
|
|
|
if code == "kh" { |
|
|
|
Localize.setCurrentLanguage("km") |
|
|
|
}else |
|
|
|
|
|
|
|
if code == "kr" { |
|
|
|
Localize.setCurrentLanguage("ko") |
|
|
|
}else |
|
|
|
|
|
|
|
if code == "mm" { |
|
|
|
Localize.setCurrentLanguage("my") |
|
|
|
}else |
|
|
|
|
|
|
|
if code == "bd" { |
|
|
|
Localize.setCurrentLanguage("bn") |
|
|
|
} |
|
|
|
else |
|
|
|
if code == "kh" { |
|
|
|
Localize.setCurrentLanguage("km") |
|
|
|
}else |
|
|
|
|
|
|
|
if code == "np" { |
|
|
|
Localize.setCurrentLanguage("ne") |
|
|
|
} |
|
|
|
if code == "kr" { |
|
|
|
Localize.setCurrentLanguage("ko") |
|
|
|
}else |
|
|
|
|
|
|
|
if code == "mm" { |
|
|
|
Localize.setCurrentLanguage("my") |
|
|
|
}else |
|
|
|
|
|
|
|
if code == "bd" { |
|
|
|
Localize.setCurrentLanguage("bn") |
|
|
|
} |
|
|
|
else |
|
|
|
|
|
|
|
if code == "np" { |
|
|
|
Localize.setCurrentLanguage("ne") |
|
|
|
} |
|
|
|
|
|
|
|
if code == "ru" { |
|
|
|
Localize.setCurrentLanguage("ru-RU") |
|
|
|
} |
|
|
|
else { |
|
|
|
Localize.setCurrentLanguage(code) |
|
|
|
} |
|
|
@ -95,7 +99,7 @@ class SplashScreenViewController: UIViewController { |
|
|
|
|
|
|
|
var presenter: SplashScreenModuleInterface? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// MARK: VC's Life cycle |
|
|
|
|
|
|
|
override func viewDidLoad() { |
|
|
@ -167,13 +171,13 @@ class SplashScreenViewController: UIViewController { |
|
|
|
self.languageBackGroundView.clipsToBounds = true |
|
|
|
self.languageBackGroundView.layer.addShadow(offset: CGSize.init(width: 2, height: 2)) |
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(setText), name: NSNotification.Name(LCLLanguageChangeNotification), object: nil) |
|
|
|
|
|
|
|
|
|
|
|
configureTimer() |
|
|
|
setupLanguages() |
|
|
|
configureLanguage() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@objc func setText() { |
|
|
|
self.buttonLogin.setTitle("login_text".localized(), for: .normal) |
|
|
|
self.buttonSignUp.setTitle("new_user_text".localized(), for: .normal) |
|
|
@ -181,8 +185,8 @@ class SplashScreenViewController: UIViewController { |
|
|
|
setImageandLabels() |
|
|
|
} |
|
|
|
|
|
|
|
func setupLanguages() { |
|
|
|
|
|
|
|
func setupLanguages() { |
|
|
|
|
|
|
|
self.languages = Utility.getLanguages() |
|
|
|
} |
|
|
|
|
|
|
@ -233,12 +237,12 @@ class SplashScreenViewController: UIViewController { |
|
|
|
imageViewHomeLogo.image = imageFirst |
|
|
|
labelHomeDescription.text = StringConstants().descriptionFirst |
|
|
|
case 1: |
|
|
|
|
|
|
|
|
|
|
|
imageViewDotCenter.image = imageDotSelected |
|
|
|
imageViewHomeLogo.image = imageSecond |
|
|
|
labelHomeDescription.text = StringConstants().descriptionSecond |
|
|
|
case 2: |
|
|
|
|
|
|
|
|
|
|
|
imageViewDotRight.image = imageDotSelected |
|
|
|
imageViewHomeLogo.image = imageThird |
|
|
|
labelHomeDescription.text = StringConstants().descriptionThird |
|
|
@ -258,7 +262,7 @@ class SplashScreenViewController: UIViewController { |
|
|
|
self.view.backgroundColor = AppConstants.themeRedColor |
|
|
|
self.buttonSignUp.backgroundColor = AppConstants.themeDarkRedColor |
|
|
|
self.buttonLogin.backgroundColor = AppConstants.themeBlueColor |
|
|
|
// self.buttonSignUp.backgroundColor = AppConstants.themeBlueColor |
|
|
|
// self.buttonSignUp.backgroundColor = AppConstants.themeBlueColor |
|
|
|
} |
|
|
|
|
|
|
|
private func setupTimer() { |
|
|
@ -304,8 +308,8 @@ class SplashScreenViewController: UIViewController { |
|
|
|
viewcontroller.type = PickerTitle.country |
|
|
|
self.present(viewcontroller, animated: true, completion: nil) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func countrySelected(models: [SendMoneyCountryViewModel]) { |
|
|
|
self.selectedLanguage = models.first |
|
|
|
} |
|
|
|