Animate a Button's arrival in viewdidload
@jamtang - What about animating a button showing up on the Storyboard at all? So, not an action but just its arrival ("slideUp" for example) being triggered in that code?
How would this be initiated in viewdidload?
Thanks!
if it's in storyboard, you'll need to use an IBOutlet to connect to your button, then
@interface ViewController ()
@property (nonatomic, strong) IBOutlet SpringButton *springButton;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
springButton.animation = @"slideUp";
[springButton animate];
}
@jamztang - That completely works when I do it in your ObjectiveSpring demo project.
However, when I do it in mine I am getting an error that the "ObjectiveSpring-Swift.h" file not found. Any idea why that would happen? I've added the Spring folder (copied and added groups). I noticed that I don't actually see any file with that name in your project, but it doesn't give that error?
Sorry to keep bugging you, but I am SO CLOSE! Thanks for your help...
You will have to import with correct name. Try change ObjectiveSpring-Swift.h to YourProjectName-Swift.h
https://medium.com/ios-apprentice/using-swift-in-objective-c-projects-f7e7a09f8be
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html
James
— Sent from Mailbox
On Sun, Jul 19, 2015 at 10:12 PM, connman21 [email protected] wrote:
@jamztang - That completely works when I do it in your ObjectiveSpring demo project. However, when I do it in mine I am getting an error that the "ObjectiveSpring-Swift.h" file not found. Any idea why that would happen? I've added the Spring folder (copied and added groups). I noticed that I don't actually see any file with that name in your project, but it doesn't give that error?
Sorry to keep bugging you, but I am SO CLOSE! Thanks for your help...
Reply to this email directly or view it on GitHub: https://github.com/jamztang/ObjectiveSpring/issues/5#issuecomment-122664040
Figured out that Bridging issue... thanks.
Still working on the animation -- I'll let you know.
Sure, can’t wait to see what you’ll create!
— Sent from Mailbox
On Mon, Jul 20, 2015 at 2:36 AM, connman21 [email protected] wrote:
Figured out that Bridging issue... thanks.
Still working on the animation -- I'll let you know.
Reply to this email directly or view it on GitHub: https://github.com/jamztang/ObjectiveSpring/issues/5#issuecomment-122694174
Weird @jamztang -- it doesn't seem to work if a page is arrived at via performSegueWithIdentifier even if I have explicitly set the Spring animation into the View Controller.
Can you think of anything that I might be missing?
Thank you SO MUCH for your help... can't wait to show you my app when its done.
@connman21 So the latest Spring fixed the issue : ) https://github.com/MengTo/Spring/issues/31
Thanks, @jamztang -- appreciate your efforts and response.
I am using this animation library in my new iOS app that releases soon... I'll let you know when you can see it and give you guys a shout-out.