Katieeliselambert - Nơi chia sẻ thật nhiều tin hot thú vị trong ngày
  • Home
  • Công Nghệ
  • Máy Tính
  • Phần Mềm
No Result
View All Result
  • Home
  • Công Nghệ
  • Máy Tính
  • Phần Mềm
No Result
View All Result
Katieeliselambert - Nơi chia sẻ thật nhiều tin hot thú vị trong ngày
No Result
View All Result

How to write Kickass Animated Circle Progress Bar (Ep 1)

admin by admin
June 5, 2020
in Giải Trí
29
How to write Kickass Animated Circle Progress Bar (Ep 1)



Ever wanted to integrate animation into your iOS applications? Struggled with learning about animation with the Swift language? Today’s video will teach you how to use CABasicAnimation to animate a circular stroke with CAShapeLayer. Enjoy.

Intermediate Training Core Data

Instagram Firebase Course

Facebook Group

iOS Basic Training Course

Completed Source Code

Follow me on Twitter:

Nguồn: https://katieeliselambert.com

Xem thêm bài viết khác: https://katieeliselambert.com/giai-tri/

Xem thêm Bài Viết:

  • Phim Hài DOREMON Chế chuẩn cmnr – Phần 40 – Cười 365 – Ngày Tận Thế 29 /7 Của Thánh Nô :))
  • Có Chàng Trai Viết Lên Cây – Phan Mạnh Quỳnh | MẮT BIẾC OST
  • EM GÌ ƠI | K-ICM x JACK | OFFICIAL MUSIC VIDEO
  • VE- cách chuyển file pdf sang powerpoint – chuyển đổi ppt sang jpg
  • Hướng dẫn chuyển file PDF sang CAD và tùy chỉnh theo tỉ lệ 1:1
Previous Post

[Toán lớp 4] - Bài toán tính tuổi - Bài toán đặc trưng trong chương trình Toán Tiểu Học

Next Post

Dùng thẻ ATM chuyển tiền | chi tiết | học sinh 5 tuổi cũng biết làm @@

Next Post
Dùng thẻ ATM chuyển tiền | chi tiết | học sinh 5 tuổi cũng biết làm @@

Dùng thẻ ATM chuyển tiền | chi tiết | học sinh 5 tuổi cũng biết làm @@

Comments 29

  1. Ning says:
    2 years ago

    watched a few of your videos related to animation. Great code! Anything about Lottie?

    Reply
  2. Bindass Gaming says:
    2 years ago

    Very helpful

    Reply
  3. Prayash says:
    2 years ago

    Using kCAFillModeForwards is actually causing the animation to essentially run forever. CABasicAnimation is modifying the presentation level of your object, but not its internal model. So using fillMode and isRemovedOnCompletion is not the best solution here because it's essentially telling CoreAnimation to run the animation forever (but it's stuck at the toValue), and never actually complete even though it looks visually correct. If you query that CAShapeLayer for its strokeEnd later on, it will be 0.0 internally, because again, CoreAnimation animates by modifying the presentation layer only. What you want to do is modify the internal model of the object in addition to the presentation, so later on you can query for that data and it will be what you expect. The fix is simple, give it a fromValue and right after the add() animation call, set the actual value to the destination value. Like so:

    let strokeAnimation = CABasicAnimation(keyPath: "strokeEnd")
    strokeAnimation.fromValue = 0.0
    strokeAnimation.toValue = 1.0
    strokeAnimation.duration = 2.0
    self.strokeEnd = 1.0
    self.add(strokeAnimation, forKey: "strokeEnd")

    Reply
  4. Chandler Morris says:
    2 years ago

    Awesome Video! I am attempting to utilize the Circular Animation for something other than tracking a download, even though that is a awesome way to use this and I ran into so much trouble trying to understand why setting the toValue to 0.8 filled the circle when the documentation says it should be 0.0 to 1.0 for the complete circle, found out using the start and end angle in the video, the circle is drawn 1.25 times, hence why 0.8 toValue was a complete circle with the animation, however, using (startAngle: -.pi / 2.0, endAngle: 3 * .pi / 2.0) fixes this issue incase anyone else was encountering this error when trying to use this tutorial in other ways. I don't know if the start/end angle in the video is required in order to track the download properly, but nevertheless I thought I would share. Keep up the great videos!

    Reply
  5. Damian Diaz says:
    2 years ago

    Great vid, for those watching now kCAFillModeForwards has been deprecated in Swift 4.2,
    it's now basicAnimation.fillMode = .forwards

    Reply
  6. Hamid Ansari says:
    2 years ago

    one of the best short tutorial that's I watched . that is exactly what I need . thanks you Brian

    Reply
  7. ALIAS_one11 De Papel says:
    2 years ago

    I know this video is over two years old but wow it was awesome. Using vanilla-Swift too.lol(javascript joke) Some of the names of the methods were changed but swift helped out on providing me the new names. Which i didnt know it could do that. Your officially my number one swift ios source! I hope you have a blessed day if you ever see this!

    Reply
  8. ธนากร จริยศักดิพงษ์ says:
    2 years ago

    How to use it instead of activity indicator.

    Reply
  9. haa baa says:
    2 years ago

    Hi! I see this video is a bit old, but hopefully you could answer anyways 🙂 Is it possible to use this visuals but for tracking XP for a user in a game? Say the user did something, and after completed this bar comes up, shows the new XP gained and moves bar a couple % towards then new Level. When 100% Xp is gained, it changes Level to 2, and start the tracking for road to level 3 (witch will be a bit longer road than the one between level 1-2.

    Or is this something thats not possible to do with swift? The XP and level tracking.

    Thanks for best channel on YT!

    Reply
  10. Raquel Aranda says:
    2 years ago

    Genial!!! Muchas gracias. Perfectamente explicado

    Reply
  11. Hazy Studios says:
    2 years ago

    Excellent tutorial as always! However, the circle is being overdrawn, causing it to appear to complete sooner than it does. The fix is : self.startAngle = -CGFloat.pi / 2 self.endAngle = 1.5 * CGFloat.pi

    Reply
  12. Niki Agrawal says:
    2 years ago

    thanks so much for this video!

    Reply
  13. Serghei Tricolici says:
    2 years ago

    As always, wonderful content, thank you a ton!

    Reply
  14. Nilesh Darji says:
    2 years ago

    Nice tutorial Brian. One quick question i have is if i divide the circular shapelayer in 6 parts, how do i control the animation to only animate 1/6 part when i tap and after the 6th tap it will complete the circle. any quick tip for me?

    Reply
  15. Kasra Babaei says:
    2 years ago

    It was awesome, love the pace of your tutorials. Unlike other channels that provide lengthy videos in which most of the time the guy is saying irrelevant things, you just get to the point.

    Reply
  16. Itzel says:
    2 years ago

    How are we able to build 3 circular progress bars in one view controller?

    Reply
  17. Gerasim Israyelyan says:
    2 years ago

    https://youtu.be/9aZzueB_MLA
    Speed Art iOS

    Reply
  18. Mihai Pop says:
    2 years ago

    Use endAngle: 1.5 * CGFloat.pi if you want the correct portion to be filled

    Reply
  19. Юрий says:
    2 years ago

    cooool

    Reply
  20. Umut Dönmez says:
    2 years ago

    Ty for this video . So good.

    Reply
  21. hari kiran says:
    2 years ago

    I have been created a donut chart by using the tutorial it's very helpful for me. thanking you

    Reply
  22. mohammed shafiullah says:
    2 years ago

    Are tella lanjakodaka . xamarin native lo chasi chupinchara . ne modda ga

    Reply
  23. Kris Harris says:
    2 years ago

    Amazing series! Absolute gold

    Reply
  24. Vaidas Skardžius says:
    2 years ago

    https://www.youtube.com/watch?v=ZaW-xPmjutA for part 2

    Reply
  25. Adrian Draghici says:
    2 years ago

    Hi! This tutorial is so nice. I have only one question. How can I add this animated circle in a CollectionViewCell? Thank you!

    Reply
  26. Riley Lunz says:
    2 years ago

    How do you make the label for just the animation to go from 0 to 100 if you just click the button??

    Reply
  27. AwaisFayyaz Dev says:
    2 years ago

    Hi brian,

    Great video. Is it possible to have a gradient color for that circular progress bar ?

    Thanks

    Reply
  28. James Allan says:
    2 years ago

    That video was good… real good!

    Reply
  29. Mark Lopez says:
    2 years ago

    That was really great. Keep up the good work. That helped me out a lot.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tin Hot

Xe máy điện VinFast Evo có thời gian sạc tiêu chuẩn là 10 tiếng cho vận tốc cực đại 70km/h với mức công suất 1.500W (Nguồn: vnexpress.net)

Hiện nay những dòng xe máy điện nào hoạt động tốt nhất tại Việt Nam

August 2, 2022
Nhiều cơ sở kinh doanh có thiết bị kiểm định tuổi vàng có vấn đề

Coi Chừng Những Mánh Lừa Khi Mua Vàng Trang Sức

December 8, 2021
Máy hấp giò chả 12 khay cho năng suất cao, thời gian hấp nhanh chóng

Chia sẻ bí quyết hấp giò chả bằng tủ hấp giò chả 12 khay

September 22, 2021
Cách mở sim mobiphone bị khóa 2 chiều đơn giản, nhanh chóng

Xem Ngay Cách Mở Sim mobiphone bị khóa 2 chiều

September 12, 2021
Những bức tranh con ngựa đẹp tại Phúc Tường Gold

Những bức tranh con ngựa đẹp tại Phúc Tường Gold

August 3, 2021
6 lợi ích tuyệt vời khi sử dụng tủ nấu cơm công nghiệp

6 lợi ích tuyệt vời khi sử dụng tủ nấu cơm công nghiệp

August 3, 2021
  • Liên Hệ
  • Chính Sách Bảo Mật

© 2022 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Công Nghệ
  • Máy Tính
  • Phần Mềm

© 2022 JNews - Premium WordPress news & magazine theme by Jegtheme.