Custom Cell For UITableViewCell
I'm developing an iOS
application and i need to make a custom cell
for my side menu, i have seen so many examples and i found out those two approaches :
UITableViewCell
and put the outlets
in the .h file then apply the class on the cell and connect those outlets to the labels and/or images from your cell in the storyboard. tag
to the labels/images or whatever you have in the cell in your storyboard. My Question : I'm wondering which way is more accurate and professional and used by most iOS developers ?
Definitely the first one. It's clear and maintainable in the future. The purpose of the tag is not to store arbitrary values. See my answer regarding this .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.