PaoloCuscela / Cards

Awesome iOS 11 appstore cards in swift 5.
MIT License
4.2k stars 274 forks source link

CardHighlight itemSubtitle not loading immediately #119

Open arishanapalli opened 5 years ago

arishanapalli commented 5 years ago

CardHighlight set value subTitle is not immediately loading. when switching one view to another view its loading.

let titleValue: String
let subTitleValue:String

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
       self.cardSubTitle()
    }

fileprivate func cardSubTitle(){      
 cardHighlight.title = "Title:  \(titleValue!)"
 cardHighlight.itemSubtitle = "subTitleValue:  \(subTitleValue!)"
 cardHighlight.reloadInputViews()
}

    @IBAction func setSubTitleValue(_ sender: Any) {
        title = "This is Title"
        subTitleValue = "This is subTitle"
        self.cardSubTitle()
  }

Your inputs really useful please let me know!

PaoloCuscela commented 4 years ago

Could you provide an example project ?