Build: Optional Unwrapping Demo
This screen shows how to safely unwrap an optional string entered by the user and display a greeting message.
Target UI
------------------------- | Optional Unwrapping | |-----------------------| | Enter your name: | | [______________] | | [Show Greeting] | | | | Greeting will appear | | here after unwrapping | -------------------------
Add a TextField for user to enter their name (optional String).
Add a Button labeled 'Show Greeting'.
When button is tapped, unwrap the optional safely.
If name is present, show 'Hello, [name]!' below the button.
If name is nil or empty, show 'Please enter your name.' message.
Use safe unwrapping techniques (if let or guard let).