iOS Question Can't set TableView visibility programmatically

Sandman

Well-Known Member
Licensed User
I have a page with a Label and a TableView. Setting them both to visible = false works as expected for the Label, but not the TableView. Do I need to do something extra to actually change the TableView visibility?

I've also tried setting them both to visible = false in the Designer, and then setting visible = true in code. Label worked as expected, TableView didn't change.

There is a very small demo project attached.
 

Attachments

  • tableViewVIsibility.zip
    2.6 KB · Views: 87

aminoacid

Active Member
Licensed User
I had the same problem.

this solved it:

Tableview1.baseview.visible=false


If you load tableview using designer and iUI8 library you need baseview

If you load it in code and use the iTableview library then you dont need baseview

Hope this helps
 
Upvote 0

Sandman

Well-Known Member
Licensed User
Tableview1.baseview.visible=false

Hope this helps

Oh, that solved the problem in full - thank you very much!


Moved to the questions forum

Fair enough. But I suggest that something could be improved with the documentation. As it is right now, this property has the explanation "Gets or sets whether the view is visible", which clearly is wrong, or at least misleading. I fought this visibility problem for two hours last night, trying things in the IDE and searching the forums forwards and backwards. An explanation like "Gets or sets whether the view is visible. If view was added using the Designer, it must be accessed via the baseview instead." would have done wonders.
 
Upvote 0
Top