# 11.Storyboard中UnwindSegue的使用

## 在最下层控制器中添加 `unwind segue` 的 `IBAction`

在一系列跳转关系的控制器中的根控制器中添加一个方法 如下图,我就该在红框控制器中添加 ![](http://ohfpqyfi7.bkt.clouddn.com/15082331645192.jpg)

之后在该控制器后续关联的控制器中点击 `exit` 可以看到这个 `segue` 了

![](http://ohfpqyfi7.bkt.clouddn.com/15094637614639.jpg)

想我这里联线的是按钮 `toMain` 点击按钮之后就会回到写有 `unwindSwgue` 的页面

![](http://ohfpqyfi7.bkt.clouddn.com/15094639919780.jpg)

当然传值操作和普通 `segue` 一样可以再下面的方法中进行

![](http://ohfpqyfi7.bkt.clouddn.com/15094641190591.jpg)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ryukiedev.gitbook.io/wiki/ios/za-xiang/storyboard-zhong-unwindsegue-de-shi-yong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
