Categories
|
Test: Swift - Implicit Unwrapping of Optionals 3. Which of the following lines are more likely to find in the UI code using story boards?
Results Congratulations! Correct Answer. You Answered: None. If you took the test, your answer will show up here. Correct Answer: @IBOutlet var textField: UITextField!; @IBOutlet var mapView: MKMapView!; Explanation When you connect the UI controls between a story board / xib file from Interface Builder into the code file of that particular view controller, you would typically make it implicitly unwrappable (i.e. by adding ! at the end of the type — UITextField! and MKMapView!). Since these are used as IB (Interface Builder) Outlets, you would also use the annotation @IBOutlet.Take the Test Take the complete test on this topic. You will be able to review answers to questions and get a test score.
Take the Test
Question 3 of 5
Test is Based on this Article
This article talks about unwrapping the optionals in Swift implicitly and the circumstances where you would use this functionality.
|
Test on how and when optionals are implicitly unwrapped in Swift.
|
|
More Articles With Similar Tags
|
Test on how and when optionals are implicitly unwrapped in Swift.
|
Test on Forced Unwrapping of the Optionals in Swift.
|
This article talks about getting the value wrapped inside an optional by unwrapping it forcibly.
|
This article discusses the safer ways of unwrapping an optional in Swift that includes Optional Binding.
|
This article talks about the Nil Coalescing Operator (??) in Swift.
|
|
|
|
|