No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
01XHSlideMenuDemo
02Albums
03XHAnimatedCircleDemo
04TwitterLaunchScreen
05XHCircleStokeView
06XHGradientLabel
07XHRadarDemo
08SwiftDesignPatternDemo
README.md

README.md

ios Animation Demo

This is projects including all my iOS animation demos.


#8 SwiftDesignPatternDemo


This is a demo application to show the albums related information. In the process of developing this app, you’ll become acquainted with the most common Cocoa design patterns:

  • Creational: Singleton
  • Structural: MVC, Decorator, Adapter, Facade
  • Behavioral: Observer, and Memento

###Demo demo

###Tutorial The original tutorial (Objective-C Version) is written by Eli Ganem.
The Swift version is created by Vincent Ngo: Part1 and Part2.

###Update
My code is updated to Swift 2.1 and tested in Xcode 7.


#7 XHRadarView


This is an animation demo to simulate the radar effect. When you launch the app, it will update your local address and start the radar effect animation. The fradient radar effect is based on the XHAngleGradientLayer (Swift) or AngleGradientLayer (Objective-C).

demo

###Find my iPhone icon Also I drew the Apple's find my iPhone icon using Sketch. You can download the sketch file if you need.


#6 XHGradientLabelView


This is a custom UIView which supports the text gradient effect like this:

gradient demo

###Usage ####Init

let gradientLabelView = XHGradientLabelView.init(frame: CGRect, withText text: String, andFont font: UIFont, withColors colors: [CGColor])

####Colors You can choose any color you like to fill the text. Here are two color demos:

bw

bw label

color

color label

####Installation Copy XHGradientLabelView.swift to your project.


#5 XHCircleStrokeView


This is a custon UIview which supports the circle stroke animation with a time label.

###Demo circle

###Usage ####Init

let circleStrokeView = init(
	frame: CGRect, 
	withDuration duration: Double, 
	backColor: UIColor, 
	frontColor: UIColor, 
	fillColor: UIColor, 
	strokeWidth: CGFloat, 
	enableTimeLabel labelEnable: Bool, 
	enableGlow glowEnable: Bool)
view.addSubview(circleStrokeView)

Set up the view with above custom parameters. You also can enable or disable the time label and glow effect.

####Font You can update the time label font using

circleStrokeView.timeLabel.font = UIFont(name: "HelveticaNeue", size: 80.0)
circleStrokeView.timeLabel.textColor = UIColor.whiteColor()

####Start countdown

circleStrokeView.play()

####Pause countdown

circleStrokeView.pause()

####Reset countdown

circleStrokeView.reset()

###Installation Copy XHCircleStroleView.swift to your project.


#4 Twitter Launch Screen Animation


This is a Demo to reproduce twitter's launch animation

###Demo twitter

###Usage Copy and modify the code in AppDelegate.swift.
The animation is coded in side this method before the root controller is loaded:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
	// animation code
	}

#3 XHAnimatedCircleDemo


This is a demo to show the drag effect on the bubble view.

  • The number below the view represents the draging progress.
  • This circle layer consists of four seprate curves. And the yellow points in the view are the points to control these four curves.
  • One of the use case of this effect could be the page control UI component. The bubble will be dragged and the shape will be changed between each page mark.

drag demo


#2 Albums


This is a demo with some cool animations using Gestures and UIKit Dynamics (UIDynamicAnimator, UIAttachmentBehavior, UIGravityBehavior and UISnapBehavior).

albums demo


#1 XHSlideMenuDemo


This is a custormize slide-out navigation panel. slide demo