2020-09-23T08:59:02

Bounce Animation (Swift in Xcode)

Просмотров: 39 091 • 23.09.2020
504 11

Let me know what you think about the background music, and also the showing of myself in the video. :)

Periscope - @Archetapp (Haven't posted yet, but thinking of doing some live programming sessions.)

Subscribe to my channel! - http://www.youtube.com/archetapp
Check out my Website! - http://www.archetapp.com
Check me out on Twitter - http://www.twitter.com/archetapp

Donate (Thank you!) - https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XCX6T4UPC96ES

Donate (Thank you!) - https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XCX6T4UPC96ES
Еще

...
NIZAMU AMAN

Good job Mr. Jared Davidson. It is very helpful for the beginners in iOS development.
Thank you

...
Cody Condon

thank you!

...
Gabriel Hayes

Thank you!

...
Lars Vision

Suggestion: Show a demo of the final product, before you start the tutorial, so we can see where we are going. Background music is perfect, not distracting but adds good mood. Showing yourself helps to break the monotony. You are using the cuts appropriately.

...
Reid Brown

Update for options: nil it needs to be options: [ ]

...
louis srestha

Nice video :)

...
Chloe Hutchings

Thanks for this video, Jared. I used this as a brief as I'm writing in Swift 3. Keep up the useful videos, you're one of the best on here!

...
Sachin S

Thanks bro! Nice tutorial

...
Johan Albrectsen

Thanks, that vid helped alot

...
Mohammad Alhasson

Is it possible to tell me the name of the music in the beginning of the video
thanks

...
El s

you r a really cool boy your guides helps me everytime thak you Jared

...
TheO2tenify

I really love your tutorials. Its fast, straight forward and how you make mistakes. I learn a lot from your mistakes which is great!!! keep it up!!!

...
Chetan Kumar

great one!!!!...

...
Alexander Höhn

Great tutorial :) thanks

...
Troy Borges

There's an error on the " option: nil " , anyway I fixed it and make it available for everyone.
Download his source code at: https://github.com/tborges/Tricks-in-Swift-Xcode-Version-7.3.1/blob/master/bounceAnimation.swift

Thank you Jared Davidson for the video!

...
Sefa İYİ

hey men, this project code on github???

...
roberto de la Garza

why it does not work with a constrain?
I have:
@IBAction func fotoOneUpload(sender: AnyObject) {

UIView.animateWithDuration(0.6, delay: 0.0, usingSpringWithDamping: 1.0, initialSpringVelocity: 2.0, options: UIViewAnimationOptions.CurveEaseIn, animations: ({

self.menuInferior.center.y = self.viewContainer.frame.size.height/1.6
self.controlConstrain.constant = self.viewContainer.frame.size.height/1.6

}), completion: nil)
//self.view.layoutIfNeeded()

}

...
iOS Wizard

In the future we would appreciate it if you wouldn't show your face. Just stick to creating tutorials with the focus being iOS development. The showing of your face was a painful distraction. Please don't do it anymore in the future. Thanks

...
Jolly

nice video
i used to have an error on UIView.animateWithDuration(20, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 30, options:| ni |l.AllowUserInteraction, animations: ({

because on swift 22 it requires the Option to be:[ UIViewAnimationOptions] NOT nil
No offence but i just thought you could make an update since XCODE 7.3 is out

...
Francisco Oliveira

you're great!

...
FYNDAM

If you get the error = "Nil is not compatible with expected argument type UIViewAnimationOptions"

Starting from Swift 2 the UIViewAnimationOptions is a struct that implements the OptionSetType protocol. That is why you should pass an empty set like options: [] instead of nil.

~ Source: http://stackoverflow.com/questions/32638488/nil-is-not-compatible-with-expected-argument-type-uiviewanimationoptions

...
FYNDAM

Thank you Jared!

...
Di Wang

cooool!

...
Frank Gonzalez

Change the background music, the lighting is good. Work on your editing, getting to the point of the video much faster.

...
Mouad Ettaghouti

good job man

...
J P

you really got cool ideas :) but how would you make this animation visible, if its not on the first view? (i have no plan of codes and programming)...

...
Sofia Rodriguez

Hi , this animation can be applied to buttons ?

...
Sofia Rodriguez

And as I do if I want this to happen after I hit the button?

...
Angie C

Great job with these tutorials. Thanks for uploading.

...
babikucit

guys need the intro music ;_;

...
Minhal Khan

Try this code: (THANK ME LATER ;) )

Btn.center.x = self.view.frame.width + 30
LabelAni.center.y = self.view.frame.height + 30

UIView.animateWithDuration(1.0, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 1.0, options: UIViewAnimationOptions.CurveEaseIn, animations: ({
self.Btn.center.x = self.view.frame.width / 2
}), completion: nil)

UIView.animateWithDuration(1.0, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 1.0, options: UIViewAnimationOptions.CurveEaseIn, animations: ({
self.LabelAni.center.y = self.view.frame.height / 2
}), completion: nil)

...
Minhal Khan

So i did some research on UIViewAnimationOptions, instead of typing 'nil' put 'options: UIViewAnimationOptions.CurveEaseIn' and it should work, Code:

Btn.center.x = self.view.frame.width + 30

UIView.animateWithDuration(1.0, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 1.0, options: UIViewAnimationOptions.CurveEaseIn, animations: ({

self.Btn.center.x = self.view.frame.width / 2

}), completion: nil)

...
Enrique Daling

UIView.animateWithDuration(1, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 6, options: nil, animations: ({

self.OppskrifterButton.center.x = self.view.frame.width / 2


}), completion: nil)

I have an error, the OPTIONS: nil, is wrong. xCode says it i wrong but in you video it worked.. what to do?

...
Sara Kataf

The music is great, because it barely heard so it won't shift focus, but when you appear which coding it shifts our focus, so my suggestion is only showing your self before you start coding or after, thank you so much for this great video

...
Goblin Nilgob

Hi, I like it.
I would ask if it is possible to focus to the code and increase the fonts in Xcode?

...
funza Academy

Jared, my question is around writing the code in the viewDidLoad method. Basically, you did set constraints on the button in the main story board. These constraints are not invoked in the viewDidLoad method but they get applied later i.e. viewWillLayoutSubviews , I think . So do'nt you think it makes more sense to write all this code in the viewDidAppear method instead? Thank you.

...
AC

Thanks

...
Alkonine

this vid is awesome you solved my biggest problem in coding (animation) thx dude keep on goin till you reach 10,000,000,000 subs :-)

...
Michael Segovia

Hello. When i type 
Btn.center.x = self.view.frame.width + 30
I get an error saying 'NSLayoutConstraint' does not have a member named 'center'.
I tried typing Btn.CenterX, but that didn't work either. I got that from the NSLayoutConstraint Class Reference from Apple. Any ideas on how to fix this?
Thanks :)

...
Haiyan Ma

Hi Jared, Thanks a lot again for your tutorial! 
The bounce animation works perfectly for me when it is in the root view controller.
However, in my case, I first have a collection view controller. I click on one cell to go to another view controller where I want to have this animation. This animation doesn't work anymore. It only shows the final position of the label but doesn't show any animation. Do you know how to solve it?

...
Hari

is it possible to make them go away with this animation?

...
phreakii

Great! : ) One sub here.

...
Christian Tschernetzki

How it works from the other site ?

...
Matt Boulton

Hi, how would i be able to do this will SKSpritNodes?

...
dontforgetmynamee

Can you make a tutorial on how to make ANGRY BIRDS?? or maybe just how to shoot birds from a slingshot :O

...
maryam alhashemy

Thank you so much :)

...
AeronFilms

Hey Jared, thanks for the video! could you make a tutorial about Master-Detail Application?  it would be amazing! and keep it up rocking the code!!!

...
Don't Read My Profile Picture

can u do how to add iAd, google ads, admob & vungle into apps

...
Notoriouszyanga

changes are Good.

...
Achraf EL AFRIT

nice (y)