Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cocoa 使自定义NSSegmentedCell看起来被抑制_Cocoa_Interface Builder - Fatal编程技术网

Cocoa 使自定义NSSegmentedCell看起来被抑制

Cocoa 使自定义NSSegmentedCell看起来被抑制,cocoa,interface-builder,Cocoa,Interface Builder,我对NSSegmentedCell进行了子类化,并覆盖了-(void)drawSegment:(NSInteger)SegmentInframe:(NSRect)segmentFrame withView:(NSView*)controlView,并且能够绘制选定和未选定单元格的单元格内容 然而,据Interface Builder称,Lion中的“胶囊样式”已被弃用,我将其改为“纹理圆形”。模式为“选择任意”。 现在,无论是在IB还是代码中,我似乎都无法使选定的段看起来被抑制。 我在这里拍摄背

我对
NSSegmentedCell
进行了子类化,并覆盖了
-(void)drawSegment:(NSInteger)SegmentInframe:(NSRect)segmentFrame withView:(NSView*)controlView
,并且能够绘制选定和未选定单元格的单元格内容

然而,据Interface Builder称,Lion中的“胶囊样式”已被弃用,我将其改为“纹理圆形”。模式为“选择任意”。 现在,无论是在IB还是代码中,我似乎都无法使选定的段看起来被抑制。 我在这里拍摄背景,自定义图标本身可以很好地切换

(我试图模仿Xcode 4中“视图”分段控件的精确外观)