0

I'm confused about the difference between declaration of a variable with ! and without ! ?

I know the meaning of a optional variable/constant and that ! is used to unwrapped the optional one, but I can't find any answer to answer my question.

The following declaration means a variable is declared without initialization.

var tableView: UITableView

But what does this declaration mean?

var tableView: UITableView!
陳香君
  • 29
  • 1
  • 9

1 Answers1

0

It's an implicitly unwrapped optional.

Alexander
  • 54,014
  • 10
  • 87
  • 136