I am implementing a stacks of customized UIView. and these stacks of view will sit in a shared librarywe want to give an id parameter to the view modal of each of these customized views. so when user tap on the view. a delegate method is triggered and one of parameters that we pass through the method is the "id". so the client knows which view is tapped and react accordingly.Currently we are using an Int type for the id. But the team wants to change it, make it more professional. so there is a comment in the code saying we should use "enum case of type 'Any' instead of an Int type" I'm not sure what does it mean. so I was thinking may be they want to use 'Any' as the type of id? so when client customize the id to use either Enum or Int?does anyone can help me to figure out what does the comment mean? or provide a better implementation for this id?Thanks in advance.
↧