how to change row size in Apple's SourceView sample
While reading the book "Beginning Mac Programming" by Tim Isted I'am trying to understand the "SourceView" sample from Apple's website.
I would like to make the images开发者_开发知识库 of devices and places a bit larger.
By changing the line "#define kIconImageSize 16" in the file ImageAndTextCell.m it is possible to alter the size of the image in the NSTableColumn. Unfortunately this doesn't change the height of the row of the table.
By experimenting with imageSize in the method drawWithFrame I tried to alter the height of the row but so far no luck.
Can somebody explain to me how I can not only alter the size of the image but als the height of the row?
You can change the height of table rows by setting an object as the delegate of your table view and implementing the ‑tableView:heightOfRow:
delegate method in that object.
For outline views you'd use the ‑outlineView:heightOfRowByItem:` method.
精彩评论