Мне нужно программно сделать несколько надписей и текстовых полей.Я могу туда добраться.
//create the file name label
NSTextField* newFileNameLabel = [[NSTextField alloc] initWithFrame:NSMakeRect(objXPos, objYPos, 300.0, 20.0)];
//set properties
[newFileNameLabel setBordered: NO];
[newFileNameLabel setTextColor: [NSColor whiteColor]];
[newFileNameLabel setDrawsBackground:NO];
[newFileNameLabel setEditable:NO];
[newFileNameLabel setStringValue: @"File Name:"];
[vSheetView addSubview:newFileNameLabel];
Но я не смог найти в документах ничего, что позволило бы мне установить свойство переноса.В IB свойство - это макет с параметрами прокрутки, обтекания и усечения.NSTextField не имеет метода для установки этого, и если я иду вверх по цепочке наследования, ни NSControl.NSView имеет метод setNeedsLayout, но он, похоже, не связан:
You only ever need to invoke this method if your view implements custom layout
not expressible in the constraint-based layout system by overriding the layout method.
The system invokes this method automatically for all views using constraints for layout.
NSTextFieldCell также не имеет никаких методов.Любая помощь будет оценена.