DBSCustomView *view = [[DBSCustomView alloc] initWithFrame:NSMakeRect(100, 100, 100, 100)]; [self.window.contentView addSubview:view]; // 特别地,这里设置坐标是用NSMakeRect,如果用成了CGRectMacke(0,0,10,10);编译不会出错,但运行是错误的,什么都看不到. NSWindow,NSView都是继承自.NSResponder.应该说他们…