Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5238c1c342 |
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'Navigation-stack'
|
||||
s.version = '0.0.4'
|
||||
s.version = '0.0.3'
|
||||
s.summary = 'Show list of navigationControllers'
|
||||
s.license = 'MIT'
|
||||
s.homepage = 'https://github.com/Ramotion/navigation-stack'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 47;
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -276,7 +276,7 @@
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 8444B0E71C80238500B53B4E /* Build configuration list for PBXProject "NavigationStackDemo" */;
|
||||
compatibilityVersion = "Xcode 6.3";
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
@@ -418,7 +418,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -456,7 +456,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
|
||||
@@ -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="10116" systemVersion="15E65" 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="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="wMY-lE-9QR">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
@@ -269,7 +269,11 @@
|
||||
</connections>
|
||||
</tableView>
|
||||
<toolbarItems/>
|
||||
<navigationItem key="navigationItem" id="Avt-G1-zNd"/>
|
||||
<navigationItem key="navigationItem" id="Avt-G1-zNd">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="boolean" keyPath="displaysSearchBarInNavigationBar" value="YES"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</navigationItem>
|
||||
<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"/>
|
||||
|
||||
@@ -23,7 +23,7 @@ Just add the Source folder to your project.
|
||||
|
||||
or use [CocoaPods](https://cocoapods.org) with Podfile:
|
||||
``` ruby
|
||||
pod 'Navigation-stack', '~> 0.0.4'
|
||||
pod 'Navigation-stack', '~> 0.0.2'
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -87,17 +87,18 @@ extension CollectionViewStackCell {
|
||||
}
|
||||
|
||||
private func addBlurOnImage(image: UIImageView) {
|
||||
// create effect
|
||||
// UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
|
||||
//
|
||||
// // add effect to an effect view
|
||||
// UIVisualEffectView *effectView = [[UIVisualEffectView alloc]initWithEffect:blur];
|
||||
// effectView.frame = self.view.frame;
|
||||
//
|
||||
// // add the effect view to the image view
|
||||
// [self.imageView addSubview:effectView];
|
||||
|
||||
let blurEffect = UIBlurEffect(style: .Dark)
|
||||
let blurView = UIVisualEffectView(effect: blurEffect)
|
||||
blurView.translatesAutoresizingMaskIntoConstraints = false
|
||||
imageView!.insertSubview(blurView, atIndex: 3)
|
||||
|
||||
let vibrancyEffect = UIVibrancyEffect(forBlurEffect: blurEffect)
|
||||
let vibrancyView = UIVisualEffectView(effect: vibrancyEffect)
|
||||
vibrancyView.translatesAutoresizingMaskIntoConstraints = false
|
||||
blurView.contentView.addSubview(vibrancyView)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -72,6 +72,17 @@ 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 {
|
||||
@@ -115,9 +126,7 @@ extension NavigationStack: UINavigationControllerDelegate {
|
||||
|
||||
extension NavigationStack: CollectionStackViewControllerDelegate {
|
||||
func controllerDidSelected(index index: Int) {
|
||||
|
||||
let newViewControllers = Array(viewControllers[0...index])
|
||||
setViewControllers(newViewControllers, animated: false)
|
||||
popToIndex(index, animated: false)
|
||||
screens.removeRange(index..<screens.count)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user