NSImageCell, 일부 NSTextFieldCells 및 NSPopUpButtonCell을 사용하여 NSCell의 사용자 정의 하위 클래스를 생성했습니다. 위 팝업 셀을 클릭하면 내 인앱을 실행하는 동안 것을 제외하고 잘 작동하는 것 같다클릭했을 때 사용자 정의 셀 안의 NSPopUpButtonCell이 팝업되지 않습니다.
myPopUpCell = [[NSPopUpButtonCell alloc] init];
[myPopUpCell setBordered:NO];
[myPopUpCell setAutoenablesItems:NO];
[myPopUpCell addItemsWithTitles:[NSArray arrayWithObjects:@"Item1", @"Item2", @"Item3"]];
그리고 drawInteriorWithFrame:inView:
모두에 그리기 :
내가 사용하는 팝업 셀을 초기화하고 있습니다 셀이 팝업되지 않습니다. 무엇이 잘못 되었을지에 대한 제안?
아마도 잘라 내기 및 붙여 넣기 오류 일 수도 있지만 arrayWithObjects 목록을 nil로 종료해야합니다. 예 : [myPopUpCell addItemsWithTitles : [NSArray arrayWithObjects : @ "Item1", @ "Item2", @ "Item3", nil]]; – Abizern