0

i want to show badge count on tableview cell rightside how to code for that if array have value then badge should count if delete row then badge should hide from cell how to do this i try lot but it not working proper.

in my case i am facing problem is mu badge counting what in value but when i delet row that time badge not hidding.if stop application and run again then badge is not dispaly bec not value in array but it not right i want run time only badge should hide from cell if no data in array please see this link where i ask same problem

https://stackoverflow.com/questions/10547941/how-to-create-badge-icon-on-tableview-cell-in-iphone

Community
  • 1
  • 1
Rocky
  • 1,427
  • 1
  • 28
  • 65
  • 1
    Why you want to create a badge when a label is also look like a badge just set its corner radius with text value and display it over the accessory view of the uitableview. – Anil Kothari May 22 '12 at 09:58
  • Anil kothari i done lable also but my problem i have 3cell if lable is showing on first cell if click on second cell then i click again first cell and delete row the row is delet but lable is not hidding i still showing me please help me on this – Rocky May 22 '12 at 10:04
  • I think the problem is with the cell identifier...plz show some code in your question. It will surely help everyone. – Anil Kothari May 23 '12 at 04:05
  • there is a handy of library for this https://github.com/tmdvs/TDBadgedCell – titan Dec 08 '17 at 13:42

1 Answers1

1

In this case you will be required to create a custom table cell with a subview and a label. You can then assign the values accordingly using the code.

Please check the solutions provided here

Community
  • 1
  • 1
Akhilesh Sharma
  • 1,580
  • 1
  • 17
  • 29