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: 
I have a solution for your problem. Please try this code to dismiss the view controller if you present the view using modal:

Swift 3:

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

```

OR

If you present the view using "push" segue

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

```
In Swift 3.0 to 4.0 it's as easy as typing this into your function:

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

```

Or if you're in a navigation controller you can "pop" it:

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

```