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!
陳香君
  • 39
  • 2
  • 10

1 Answers1

0

It's an implicitly unwrapped optional.

Alexander
  • 59,041
  • 12
  • 98
  • 151