shu223 / Pulsator

Pulse animation for iOS
MIT License
1.42k stars 160 forks source link

Made default position center of super layer #21

Closed musicisamiracle closed 7 years ago

musicisamiracle commented 7 years ago

I noticed in a few of the issues(#17) as well as my own experience, that the expected behavior of the Pulsator is to be centered in the superlayer, as opposed to the layer being at the superlayer's origin. I made a few changes to make the center of the superlayer the default position. The user can set a new property "autoCenter" to false if they wish to position it in a different manner. You may or may not disagree with this behavior. I also corrected a typo to a method name.

shu223 commented 7 years ago

Thanks, this is an interesting idea, and will make it simpler to use. But I wanna still keep the original one, because we can't expect the default position is center, and it is more common way in UIKit world. I cherry-picked the typo fix.

Anyway, much appreciated!

musicisamiracle commented 7 years ago

Thanks for checking out the PR and I'm glad I could help in any way. This is a great animation!

SirWellington commented 5 years ago

I would like to see this centered by default as well.