Saturday, March 2, 2024
HomeiOS Developmentios - Greatest practise to implement the id for view modal of...

ios – Greatest practise to implement the id for view modal of a listing sort view


I’m implementing a stacks of custom-made UIView. and these stacks of view will sit in a shared library
we wish to give an id parameter to the view modal of every of those custom-made views. so when person faucet on the view. a delegate technique is triggered and certainly one of parameters that we move by the tactic is the “id”. so the shopper is aware of which view is tapped and react accordingly.
At present we’re utilizing an Int sort for the id. However the workforce desires to vary it, make it extra skilled. so there’s a remark within the code saying we should always use “enum case of sort ‘Any’ as a substitute of an Int sort” I am undecided what does it imply. so I used to be considering could also be they wish to use ‘Any’ as the kind of id? so when shopper customise the id to make use of both Enum or Int?
does anybody may help me to determine what does the remark imply? or present a greater implementation for this id?
Thanks prematurely.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments