當我將寬度和高度值設置爲NSTextField floatValue時,我的customView消失只能與數字一起使用任何想法爲什麼?無法將值設置爲浮點值
- (void)awakeFromNib {
NSRect f = self.frame;
f.size.width = [EnterTextWidth floatValue];
f.size.height = [EnterTextHeight floatValue];
self.frame = f;
這一個正常工作:
- (void)awakeFromNib {
NSRect f = self.frame;
f.size.width = 640;
f.size.height = 480;
self.frame = f;
是什麼'EnterTextWidth'包含哪些內容? – trojanfoe
這是NSTextField它包含我輸入的數字 – kosas
你確定**他們是數字嗎?請單步使用'lldb'。 – trojanfoe