{"action":"created","issue":{"url":"https://api.github.com/repos/MengTo/Spring/issues/108","labels_url":"https://api.github.com/repos/MengTo/Spring/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/MengTo/Spring/issues/108/comments","events_url":"https://api.github.com/repos/MengTo/Spring/issues/108/events","html_url":"https://github.com/MengTo/Spring/issues/108","id":102334946,"number":108,"title":"SpringButton do not animate in second time tapped","user":{"login":"LadyRanger1992","id":6637801,"avatar_url":"https://avatars.githubusercontent.com/u/6637801?v=3","gravatar_id":"","url":"https://api.github.com/users/LadyRanger1992","html_url":"https://github.com/LadyRanger1992","followers_url":"https://api.github.com/users/LadyRanger1992/followers","following_url":"https://api.github.com/users/LadyRanger1992/following{/other_user}","gists_url":"https://api.github.com/users/LadyRanger1992/gists{/gist_id}","starred_url":"https://api.github.com/users/LadyRanger1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LadyRanger1992/subscriptions","organizations_url":"https://api.github.com/users/LadyRanger1992/orgs","repos_url":"https://api.github.com/users/LadyRanger1992/repos","events_url":"https://api.github.com/users/LadyRanger1992/events{/privacy}","received_events_url":"https://api.github.com/users/LadyRanger1992/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-21T09:11:32Z","updated_at":"2015-08-21T09:15:18Z","closed_at":null,"body":"//this is my code:\r\n#import \"MyProject-Swift.h\"\r\nSpringButton* buyLate = [[SpringButton alloc] initWithFrame:CGRectMake(xPos, frame.size.height - WIDTH*0.12, WIDTH*0.4333, WIDTH*0.1)];\r\n    [buyLate setBackgroundColor:[UIColor LVL_colorWithHexString:@\"313131\" andAlpha:1.0]];\r\n    buyLate.animation = @\"squeeze\";\r\n    buyLate.curve = @\"linear\";\r\n    [buyLate addTarget:self action:@selector(buyLateTapped:) forControlEvents:UIControlEventTouchUpInside];\r\n    [self.view addSubview:buyLate];\r\n\r\n// and in the buyLateTapped function\r\n-(void)buyLateTapped:(id)sender\r\n{\r\n    SpringButton* btn = (SpringButton*)sender;\r\n    [btn animate];\r\n   //do some thing....\r\n}\r\nthe SpringButton only animate in first time. What happen with my code? and how to resolved this problem?\r\nThank you"},"comment":{"url":"https://api.github.com/repos/MengTo/Spring/issues/comments/133344886","html_url":"https://github.com/MengTo/Spring/issues/108#issuecomment-133344886","issue_url":"https://api.github.com/repos/MengTo/Spring/issues/108","id":133344886,"user":{"login":"lastMove","id":4633817,"avatar_url":"https://avatars.githubusercontent.com/u/4633817?v=3","gravatar_id":"","url":"https://api.github.com/users/lastMove","html_url":"https://github.com/lastMove","followers_url":"https://api.github.com/users/lastMove/followers","following_url":"https://api.github.com/users/lastMove/following{/other_user}","gists_url":"https://api.github.com/users/lastMove/gists{/gist_id}","starred_url":"https://api.github.com/users/lastMove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lastMove/subscriptions","organizations_url":"https://api.github.com/users/lastMove/orgs","repos_url":"https://api.github.com/users/lastMove/repos","events_url":"https://api.github.com/users/lastMove/events{/privacy}","received_events_url":"https://api.github.com/users/lastMove/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T09:15:18Z","updated_at":"2015-08-21T09:15:18Z","body":"it the normal behavior.\r\nwhen you configure animation curve etc it reset to 0 after calling \"[btn animate]\" \r\nSo you just have to write that code inside your IBAction method:\r\n\r\n-(void)buyLateTapped:(SpringButton*)btn\r\n{\r\nbtn.animation = @\"squeeze\";\r\nbtn.curve = @\"linear\";\r\n[btn animate];\r\n}\r\nhope it helps "}}