8 Commits

Author SHA1 Message Date
Alex e161807bef Merge pull request #5 from durul/master
added blurEffect
2016-06-01 06:15:14 +00:00
durul 9b0371b579 added blurEffect
added blurEffect
2016-05-31 13:07:32 -04:00
Alex 220dcd062d Update README.md 2016-04-14 09:40:14 +03:00
Alex.k 7c6d3c9652 update podspec 2016-04-14 09:38:09 +03:00
Alex f10317cef2 Merge pull request #4 from AFcgi/master
[FIX] unbalanced calls to begin/end appearance transitions issue
2016-04-14 09:36:02 +03:00
cgi 74d58700d0 [FIX] unbalanced calls to begin/end appearance transitions issue 2016-04-13 21:35:31 +02:00
Alex.k a8621a582f update podspec 2016-04-12 09:52:44 +03:00
Alex.k c615143b62 fixed log warning 2016-04-12 09:49:57 +03:00
6 changed files with 21 additions and 35 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Navigation-stack'
s.version = '0.0.3'
s.version = '0.0.4'
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 = 46;
objectVersion = 47;
objects = {
/* Begin PBXBuildFile section */
@@ -276,7 +276,7 @@
};
};
buildConfigurationList = 8444B0E71C80238500B53B4E /* Build configuration list for PBXProject "NavigationStackDemo" */;
compatibilityVersion = "Xcode 3.2";
compatibilityVersion = "Xcode 6.3";
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.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
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.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
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="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"/>
+1 -1
View File
@@ -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.2'
pod 'Navigation-stack', '~> 0.0.4'
```
## Usage
@@ -87,18 +87,17 @@ 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)
}
}
+3 -12
View File
@@ -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)
}
}