>> then another function … got flagged with the same warning
There's no particular reason why there can't be multiple declarations that need fixing, and they can be scattered throughout your code.
I don't have enough information to be sure, but I'm guessing that "viewNeedsUi" is a method you're using to observe notifications, and you've registered the observation using the selector form (addObserver(_:selector:name:object:)), and this method is declared in a class that ultimately inherits from NSObject.
In Swift 3.1, the fact that the class was NSObject-derived meant that unannoted methods typically were assumed to be @objc. (This was not the assumption if the methods were marked private, but yours isn't private.) In that case, Swift actually compiled two methods, one with the Swift mangled name that could be called statically from other Swift code, for performance reasons, and another with the expected Obj-C name that is called dynamically through the Obj-C runtime. The second one just calls the first, but provides the Obj-C compatibility.
In Swift 4, without the @objc annotation, only the first method exists. That's why the error message told you to "add explicit '@objc' to the declaration to emit the Objective-C entrypoint in Swift 4". The Obj-C entrypoint is the second method, and you need it in order to be able to create a selector from its name.
>> in order to get IB to recognise classes, I've been forced to use "@objc" in the class declarations
Actually, that's the wrong solution to that problem. Look at the Identity inspector for the item you're trying to set to a custom class. Immediately under the class name field, there's a module name field, and below that there's an "Inherit From Target" checkbox. If your class is written in Swift, just make sure the checkbox is checked, and IB will use the correct name. For classes written in Obj-C, make sure the checkbox is unchecked. That means you don't have to provide an explicit Obj-C-compatible class name in your source code.
AFAICT, this @objc(name) issue is unrelated to the original issue.