I am working on a window that is a subclass of the INAppStoreWindow
. I am attempting to add an NSTextField to the window, which I have done, but there are some "fine tuning" issues. The INAppStoreWindow is a window that lets you get its "titlebarview" and add stuff to it. I have added a textfield to it like this:
[_window setTitleBarHeight:60.0]; //1
NSView *titleBarView = self.window.titleBarView; //2
newTitleView.bounds.size.width = titleBarView.bounds.size.width; //3
[titleBarView addSubview:newTitleView]; //4
The newTitleView is an IBOutlet in Interface Builder (a view with the textfield in it), and the _window is just my standard INAppStoreWindow. The view has the textfield perfectly aligned in it and displays fine in the window's titlebar. The issue is resizing. The textfield won't resize when the window resizes. I though that to fix this I should make the newTitleView change in width with the titleBarView, so I added line 3 above. I get an error though when I try to run it, stating: "The Expression is not assignable." So how can I make it "Assignable". And if I do succeed, will the textfield resize?