Question: I have a custom UICollectionViewCell that has a UITextField placed on it. There are multiple items and multiple type of cells in the UICollectionView so, I want to only allow one textField's editing at a time. In order to do so, I am trying to trigger becomefirstResponder of the UItextField in the custom class of the cell when the cell gets selected.

Getting the cell from the UICollectionView script "didSelectItemat" does not satisfy me because the algorithm will be crowded and there might be a chance to call a cell that does not have UITextField.

So I want to simply write the code in customCell script. If the cell is selected, stored property of UITextField to become FirstResponder. 

My question is that is there a way to get the selection of the cell in the CustomCollectionCell class like UITableViewCell.

ex) UITableViewCell code to get selection action

```
setSelected(_ selected: Bool, animated: Bool) {
    <#code#>
}

```

I've tried to use addGesture to self but thought that it might conflict with the UICollectionView delegate didSelectItemat

```
import UIKit

class RightTextFieldCell: UICollectionViewCell {

    @IBOutlet weak var itemLabel: UILabel!
    @IBOutlet weak var valueTextField: UITextField!

    override func awakeFromNib() {
        super.awakeFromNib()
    }

    func bind(data: ProfileDoubleStringData) {
        self.itemLabel.text = data.item
        self.valueTextField.text = data.value
    }

}

```

Answer: 
It looks like your missing a required dependency in your pom for cdi-api:

```
<dependency>
    <groupId>javax.enterprise</groupId>
    <artifactId>cdi-api</artifactId>
    <version>1.2</version>
</dependency>

```
```
try with the following dependencies

<!-- CDI required APIs -->
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-atinject_1.0_spec</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jcdi_2.0_spec</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-interceptor_1.2_spec</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-annotation_1.3_spec</artifactId>
            <version>1.0</version>
        </dependency>

        <!-- CDI Impl -->
        <dependency>
            <groupId>org.apache.openwebbeans</groupId>
            <artifactId>openwebbeans-impl</artifactId>
            <version>${owb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openwebbeans</groupId>
            <artifactId>openwebbeans-web</artifactId>
            <version>${owb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openwebbeans</groupId>
            <artifactId>openwebbeans-jsf</artifactId>
            <version>${owb.version}</version>
        </dependency>

```