I’m not 100% sure why you’re seeing the error you’re seeing. However, I have a big picture comment. You wrote:
I am working on my diploma where i am comparing Swift 3 with Objective-C.
Given that the goạl is to compare the two languages, why are you naming the classes the same? In Objective-C classes use a prefix (
NSfor Foundation and AppKit,
UIfor UIKit, and so on) to prevent name collisions. If you’re doing a side-by-side comparison of the two languages, it would make sense to use the ‘native’ conventions of each language, which means the Objective-C
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"