Question: Im new to ASP. can any body give the sample code for select all the checkbox while selecting one checkbox from the check box list. 

Select All

A

B

C

once checking the select all check from the checkbox list all other items also should get selected.

Answer: 
From you image it seems like you presented the ViewController using push

The `dismissViewControllerAnimated` is used to close ViewControllers that presented using modal

**Swift 2**

```
navigationController.popViewControllerAnimated(true)

```

**Swift 4**

```
navigationController?.popViewController(animated: true)

dismiss(animated: true, completion: nil)

```
**In Swift 3.0**

If you want to dismiss a presented view controller

```
self.dismiss(animated: true, completion: nil)

```