Online Exam Quiz

questionQuestion  1 to 30

Which of the following methods is called when a view is about to appear on the screen?

  • viewDidLoad
  • viewWillAppear
  • viewDidAppear
  • viewWillDisappear
Mark for review

Mark for review

What is the purpose of a storyboard in iOS development?

  • Define the app's UI and navigation
  • Manage app resources
  • Store user data
  • Log errors
Mark for review

How do you create a computed property in Swift?

  • var computedProperty: Int { return 1 }
  • let computedProperty: Int { return 1 }
  • computed computedProperty: Int { return 1 }
  • def computedProperty: Int { return 1 }
Mark for review

What is the purpose of the SceneDelegate in iOS 13 and later?

  • Manage app's life cycle
  • Handle background tasks
  • Manage scene-specific life cycle
  • Handle app settings
Mark for review

Mark for review

Which keyword is used to define an enumeration in Swift?

  • class
  • struct
  • enum
  • type
Mark for review

Which method is called when a table view cell is about to be displayed?

  • cellForRowAt
  • willDisplayCell
  • cellWillAppear
  • tableViewCellWillAppear
Mark for review

Which class represents the app?s main event loop and high-level app behaviors?

  • UIApplication
  • UIAppController
  • AppDelegate
  • AppController
Mark for review

Which keyword is used to declare constants in Swift?

  • let
  • var
  • const
  • static
Mark for review

How do you declare a dictionary in Swift?

  • var dict = ["key": "value"]
  • var dict = {"key": "value"}
  • var dict = (key: value)
  • var dict = [key, value]
Mark for review

What is the primary programming language used for iOS development?

  • Java
  • Kotlin
  • Swift
  • Python
Mark for review

Which method is called when an app receives a memory warning?

  • didReceiveMemoryWarning
  • memoryWarningReceived
  • handleMemoryWarning
  • onMemoryWarning
Mark for review

What is the entry point of an iOS application?

  • Main.storyboard
  • AppDelegate
  • ViewController
  • SceneDelegate
Mark for review

What is the root class of most UIKit classes?

  • UIView
  • UIResponder
  • NSView
  • UIObject
Mark for review

Which of these is used to capture touch events in iOS?

  • UITapGestureRecognizer
  • UITouch
  • UIGestureRecognizer
  • UICapture
Mark for review

Which framework is primarily used for handling data persistence in iOS apps?

  • Core Data
  • Room
  • SQLite
  • Core Storage
Mark for review

Which method is used to add a subview to a view in UIKit?

  • addSubView
  • appendView
  • insertSubView
  • addSubview
Mark for review

How do you declare a variable in Swift?

  • var x = 10
  • let x = 10
  • int x = 10
  • var int x = 10
Mark for review

What is the primary design pattern used in iOS development?

  • Singleton
  • Observer
  • MVC
  • MVVM
Mark for review

Which of the following is a dependency manager for iOS projects?

  • Maven
  • Gradle
  • CocoaPods
  • npm
Mark for review

How do you define a function in Swift?

  • def myFunction() {}
  • func myFunction() {}
  • function myFunction() {}
  • function() myFunction {}
Mark for review

How do you declare an array in Swift?

  • var arr = [1, 2, 3]
  • var arr = {1, 2, 3}
  • var arr = (1, 2, 3)
  • var arr = [1; 2; 3]
Mark for review

What is the purpose of the 'defer' statement in Swift?

  • Execute code before a loop
  • Execute code after a loop
  • Execute code just before the function returns
  • Execute code when an error occurs
Mark for review

Which method is used to dismiss a modal view controller in iOS?

  • dismiss
  • remove
  • pop
  • close
Mark for review

What is used to handle background tasks in iOS?

  • NSBackground
  • BGTask
  • BackgroundWorker
  • URLSession
Mark for review

What is a closure in Swift?

  • A type of array
  • A reference to a function
  • An anonymous function
  • A type of constant
Mark for review

What keyword is used to create a new instance of a class in Swift?

  • create
  • new
  • instantiate
  • init
Mark for review

What is the purpose of the ?lazy? keyword in Swift?

  • Declare a variable that is computed only once
  • Declare a variable that can be nil
  • Declare a variable that is mutable
  • Declare a variable that is immutable
Mark for review

Which protocol is used for table view data sources?

  • UITableViewDataSource
  • UITableViewDelegate
  • UITableViewSource
  • UITableViewHandler
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review