Swift: Codable
From https://hackernoon.com/everything-about-codable-in-swift-4-97d0e18a2999 As we are all aware, to support encoding and decoding of instances in iOS, a class must adopt the NSCoding protocol and implement its methods: init(coder:) β Returns an object initialized from data in a given unarchiver. encode(with:) β Encodes the receiver using a given archiver. Example: Code Snippet β 1 init(coder:) and encode(with:) must contain the code for each property that needs to be encoded or decoded. π² Well, it seems that you have to write so much of redundant code π only with the property name changes. Copy Paste..Copy Paste..!!!ππ΄ But why should I do that? πββοΈ If the property names are same as the key names and I donβt have any specific requirements, why donβt NSCoding handle everything at its own end? π€·ββοΈ Why do I have to write so much code? Noooooo..!!! πΌ OMG..!!! Another problem π€¦ββοΈ. It doesnβt even ...