简体   繁体   中英

Get the outlets inside a NSMatrix

I have a NSMatrix which contains 5 cells, each cell contains an image well.
I want to avoid binding each image well, so I just have an IBOutlet which is a NSMatrix.How can I take the content of each column (that should be a NSImageWell) from the matrix?
For example I have that matrix:

@property (weak) IBOutlet NSMatrix *cells;

And the cell at column 1:

NSCell* cell=[ cells cellAtRow: 0 column: 0];
// How do I get the contained NSImageWell?

What do you mean, each cell contains an image well? How did you make your matrix? As far as I know, you can't put an image well inside a "cell". If you drag an image well onto your window, and then embed it in a matrix, the cells are NSImageCells, they're not contained in an NSCell. So, this line will get you the image cell:

NSImageCell* cell= [cells cellAtRow: 0 column: 0];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM