Last active
February 7, 2022 20:37
-
-
Save Edudjr/29595062bc2dd20256ed5569e0eceba9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Prototype { | |
associatedtype CloneType | |
func clone() -> CloneType | |
} | |
extension UILabel: Prototype { | |
... | |
// Don't forget to specialise the return type! | |
func clone() -> UILabel { | |
UILabel(self) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment