Abby Conrad
Quiz by , created more than 1 year ago

Section 13 of Chapter 2 in Learn to Program using Swift for IOS Development

11
0
0
Abby Conrad
Created by Abby Conrad over 7 years ago
Close

Section 2.13: Playing sounds with AVAudioPlayer, Error Handling with if let and do catch

Question 1 of 6

1

When an application cannot perform the action that it wanted to execute, it tosses an error.

Select one of the following:

  • True
  • False

Explanation

Question 2 of 6

1

When do you need to include @IBAction
in front of any function?

Select one of the following:

  • When using something from the interface builder.

  • When creating a button.

  • When you want to print an error.

Explanation

Question 3 of 6

1

If I created a function named testSound, how would I call it?

Select one of the following:

  • func testSound()

  • @IBAction func testSound()

  • var currentSound = testSound()

  • var playSound()

Explanation

Question 4 of 6

1

You can create an audio file object by specifying that it is type AVAudioPlayer.

Select one of the following:

  • True
  • False

Explanation

Question 5 of 6

1

What do you need to import in order to use audio files?

Select one of the following:

  • AVFoundation

  • IBuilder

  • SwiftAudio

  • IBOutlet

Explanation

Question 6 of 6

1

When executing a do-catch, you need to use the following keyword in order to verify the capabilities of the object:

Select one of the following:

  • if

  • try

  • func

  • test

Explanation