Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Access UITableViewAutomaticDimension
-
Hello! I'm making a UITableView by scratch, and am trying to use the constant "UITableViewAutomaticDimension" for the row heights. But I am having trouble accessing it. I have tried using the C function "CFBundleGetDataPointerForName" and the following,
lib = ctypes.CDLL(None) print(lib.UITableViewAutomaticDimension) pointer = ctypes.cast(lib.UITableViewAutomaticDimension, ctypes.c_void_p) print(objc_util.ObjCInstance(pointer))
Any help would be great!
-
@arandomperson try something like
from objc_util import * x = c.UITableViewAutomaticDimension
-
@arandomperson seems to be a
CGFLOAT
with value -1 -
@cvp I Swear I tried that before lol. Thank you so much!
-
@arandomperson, just curious, as rolling your own TableView could be a lot of effort: what is additional features you are looking for, compared to the version that comes with Pythonista?
-
-
@cvp, thanks. @arandomperson, be sure to check @cvp’s code behind the link, a lot of coding already done there. Also a good example that the
content_view
can support a lot of custom stuff without going to objc. -
@mikael well, ever since the update, UITableViews are always in the native light theme and I want a native dark theme one. Other than that though... maybe I'm just crazy.