Coder Social home page Coder Social logo

canvas's Introduction

Canvas is a project to simplify iOS development for both designers and developers. It had been difficult for designers to get hands on building the product with the lack of objective-c and Xcode experience, and a hard time for developer to use reasonable amount of time and lines of code just to achieve really simple effects.

With Canvas, creating stunning animations requires zero lines of code, trendy effects like the Parallax headers, Sticky sections, Blurred Backgrounds, will be as simple as few lines of code changes.

Demo App

The demo app in this project uses CocoaPods, please run pod install after you download this project, then open Canvas.xcworkspace.

See this screencast in action:

Unable to build demo?

If you're getting some errors like Accelerate.framework not include, please update your CocoaPods version:

$ [sudo] gem install cocoapods

We also have a live demo avaliable at homepage.

Getting Started

If you're already on CocoaPods, installing our library is easy:

$ edit Podfile
platform :ios, '7.0'
pod 'Canvas', '~> 0.1.2'

Make sure you also update the dependencies by running this command afterwards:

pod install

Then you should now have the Xcode workspace (.xcworkspace) ready.

$open App.xcworkspace

That's it and you are good to go! See our blog posts for hands on tutorial.

How to Use

Using Interface Builder (no code required)

Specify the class CSAnimationView, and configurate the runtime attributes duration, delay, and type.

Please also get started with our more detailed explaination on what Canvas can do.

Using Code

It's very similar to using Interface Builder, instead you just setup the custom view in code.

#import "Canvas.h"
CSAnimationView *animationView = [[CSAnimationView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];

animationView.backgroundColor = [UIColor whiteColor];

animationView.duration = 0.5;
animationView.delay    = 0;
animationView.type     = CSAnimationTypeMorph;

[self.view addSubview:animationView];

// Add your subviews into animationView
// [animationView addSubview:<#(UIView *)#>]

// Kick start the animation immediately
[animationView startCanvasAnimation];

Issues

It has been reported that current version doesn't work very well with AutoLayout. Canvas animates view frame/position but autolayout requires manipulating constraints. I am not sure if there's any quick way without changing from the ground up. Our discussion here has some proposed solution but seems imperfect (but it works under iOS 8 tho). Please join our conversation or make pull request if you know a better solution!

Updates

v0.1.2 - 9 new animations, thanks for Jake-Piatkowski adding those awesome effects!

v0.1.1 - Minor fixes

v0.1 - Initial release

Requirements

iOS 7, Xcode 5

Who's behind?

LICENSE

Canvas is available under the MIT license. See the LICENSE file for more info.

canvas's People

Contributors

jamztang avatar jlaws avatar makepanic avatar mengto avatar nselvis avatar robmaceachern avatar zizhengtai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

canvas's Issues

Check if animation is running

Hi,

I've got a button which is supposed to display a View on the screen using one of your animations and when pressed again it's supposed to dismiss it.

The problem I've got is whenever the button is pressed rapidly again and again, multiple Views are being displayed as my flag variable indicates that the View is gone but it's still being animated on the screen.

Therefore is there any way of knowing when the View is finished animating?

Custom runtime attribute to run animation on certain conditions.

Seems really simple but if there was an ability to set a runtime attribute to only run the animation on first load, once per app cylce, etc. It would be helpful for building tutorial like functionalities or just having a simple animation on an initial menu that doesn't loop when you go back to it.

Knowing when the view finished animating?

It seems to be missing one small thing: Knowing when the view has finished it's animation.
Are there any plans to add to support this in the near future?

This is a very useful lib. Thank you.

Code Usage with Swift

Is there any additional setup we need to do to use the animations in swift programmatically? For example, I am trying to set a button on click to do an animation. However, I cannot just import the CSAnimationView.h file

Dlopen Error

Hi i am from Brazil... I have a problem with Canvas. I try to use CanvaCord in my Whatsapp Bot but not work.

`> [email protected] start C:\xampp\htdocs\fox-bot

node index.js

internal/modules/cjs/loader.js:1003
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: Não foi possível encontrar o módulo especificado.
\?\C:\xampp\htdocs\fox-bot\node_modules\canvas\build\Release\canvas.node
←[90m at Object.Module._extensions..node (internal/modules/cjs/loader.js:1003
:18)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:812:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:724:14)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:849:19)←[39m
←[90m at require (internal/modules/cjs/helpers.js:74:18)←[39m
at Object. (C:\xampp\htdocs\fox-bot\node_modules\←[4mcanvas←[24m
lib\bindings.js:3:18)
←[90m at Module._compile (internal/modules/cjs/loader.js:956:30)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10
)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:812:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:724:14)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:849:19)←[39m
←[90m at require (internal/modules/cjs/helpers.js:74:18)←[39m
at Object. (C:\xampp\htdocs\fox-bot\node_modules\←[4mcanvas←[24m
lib\canvas.js:9:18)
←[90m at Module._compile (internal/modules/cjs/loader.js:956:30)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10
)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:812:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:724:14)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:849:19)←[39m
←[90m at require (internal/modules/cjs/helpers.js:74:18)←[39m
at Object. (C:\xampp\htdocs\fox-bot\node_modules\←[4mcanvas←[24m
index.js:1:16)
←[90m at Module._compile (internal/modules/cjs/loader.js:956:30)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10
)←[39m
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Enzo\AppData\Roaming\npm-cache_logs\2021-03-22T20_03_32_7
06Z-debug.log`

I tried to install module named dlopen. But no work

error happen when running pos install

» pod install
Updating local specs repositories

CocoaPods 1.0.0.beta.6 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/Users/eric/.rvm/gems/ruby-2.3.0/bin/pod install

Report

  • What did you do?
    I run command pod install
  • What did you expect to happen?
    Canvas is supposed to install.
  • What happened instead?
    but an error occurs.

Stack

   CocoaPods : 0.39.0
        Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
    RubyGems : 2.5.1
        Host : Mac OS X 10.11.2 (15C50)
       Xcode : 7.1.1 (7B1005)
         Git : git version 2.4.9 (Apple Git-60)
Ruby lib dir : /Users/eric/.rvm/rubies/ruby-2.3.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 92aabb977e468f5c6955406c79c520e91f013e63

Plugins

cocoapods-plugins : 0.4.2
cocoapods-search  : 0.1.0
cocoapods-stats   : 0.6.2
cocoapods-trunk   : 0.6.4
cocoapods-try     : 0.5.1

Podfile

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '7.0'
pod 'Canvas', '~> 0.1.2'

Error

NoMethodError - undefined method `to_ary' for #<Pod::Specification name="Canvas">
Did you mean?  to_query
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/resolver/lazy_specification.rb:14:in `method_missing'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/resolver.rb:64:in `flatten'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/resolver.rb:64:in `block in resolve'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/resolver.rb:63:in `tap'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/resolver.rb:63:in `resolve'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:539:in `block in resolve_dependencies'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in `section'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:537:in `resolve_dependencies'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:70:in `analyze'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:213:in `analyze'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:136:in `block in resolve_dependencies'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in `section'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:135:in `resolve_dependencies'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:105:in `install!'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:101:in `run'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Users/eric/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/Users/eric/.rvm/gems/ruby-2.3.0/bin/pod:23:in `load'
/Users/eric/.rvm/gems/ruby-2.3.0/bin/pod:23:in `<main>'
/Users/eric/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/Users/eric/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'

Shake Animation View - Starting Position wrong with Auto layout

Hi,

With a Shake animation embedded in a ViewControler that has Auto Layout enabled. the starting position for the Shake Animation view is incorrect.

Best way to see this in action is to take the demo app, turn on Autolayout for the Animnation Table View Controller. For the Shake view itself, change the Delay attribute to 4 seconds.

Now when you run the app, you will see the Shake view is offset to the left - probably it's starting position for the shake but this should not happen until the animation is active i.e. after the animation actually starts?

I can't get the animation to Start AFTER view has loaded

Hi, When the view loads ie after segue from previous VC, the animations have almost already completed. I tried changing the delay but it didn't work. I want the animations to happen after the view has appeared. Any help here?

Thanks

CSAnimations not starting after modal presentation

The issue can be seen in the two videos below. The login view is a CSAnimation view which is set up in Interface Builder. The login view has a zoomOut animation set which is firing when the login screen is the initial view controller, but not when presented modally.

NOTE: I am running this in XCode 6 using Swift. I don't think that is the problem, though, since I have tried this using the deprecated modal transitions as well.

Non-modal: https://docs.google.com/a/mutualmobile.com/file/d/0B9C9Tl1ZlArPTGJXWkQ3YVExbms/edit

Modal: https://docs.google.com/a/mutualmobile.com/file/d/0B9C9Tl1ZlArPTGJXWkQ3YVExbms/edit

Do you guys have any ideas why this is happening? It seems like the CSAnimation is firing twice when presented modally but once when the screen is the initial view controller.

ios7 autolayout?

you say ios7 auto layout not work well,

i test in ios7 auto layout,it did not work well,

so,how could we do? because, our company need ios7.

谢谢!

pod install not working

Hi,

when i am going to run pod install command,it is generating below error.

[!] Unknown external source parameters for Canvas: path./

NoMethodError - undefined method `add_dependency' for nil:NilClass

Please help. Can't install pod :(

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Report

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Stack

   CocoaPods : 0.33.1
        Ruby : ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
    RubyGems : 2.0.5
        Host : Mac OS X 10.10 (14A314h)
       Xcode : 6.0 (6A279r)
Ruby lib dir : /Users/yamill/.rvm/rubies/ruby-2.0.0-p247/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 639dd906b7856f9fb68241b45e10205bb55a912f

Podfile

platform :ios, '7.0'
pod 'Canvas', '~> 0.1'

target "WPV" do
end

#target "WPVTests" do
#end

Error

NoMethodError - undefined method `add_dependency' for nil:NilClass
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/installer.rb:402:in `block (2 levels) in set_target_dependencies'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/installer.rb:401:in `each'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/installer.rb:401:in `block in set_target_dependencies'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/installer.rb:400:in `each'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/installer.rb:400:in `set_target_dependencies'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/installer.rb:118:in `block in generate_pods_project'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/user_interface.rb:52:in `section'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/installer.rb:114:in `generate_pods_project'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/installer.rb:91:in `install!'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/command/project.rb:40:in `run_install_with_update'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/command/project.rb:70:in `run'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/claide-0.6.1/lib/claide/command.rb:281:in `run'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/lib/cocoapods/command.rb:48:in `run'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.33.1/bin/pod:33:in `<top (required)>'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/bin/pod:23:in `load'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/bin/pod:23:in `<main>'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/Users/yamill/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

i use code create UIButton ,how use CSAnimationView

how to add animation to my button
my button like this

    loginButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [loginButton setBackgroundImage:[UIImage imageNamed:@"login_button_def.png"] forState:UIControlStateNormal];
    [loginButton setBackgroundImage:[UIImage imageNamed:@"login_button_focus.png"] forState:UIControlStateHighlighted];
    loginButton.frame = CGRectMake(35,400, 250, 50);
    [loginButton setTitle:@"登  陆" forState:UIControlStateNormal];
    [loginButton.titleLabel setFont:XYXY_SYSTEM_FONT(18)];
    [loginButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [loginButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
    [loginButton addTarget:self action:@selector(login) forControlEvents:UIControlEventTouchUpInside];

thank you

Manually import files...

Is it possible to import files without using Pods?
Which files shoul I import on my project?
Thanks.

$PODS_ROOT is deprecated

As of CocoaPods 0.34, the PODS_ROOT variable is deprecated. This seems to break my build with the following error:

ruby: No such file or directory -- /Optimizely-iOS-SDK/scripts/OptimizelyPrepareNibs.rb (LoadError)
Command /bin/sh failed with exit code 1

To quote http://blog.cocoapods.org/CocoaPods-0.34:

"Unfortunately during the release candidates we discovered that a non negligible number of Pods rely on the unsupported PODS_ROOT configuration setting instead of using the vendored_frameworks and the vendored_libraries attributes. [...] However, this is a temporary band aid and Podspecs maintainers should update their specifications as soon as possible."

Problem seems to come from scripts/prepare_command.rbin line $PODS_ROOT/Optimizely-iOS-SDK/scripts/OptimizelyPrepareNibs.rb

Comment code

Add comments to code for developers; for example, explain how to use methods in CSAnimation.h and CSAnimationView.h. It would be helpful for getting a better idea of how canvas works without having to read your code.

Subclassing UILabels and UIImageViews

Hey guys,
This isn't really a big issue, but while using your control, I realized that sometimes, embedding my UILabels and such was a pain in terms of UIView constraints (I have a crap ton of UILabels in my view controller view). Instead, I think you should start making UILabel subclasses (and UIImageView) so that we don't have to embed these views...

I tried copying your code and it actually worked really well, and everything was the same from the animations, etc.:
.h

#import <UIKit/UIKit.h>
#import "CSAnimation.h"

@interface CSLabel : UILabel

@property (nonatomic) NSTimeInterval delay;
@property (nonatomic) NSTimeInterval duration;
@property (nonatomic, copy) CSAnimationType type;
@property (nonatomic) BOOL pauseAnimationOnAwake;

@end

@interface UILabel (CSLabel)

- (void)startCanvasAnimation;

@end

.m

#import "CSLabel.h"

@implementation CSLabel

- (void)awakeFromNib {
    if (self.type && self.duration && ! self.pauseAnimationOnAwake) {
        [self startCanvasAnimation];
    }
}

- (void)startCanvasAnimation {

    Class <CSAnimation> class = [CSAnimation classForAnimationType:self.type];

    [class performAnimationOnView:self duration:self.duration delay:self.delay];

    [super startCanvasAnimation];
}

@end

@implementation UIView (CSAnimationView)

- (void)startCanvasAnimation {
    [[self subviews] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        [obj startCanvasAnimation];
    }];
}

@end

Just something to think about. This control has been amazing!

Adjust for large screen size (iPhone 6 & 6 Plus)

When using bounceLeft/Right etc., the animating views start from outside the screen on iPhone 5s and older devices but start from inside the screen on iPhone 6 & 6 Plus. I looked into the code and found it's because the starting point is now set to be 300 right/left to the origin. I think it can be solved either by setting a larger constant offset for all animations or determining the offset at runtime by detecting current screen size.

can't pod install with demo app

should modify the podfile, add the target line.

target 'Canvas' do
pod 'DAKeyboardControl'
pod 'Canvas', :path => './Canvas.podspec'
pod 'URBMediaFocusViewController'
end

Accelerate.framework

I had to add Acclerate framework for the project to build successfully.
The Readme can list it in the Getting Started

CSBlurView might be considered using private APIs

Hi. Just an heads up...
As you can read here the method used to achieve the blur in CSBlurView might get an app rejected by apple, as it's now considered private.
I also implemented the same method in one of my pods. I used that pod in one of my projects, and although the app passed Apple validation, the blurred view does not appear on an ipad retina with ios 7.1.

Canvas Framework Not Found

I spent several hours looking for a solution. I ran the install multiple times, and each time it could not find the Canvas.framework or the pod.MYAPP.framework or Foundation.framework files. I installed the git repository, I edited gitignore, I edited my podfile, etc. Please look into this issue. I had to find another solution for animating my buttons and wasted a lot of time on this. I also had to recode my entire application since it would be faster to do this than to try to fix all the config issues created by installing pods in my project.

Button Title change color.....

CSAnimationView * loginAnimation = [[CSAnimationView alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(verifyFieldAnimation.frame) + 35., SCREENBOUND.size.width - 30., 45)];
loginAnimation.type = CSAnimationTypeFadeInSemi;
loginAnimation.delay = .5;
loginAnimation.duration = .4;
loginAnimation.backgroundColor = [UIColor clearColor];
loginAnimation.layer.masksToBounds = YES;
loginAnimation.layer.cornerRadius = 7;
[self addSubview:loginAnimation];

_loginButton = [UIButton buttonWithType:UIButtonTypeCustom];
_loginButton.frame = CGRectMake(15, CGRectGetMaxY(verifyFieldAnimation.frame) + 35., SCREENBOUND.size.width - 30., 45);
[_loginButton setBackgroundImage:[UIImage imageNamed:@"login_btn"] forState:UIControlStateNormal];
[_loginButton setTitle:@"登录" forState:UIControlStateNormal];
[_loginButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_loginButton.titleLabel.font = [UIFont fontForFontName:FontNameHelveticaNeue size:15.];
[loginAnimation addSubview:_loginButton];

// Animation
[loginAnimation startCanvasAnimation];

And, My Button title color change from white to .5 alapha ? why ?

Membership

Hello
first of all thank you for the extraordinary work you do
I have a question if you allow: Canvas manages subscriptions and online sales? a training group for a user of such date on such date?
if not what is complicated to put it in place?
Thank you

More descriptive ReadMe

Am I right in thinking you created a custom UIView to do the animations?

So I must create my own CSAnimationView sub-classes to harness this? (or place views inside a CSAnimationView)

Working with swift

When integrating the framework with swift project using cocoapods, it always return the error "Undefined symbols for architecture x86_64:
"_CSAnimationTypeMorph", referenced from ..."

Is this a bug?

Canvas & Segue Doesn't Play the Animation First.

I have a button where I want it to animate FIRST, THEN go the second view but the button goes straight to the second view controller, even though I put animView.startCanvasAnimation() in my IBAction, I even tried to transform to the second view programmatically, but it didn't work. Please Help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.