Mutable array for NSRect and similar types.

Discussion in 'Mac Programming' started by gekko513, Aug 14, 2006.

  1. gekko513 macrumors 603


    Oct 16, 2003
    What are good options for storing types that aren't NSObjects in an array type structure with dynamic size?

    I guess I could use NSMutableArray and box the types in objects for instance with the NSStringFromRect type functions, but that sounds like quite some overhead and I need this to go fast.

    Edit: Found the answer:
    Wrap each NSRect in an NSValue, and use an NSMutableArray as usual.
  2. kainjow Moderator emeritus


    Jun 15, 2000
    Good to know. I always wondered what NSValue was used for.

Share This Page