CanvasPod/Canvas

i use code create UIButton ,how use CSAnimationView

langhua9527 opened this issue · 4 comments

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

搜索关东升 动画 或者翻墙用youtube有大把教程

发自我的 iPad

在 2013-12-25,20:34,langhua9527 notifications@github.com 写道:

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


Reply to this email directly or view it on GitHub.

Embed your UIButton in a UIView, and set the view's class to CSAnimationView.

@langhua9527 I guess @realsnake has answered your problem.

It's not working for me. The method is not called.