iOS dev > Learning-Sina Weibo iOS bottom function button simple implementation

Source: Internet
Author: User

The above effects mainly involve point

    1. Nine Gongge layout

    2. Deformation animation

    3. UIView Animation

First, consider the effect of the image, the initial use of the modal controller to achieve, but considering that modal will eventually remove modal his controller's view, so, or use a custom UIView to achieve this feature.

To do this, the first implementation of the button appears in the position, after the implementation of the animation is easy.

    1. Start with nine Gongge layouts, create models to pass in a specified number of buttons, and use a deformation to move all the buttons to invisible coordinates

    2. After clicking the bottom button, set the deformation to the screen area (this is set to cgaffinetransformidentity directly)

    3. Click and Release the Function button to listen (implement touches method can also), the button click on the Function menu button, use the deformation setting button to become larger, release, and then set the deformation becomes larger, and make it transparent to 0

    4. Then click the bottom button to set the deformation to invisible area

After you have identified several function points, the animation effect will say.

    1. Click the bottom button, use UIView elastic animation, each button set a different delay, so that the spring and time interval effect is achieved.

      • (void) Animatewithduration: (nstimeinterval) Duration delay: (nstimeinterval) Delay usingspringwithdamping: (cgfloat) Dampingratio initialspringvelocity: (cgfloat) Velocity options: (uiviewanimationoptions) options animations: (void (^) ( void)) Animations completion: (void (^) (BOOL finished)) completion

    2. Click on the Function menu, use normal UIView animation when clicked, make the button bigger, loosen, use UIView again, let the button become big and fade away at the same time

    3. After clicking the bottom button again, use the normal UIView animation to hide and zoom out the button in reverse

Article from: TRIPLECC

Project address:Https://github.com/tripleCC/TPCSpringMenu

iOS dev > Learning-Sina Weibo iOS bottom function button simple implementation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.