Skip to content

Instantly share code, notes, and snippets.

import Foundation
import ObjectiveC.runtime
@objc class Dummy: NSObject {
@objc dynamic func methodA() { print("methodA") }
@objc dynamic func methodB() { print("methodB") }
@objc func methodC() { print("methodC") }
@objc func methodD() { print("methodD") }
}
@manicaesar
manicaesar / SwiftPropertyOverloading.swift
Created September 24, 2021 19:10
Swift property overloading
struct StructWithTwoObjects {
let object: String
/*
var object: A { // Stupid, but causes compilation error - OK!
return self
}
*/
}
// ---------------------