* Removes a view from the stack. * * @param view The view to remove.
(view: ViewController)
| 978 | * @param view The view to remove. |
| 979 | */ |
| 980 | private removeView(view: ViewController) { |
| 981 | assert( |
| 982 | view.state === VIEW_STATE_ATTACHED || view.state === VIEW_STATE_DESTROYED, |
| 983 | 'view state should be loaded or destroyed' |
| 984 | ); |
| 985 | |
| 986 | const views = this.views; |
| 987 | const index = views.indexOf(view); |
| 988 | assert(index > -1, 'view must be part of the stack'); |
| 989 | if (index >= 0) { |
| 990 | views.splice(index, 1); |
| 991 | } |
| 992 | } |
| 993 | |
| 994 | private destroyView(view: ViewController) { |
| 995 | view._destroy(); |
no test coverage detected