search

Home  >  Q&A  >  body text

Why NSMutableArray inherits from NSArray

Why NSMutableArray inherits from NSArray

曾经蜡笔没有小新曾经蜡笔没有小新2822 days ago792

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-16 13:21:55

    NSArray is actually a class cluster, refer to the official documentation https://developer.apple.com/l...

    NSMutableArray is said to inherit it, but in fact many implementation methods are different. The above document uses NSNumber as an example at the beginning to show that NSNumber can actually be an int or a float. The principle is similar.

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 13:21:55

    This is what people write in the document

    reply
    0
  • Cancelreply