Why is the static keyword used in UITableViewCell identifiers?

前端 未结 3 1494
挽巷
挽巷 2021-02-01 05:31

I\'ve read up on \"static\" on several occasions, including just before posting this question. I\'m still searching for an \"Aha\" though.

In the context of UITableView\

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 05:49

    So that it will only be constructed once. If it's not static, you'll be making one every time the message is sent (which is a lot)

提交回复
热议问题