Skip to content

Commit 40265ec

Browse files
committed
update iOS interview questions #2
1 parent a4e3404 commit 40265ec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

iOS Interview/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ Certainly, here’s a concise comparison:
9696
| **Use Case** | For screens/pages | For UI components or subviews |
9797

9898
In short, `UIViewController` handles the logic and flow of a screen, while `UIView` manages rendering and interaction for individual components.
99+
4. **What are `strong`, `weak`, `assign`, and `copy` attributes?**
100+
101+
| Attribute | Reference Type | Memory Management | Common Use Cases |
102+
|-----------|----------------|-------------------|----------------------------|
103+
| `strong` | Object | Retains the object | Managing object lifecycle |
104+
| `weak` | Object | No ownership | Avoiding retain cycles |
105+
| `assign` | Primitive | No memory management | Primitive types |
106+
| `copy` | Object | Creates a copy | Strings and mutable objects |
99107

100108

101109
# Architecture

0 commit comments

Comments
 (0)