NSOUlineView 对齐和标题单元格字体
我对 NSOUlineView 具体有三个问题。
1) 标题单元格字体:我想减小标题单元格的字体大小。我尝试使用IB但没有成功。从 NSOutlineView 中解除 Table Cell View 的绑定确实有效,但如果我想进一步扩展大纲视图中的组数量,则不太可行。
2)标题单元格对齐:标题单元格的对齐方式不固定,但如果我调整视图大小,文本位置会发生变化(如图所示)。一种解决方案是向 Table Cell View 添加新的约束(超视图的前导空间)。还有其他更好的修复(以编程方式)吗?
3) 垂直对齐:单元格行内的图标和文本未垂直居中。我需要使用 Cell 框架来解决这个问题吗?
I have specifically three problems with NSOulineView.
1) Header Cells font: I want to reduce the font size just of the header cell. I tried using IB but without success. Unbinding the Table Cell View from the NSOutlineView does work but it is not really feasible if I want to further extend the number of groups in the outline view.
2) Header Cells alignment: the alignment of the header cells is not fixed but the text position changes if I resize the view (as you can see in the image). One solution is to add a new constraint (leading space to superview) to the Table Cell View. Is there any other better fix (programmatically)?
3) Vertical alignment: The icon and the text inside the row for the Cell is not centered vertically. Do I need to play with the Cell frame to fix that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于每一点:
1)问题已解决此处
2)如果我禁用自动布局,一切都会正常工作
3)问题已解决此处
For each point:
1) Problem solved here
2) Everything works fine if I disable the Auto Layout
3) Problem solved here