Posts

Showing posts from November, 2021

TableViewCell has "Class Cell has no initializers" error RXSwift

 Solution:      var   viewModel : My Model ? {          didSet  {              bindModel ()         }     } You must have to define the correct model in this.That's why the issue came.If model is wrong the above issue will shown...

Get the sender object from UITapGestureRecognizer

 Solution:                  let  tapGestureRecognizer =  UITapGestureRecognizer ( target : vc,  action :  #selector (vc. tapEventAction ( se nder :)))                 cell.i mg . addGestur eRecognizer ( tapGestureRecognizer)                 } When tap called       @objc   func   tapEventAction ( sender :  UITapGestureRecognizer ) {          let  btn = sender. view   as !  UIImageView }