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