Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c6d3c9652 | |||
| f10317cef2 | |||
| 74d58700d0 | |||
| a8621a582f | |||
| c615143b62 |
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'Navigation-stack'
|
||||
s.version = '0.0.2'
|
||||
s.version = '0.0.4'
|
||||
s.summary = 'Show list of navigationControllers'
|
||||
s.license = 'MIT'
|
||||
s.homepage = 'https://github.com/Ramotion/navigation-stack'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="wMY-lE-9QR">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="wMY-lE-9QR">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
@@ -269,11 +269,7 @@
|
||||
</connections>
|
||||
</tableView>
|
||||
<toolbarItems/>
|
||||
<navigationItem key="navigationItem" id="Avt-G1-zNd">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="boolean" keyPath="displaysSearchBarInNavigationBar" value="YES"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</navigationItem>
|
||||
<navigationItem key="navigationItem" id="Avt-G1-zNd"/>
|
||||
<connections>
|
||||
<outlet property="search" destination="w8B-dB-9wA" id="nwS-76-4cb"/>
|
||||
<segue destination="iaH-ZQ-ay5" kind="show" identifier="push" id="HYI-Ga-o9f"/>
|
||||
|
||||
@@ -72,17 +72,6 @@ extension NavigationStack {
|
||||
}
|
||||
|
||||
|
||||
// MARK: Additional helpers
|
||||
|
||||
extension NavigationStack {
|
||||
|
||||
private func popToIndex(index: Int, animated: Bool) {
|
||||
let viewController = viewControllers[index]
|
||||
popToViewController(viewController, animated: animated)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: UINavigationControllerDelegate
|
||||
|
||||
extension NavigationStack: UINavigationControllerDelegate {
|
||||
@@ -126,7 +115,9 @@ extension NavigationStack: UINavigationControllerDelegate {
|
||||
|
||||
extension NavigationStack: CollectionStackViewControllerDelegate {
|
||||
func controllerDidSelected(index index: Int) {
|
||||
popToIndex(index, animated: false)
|
||||
|
||||
let newViewControllers = Array(viewControllers[0...index])
|
||||
setViewControllers(newViewControllers, animated: false)
|
||||
screens.removeRange(index..<screens.count)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user