IOS Essay Records

Source: Internet
Author: User

One, IOS off keyboard:

1. Let the keyboard of all controls Hide

This method allows the entire view to cancel the first responder, thus allowing the keyboard of all controls to be hidden [Self.view endediting:yes];

2, let a textfiled cancellation of the first responder

Let the cancellation of a textfiled first responder [TextField Resignfirstresponder];
Second, IOS Animation: (Transform Property)

1, transparency, value range 0~1.0 (transparent ~ opaque).

Transparency, value range 0~1.0 (transparent ~ opaque). _btn.alpha = 1.0f;

2. Rotation

Fixed left 45°_btn.transform = cgaffinetransformmakerotation (-m_pi_4);//Each execution is rotated 45 degrees on the original basis _btn.transform = Cgaffinetransformrotate (_btn.transform, m_pi_4);

3. Zoom

Scaling 0.8_btn.transform = Cgaffinetransformmakescale (0.8, 0.8);//scaling on the original basis 0.8_btn.transform = Cgaffinetransformscale (_ Btn.transform, 0.8, 0.8);

4, clear all the previous deformation state (to eliminate the previous rotation, scaling and other states)

_btn.transform = cgaffinetransformidentity;

5. Common methods

// method One: 0.3 indicates execution time [UIView animatewithduration:0.3 animations:^{      //  Execute animation code }]; // Method Two: 0.3 indicates the execution time [UIView animatewithduration:0.3 animations:^{      //  Execute animation code } completion:^(BOOL finished) {      //  The animation above executes after execution }];
parsing the plist file to create an array object
NSBundle *bundle = [NSBundle mainbundle]; c++nsstring *path = [Bundle pathforresource:@ "Descs" oftype:@ "plist"];_alldescs = [Nsarray arraywithcontentsoffile: Path];

IOS Essay Records

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.