RakuyoKit / JSONPreview

🎨 A view that previews JSON in highlighted form, it also provides the ability to format and collapse nodes.
MIT License
65 stars 13 forks source link

UITableViewCell can't calculate a dynamic size for JSONPreview subview #8

Closed decim92 closed 6 months ago

decim92 commented 1 year ago

Is there a way to calculate the size of the JSONPreview so that we can have dynamic sizes inside UITableViewCells?

Also, is there a way to disable the line number column?

rakuyoMo commented 9 months ago

Is there a way to calculate the size of the JSONPreview so that we can have dynamic sizes inside UITableViewCells?

Perhaps you could get the full height in the preview(_: style: completion:) callback via the jsonTextView.contentSize property. Then refresh your UITableView view to use the latest height value.

Also, is there a way to disable the line number column?

Unfortunately, there is no way to do this at the moment. If you need it, I think I can add it subsequently and the feature should be easy to implement.

rakuyoMo commented 6 months ago

Version 2.1.0 will provide the function of hiding line numbers. I will close this issue after it is released

rakuyoMo commented 6 months ago

2.1.0 has been officially released, providing the function of hiding row numbers and providing a reference demo for use in UITableView.