Permalink
Browse files

update blur effect

  • Loading branch information...
1 parent e62c424 commit 44958a8b0535019f28e9df1fc46b97e93eb6d9db @yulingtianxia committed Oct 9, 2016
View
@@ -53,4 +53,13 @@ Carthage/Build
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
fastlane/report.xml
+fastlane/Preview.html
fastlane/screenshots
+fastlane/test_output
+
+# Code Injection
+#
+# After new code Injection tools there's a generated folder /iOSInjectionProject
+# https://github.com/johnno1962/injectionforxcode
+
+iOSInjectionProject/
@@ -1,9 +1,10 @@
-<?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="BYZ-38-t0r">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@@ -15,35 +16,30 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="iDJ-MD-Hud">
- <rect key="frame" x="20" y="20" width="560" height="580"/>
- </imageView>
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="iDJ-MD-Hud"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ue6-eP-634">
- <rect key="frame" x="249" y="156" width="103" height="30"/>
<state key="normal" title="TBActionSheet"/>
<connections>
<action selector="clickActionSheet:" destination="BYZ-38-t0r" eventType="touchUpInside" id="86g-z2-G8n"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oby-Zb-WXf">
- <rect key="frame" x="221" y="285" width="159" height="30"/>
<state key="normal" title="TBAlertController-Alert"/>
<connections>
<action selector="clickControllerWithAlert:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Sdh-q9-zbC"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FXr-9n-GC6">
- <rect key="frame" x="196" y="390" width="209" height="30"/>
<state key="normal" title="TBAlertController-ActionSheet"/>
<connections>
<action selector="clickControllerWithActionSheet:" destination="BYZ-38-t0r" eventType="touchUpInside" id="oKd-Ci-91q"/>
</connections>
</button>
</subviews>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="iDJ-MD-Hud" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="KLP-qH-iiI"/>
<constraint firstItem="oby-Zb-WXf" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="Lax-oZ-Lk1"/>
@@ -57,6 +53,9 @@
<constraint firstItem="iDJ-MD-Hud" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="uZU-K9-6vt"/>
</constraints>
</view>
+ <connections>
+ <outlet property="imageView" destination="iDJ-MD-Hud" id="mL5-aJ-zeh"/>
+ </connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
@@ -15,6 +15,7 @@ @interface ViewController () <TBActionSheetDelegate>
@property (nonnull,nonatomic) NSObject *leakTest;
@property (nonnull,nonatomic) ConditionerView *conditioner;
@property (nonatomic) TBActionSheet *actionSheet;
+@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@end
@implementation ViewController
@@ -23,6 +24,19 @@ - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
_leakTest = [NSObject new];
+ [self runSpinAnimationOnView:self.imageView duration:1 rotations:1 repeat:HUGE_VALF];
+}
+
+- (void) runSpinAnimationOnView:(UIView*)view duration:(CGFloat)duration rotations:(CGFloat)rotations repeat:(float)repeat;
+{
+ CABasicAnimation* rotationAnimation;
+ rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
+ rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 /* full rotation*/ * rotations * duration ];
+ rotationAnimation.duration = duration;
+ rotationAnimation.cumulative = YES;
+ rotationAnimation.repeatCount = repeat;
+
+ [view.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
}
- (void)didReceiveMemoryWarning {
Oops, something went wrong.

0 comments on commit 44958a8

Please sign in to comment.