Posts

UIAlertController inside alert shows error iOS swift

 Solution:   If you had multiple  UIAlertController then it will shows error.Then follow the below step. Add extra  UIKit that will be for additional alert.                          let  alertReplace =  UIAlertController ( title :  AppTitle ,  message :  messageToshow ,  preferredStyle : . alert )                          let  okReplaceAction = UIKit. UIAlertAction ( title :  "YES" ,  style : UIKit. UIAlertAction . Style . dest ructive ) {                             UIAlertAction  in // add the action here                         }                          let  cancelReplaceAction = UIKit...

Tint color not set for asset images

Image
 Solution: You have to select the asset image and then change the settings as like above Render as -> Default to Render as -> Template image. After that you have to set the image tint color will works fine.

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 }

{Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}]... iOS swift

 Problem: While i tried to copy one image from one path to another path.That time i faced the error like below. {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}]... Solution: While copy the file you must have to append the filename in the pasted url path and paste it.Then only it will works good.Otherwise the above error will be occur.

SwipeCollectionViewCellDelegate not working iOS swift

 Problem: SwipeCollectionViewCellDelegate not working while using  swipecellkit. Solution: cell.delegate = self You must have the above line then only it will works

View not able to set constraints iOS swift

Image
Solution:  While setting constraints that not updated then must check the below condition.Layout must be infered not autoresizing.