uiinterpolatingmotioneffect--Visual Difference Effect

Source: Internet
Author: User

uiinterpolatingmotioneffect--visual difference effect, iOS7 after the appearance of East, easy to operate, convenient. By looking at the document discovery, the method in this class is particularly small, the reader can see for themselves OK, and now a little explanation:

-(Instancetype) Initwithkeypath: (NSString *) keypath type: (uiinterpolatingmotioneffecttype) Type Ns_designated_  INITIALIZER; Initialize method

-(Nullable Instancetype) Initwithcoder: (Nscoder *) Adecoder Ns_designated_initializer;

@property (readonly, nonatomic) NSString *keypath; The corresponding attribute operation, listed: Center.x center.y, etc., when you flip the screen around your phone

@property (readonly, nonatomic) uiinterpolatingmotioneffecttype type; Tilt mode: currently supports two horizontal vertical

@property (Nullable, Strong, nonatomic) ID minimumrelativevalue; The minimum value, the range of the corresponding value of the KeyPath

@property (Nullable, Strong, nonatomic) ID maximumrelativevalue; Maximum value, the range of the corresponding value of the KeyPath

The sample code is as follows:

Encounter what problems, the first self-study of the document to learn, the courage to try, if you see the head file only sell his Grove line, decisive self-lifting Ah, right ah, so as to impress deeper engraved.

This function, temporarily still useless to, but very characteristic, before if want to realize this kind of effect, seemingly want to call gyroscope such thing, now very simple to solve, feel still very happy. If it is used later in the project, it will be explored. Also welcome all kinds of students actively exchange practical experience.

uiinterpolatingmotioneffect--Visual Difference Effect

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.