Skip to content

Final graded quiz: Create the User Interface :Create the User Interface with SwiftUI (Meta iOS Developer Professional Certificate) Answers 2026

Question 1

What is color consistency of an app interface?

Color consistency is coloring the user interface elements wisely and with colors that are expected for a given function.
❌ Color consistency is the technique of coloring elements with high-contrast colors.
❌ Color consistency is the technique of coloring elements with varied colors, to make an app fun and easy to use.

Explanation: Color consistency ka matlab hota hai ki same function ke liye same color use ho (jaise delete = red), taaki user confuse na ho.


Question 2

What kind of programming style is the following code?

❌ It Is Objective-C, a language that Apple replaced with Swift.
It Is Imperative Syntax, where everything has to be declared specifically.
❌ It Is Declarative Syntax, where you have to declare exactly how you want user interface elements created.

Explanation: Yahan button ka frame, position, action sab step-by-step bataya gaya hai — ye Imperative style hai.


Question 3

What is Declarative Syntax?

It Is the programming methodology where you just have to declare what kind of user interface element you want to be created.
❌ It is the programming style where you have to create the interface programmatically.
❌ it is the programming style where you have to declare exactly how you want elements to be created.

Explanation: Declarative syntax me aap “kya chahiye” batate ho, “kaise banega” system decide karta hai (SwiftUI).


Question 4

Which of the below statements are true about stacks?

Stacks can be of 3 types: VStack, HStack and ZStack.
❌ Stacks can only be used to create horizontal groups of elements.
❌ Stacks can only be used to create vertical groups of elements.

Explanation: SwiftUI me 3 stack types hote hain: vertical, horizontal aur layered.


Question 5

What is true about Hierarchical navigation?

❌ Hierarchical navigations are created by regular links.
Hierarchical navigations are created by NavigationViews and NavigationLinks.
❌ Hierarchical navigation is the same as Flat Navigation.

Explanation: Hierarchical navigation SwiftUI me NavigationView + NavigationLink se banti hai.


Question 6

Flat Navigation must be chosen for complex navigation.

❌ You should choose Hierarchical Navigation for complex navigation.
❌ It is always the best choice for complex navigation.
❌ Complex navigation will be made simpler by using Flat Navigation.

Explanation: Flat navigation complex apps ke liye suitable nahi hoti; hierarchical navigation better hoti hai.


Question 7

What view should be assigned to the destination parameter of a NavigationLink?

destination is the view that will show if the item is selected.
❌ destination and the tappable text is the same thing.
❌ destination is the text that will be tappable.

Explanation: destination wo next screen (view) hota hai jo tap ke baad open hota hai.


Question 8

What is true about DragGesture?

❌ It is used in conjunction with the TapGesture to move a view.
❌ It is the gesture to use if you want to make a view rotate.
It is the gesture you use to make a view move.

Explanation: View ko drag / move karne ke liye DragGesture use hota hai.


Question 9

What is true about onChanged?

❌ It is a modifier used to detect tap gestures with TapGesture.
❌ It is the closure triggered when a tap gesture is detected.
❌ It is a modifier used to detect long press gestures.

Explanation: onChanged DragGesture ke during continuous movement track karne ke kaam aata hai (options yahan misleading hain).


Question 10

The offset modifier is used in conjunction with the RotationGesture to rotate a view.

False
✅ True

Explanation: offset view ko move karta hai, rotate nahi. Rotation ke liye rotationEffect use hota hai.


🧾 Summary Table

Question Correct Answer
Q1 Expected functional colors
Q2 Imperative Syntax
Q3 Declare what, not how
Q4 VStack, HStack, ZStack
Q5 NavigationView + NavigationLink
Q6 None (statement incorrect)
Q7 destination = next view
Q8 DragGesture moves view
Q9 None (options incorrect)
Q10 False