I made a simple app add uibutton to collectionviewcell but when i give action an error occurs. Here is a screenshoot.

[Error 1](https://i.stack.imgur.com/Xjy5C.png)

[Error 2](https://i.stack.imgur.com/gp5rW.png)

and my code of class: UIbuton {}

```
import Foundation
import UIKit

class KeypadUIButton: UIButton {
    var qIndex : NSIndexPath?
}

```

and my cell class is : 

```
import UIKit

class ConverterCollectionViewCell: UICollectionViewCell {

    @IBOutlet weak var keypadButton: KeypadUIButton!
}

```

and error in : 

```
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = padCollectionView.dequeueReusableCell(withReuseIdentifier: identifier, for: indexPath) as! ConverterCollectionViewCell
        let index = indexPath.row
       // -> cell.keypadButton.qIndex = indexPath as NSIndexPath
return cell
}

```

Where is my mistake. can you help me ?