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: 
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)

```
If you using the present method in the parent VC then you should call this function, to dismiss the child VC use this

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

```

if you calling child VC by using push method, to dismiss the child VC use this

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

```