react-native-morph-card 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -442,22 +442,25 @@ static CGRect imageFrameForScaleMode(UIViewContentMode mode,
|
|
|
442
442
|
|
|
443
443
|
UIView *content = wrapper.subviews.firstObject;
|
|
444
444
|
|
|
445
|
+
UICubicTimingParameters *timing = [[UICubicTimingParameters alloc]
|
|
446
|
+
initWithControlPoint1:CGPointMake(0.25, 1.0)
|
|
447
|
+
controlPoint2:CGPointMake(0.5, 1.0)];
|
|
445
448
|
UIViewPropertyAnimator *animator = [[UIViewPropertyAnimator alloc]
|
|
446
449
|
initWithDuration:dur
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
450
|
+
timingParameters:timing];
|
|
451
|
+
[animator addAnimations:^{
|
|
452
|
+
wrapper.frame = self->_cardFrame;
|
|
453
|
+
wrapper.layer.cornerRadius = self->_cardCornerRadius;
|
|
454
|
+
if (content) {
|
|
455
|
+
content.frame = (CGRect){CGPointZero, content.frame.size};
|
|
456
|
+
}
|
|
457
|
+
}];
|
|
455
458
|
|
|
456
|
-
// Fade out target screen concurrently at 15%
|
|
459
|
+
// Fade out target screen concurrently at 15%, over 65% of duration
|
|
457
460
|
dispatch_after(
|
|
458
461
|
dispatch_time(DISPATCH_TIME_NOW, (int64_t)(dur * 0.15 * NSEC_PER_SEC)),
|
|
459
462
|
dispatch_get_main_queue(), ^{
|
|
460
|
-
[UIView animateWithDuration:dur * 0.
|
|
463
|
+
[UIView animateWithDuration:dur * 0.65
|
|
461
464
|
animations:^{
|
|
462
465
|
if (targetScreen) { targetScreen.alpha = 0; }
|
|
463
466
|
}
|
|
@@ -521,20 +524,23 @@ static CGRect imageFrameForScaleMode(UIViewContentMode mode,
|
|
|
521
524
|
sourceScreen.alpha = 1;
|
|
522
525
|
}
|
|
523
526
|
|
|
527
|
+
UICubicTimingParameters *timing2 = [[UICubicTimingParameters alloc]
|
|
528
|
+
initWithControlPoint1:CGPointMake(0.25, 1.0)
|
|
529
|
+
controlPoint2:CGPointMake(0.5, 1.0)];
|
|
524
530
|
UIViewPropertyAnimator *animator = [[UIViewPropertyAnimator alloc]
|
|
525
531
|
initWithDuration:dur
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
+
timingParameters:timing2];
|
|
533
|
+
[animator addAnimations:^{
|
|
534
|
+
container.frame = self->_cardFrame;
|
|
535
|
+
container.layer.cornerRadius = self->_cardCornerRadius;
|
|
536
|
+
snapshot.frame = (CGRect){CGPointZero, self->_cardFrame.size};
|
|
537
|
+
}];
|
|
532
538
|
|
|
533
|
-
// Fade out target screen concurrently at 15%
|
|
539
|
+
// Fade out target screen concurrently at 15%, over 65% of duration
|
|
534
540
|
dispatch_after(
|
|
535
541
|
dispatch_time(DISPATCH_TIME_NOW, (int64_t)(dur * 0.15 * NSEC_PER_SEC)),
|
|
536
542
|
dispatch_get_main_queue(), ^{
|
|
537
|
-
[UIView animateWithDuration:dur * 0.
|
|
543
|
+
[UIView animateWithDuration:dur * 0.65
|
|
538
544
|
animations:^{
|
|
539
545
|
if (targetScreen) { targetScreen.alpha = 0; }
|
|
540
546
|
}
|
package/package.json
CHANGED