Xcode ghost XIB? - xcode

I'm trying to change the user interface on Vice (c64 emulator) and I'm a newbie in macOS programming. I can't modify the existing XIB because the events do nothing. Checking better I noticed that there are several XIB, can someone explain me what does this mean?

Related

NSSearchField with Suggestions view underneath like Spotlight MacOS cocoa Swift 4.2

I want to write a MacOS Cocoa Desktop App with XCode 10 and Swift 4.2.
It should have a searchfield with a suggestions view opening as you keep typing like Google Search or Spotlight with autocompletion.
However I'm completely new to Cocoa programming.
I have already tried to add an NSSearchField and a dynamically added NSPopOver object with subclass of NSTableView which contains all the suggestions. But I am not happy with the suggestions view because of the anchor/arrow that appears with it. It seems like it breaks the UI guidelines.
Thus I have tried to implement my own custom subclass of NSView containing the suggestions. It works fine but I struggle with simple things like making it hide/disappear as soon as any other area is clicked in the app.
Does anyone know a good example as best practice for this task or have some sample code?

Where is the "Use Storyboards" button in Xcode 8.3?

In older versions, it was a "Use Storyboards" button when creating a Cocoa app that determines whether to create a storyboard file or a xib one, but now I can't find it.
Because it isn't there. It is superfluous. Just make your Cocoa project and get started. If you then want to make a xib, make one. If you want to make another storyboard, make one.
If you want to write an application that uses no storyboards at all but uses a main nib as in the old days, then make an Application xib file or a MainMenu xib file and point the target's Main Interface setting at it, and delete the default storyboard. (I just wrote an application that works that way, and it was no trouble at all. Just watch out because a modern xib has "Prefer coder" turned on by default, which may come as a surprise to an old AppKit fogie like myself.)

Does the Yosemite (OSX 10.10) feature of xcode live views work with NSView on OSX?

I'm trying to determine if the live view feature works with NSView on OSX 10.10, or is it only iOS at the moment?
It works great with UIView for iOS projects, however I haven't been able to get OSX projects to work.
Yes it does work. You just need to add the same symbols for IBDesignable (before the class interface declaration) and IBInspectable (before the property you want to edit in IB) in the right places in you view class header and be sure your nib or storyboard has the class set properly in tge inspector in IB.
You also need to note that the must be properties and they are somewhat limited in type.
Sometimes IB is still a little flaky about recognizing it right away, so you might need to build or reopen the tab with that nib or storyboard.
Also I would expect your mileage may vary with subclasses of more complex views and remember this only works for objects that are descendants of NSView at some point. No NSCell descendants.

Xcode 4.2 and new Tabbed Application Project

Can anyone help with Xcode 4.2 and the new tabbed application project? With Xcode 4.2, i create a new tabbed bar application, and it works as desired. However, it seems that instead of creating a new window and main.xib file that contains the tabviewcontroller, it sets everything in code within the appDelegate.
its easy to work with the tabbarcontroller via code and i have no problems setting up other tab items, however, i feel that my iOS development skills (they are new) are missing something as i would NOT even know if it was still possible to work with the tabviewcontroller graphically now in the way this project template has been setup.
Is there a way to work with the tabviewcontroller graphically? would i have to create a new main.xib file and link everything up to that? i'm still not strong enough in my skills to work out all the minute details but if that is the path that people suggest, i will look into it and try to figure it out.
I only want to work this out so i can fully understand whats going on now with Xcode 4.2, I have no unrelenting desire to only work with the tab bar controller graphically, but am curios as to why i cannot find it (or if i should)... just trying to get my head around how these things should be working.
You should use the Single-View Application template.
HEre you can add graphically that control

How to implement a UITabBar view in Mac OS X applications?

In my Mac application I'd like to implement a view that simulates UITabBar from iOS.
What's the preferred way to implement this? Use NSOutlineView , NSTableView, or something else?
For a native Mac app, the equivalent of a UITabBar is an NSTabView. If you want to go for the iOS look, you either have to roll your own with some NSView subclass or take a look at UMEKit.
Chameleon may also be an option, but it currently doesn't implement UITabBar, this might change in the future.
If you want to follow a trend of making your Mac app with the UIKit look-and-feel
you might want to take a look at the Chameleon Project - note the status of the project on the developer's blog. However, the project source is on github now, and people are helping out.

Resources