Bird
0
0

Which of these is required to use matchedGeometryEffect between two views?

easy📝 Conceptual Q2 of 15
iOS Swift - Animations
Which of these is required to use matchedGeometryEffect between two views?
AA unique <code>id</code> for each view without sharing.
BA shared <code>@Namespace</code> variable.
CA <code>ViewModifier</code> applied to both views.
DA <code>Gesture</code> recognizer attached to both views.
Step-by-Step Solution
Solution:
  1. Step 1: Identify the key requirement for matchedGeometryEffect

    Both views must share the same @Namespace to link their geometry.
  2. Step 2: Eliminate incorrect options

    Unique ids without sharing namespace won't link views; gestures and modifiers are unrelated.
  3. Final Answer:

    A shared @Namespace variable. -> Option B
  4. Quick Check:

    Shared @Namespace = required for matchedGeometryEffect [OK]
Quick Trick: Use one @Namespace for all matchedGeometryEffect views [OK]
Common Mistakes:
  • Using different @Namespace variables for views
  • Thinking unique ids alone link views
  • Confusing gestures with geometry effects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More iOS Swift Quizzes