Crosslight Alternating Table Rows

19 replies. Last post: October 5, 2015 9:39 AM by Arief Handany
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hello Crosslight Support,

I would like to do a chat application on iOS. The chat messages should be displayed as rows within a list.

Incoming messages should be displayed as a text in a bubble which is left aligned and outgoing messages should be displayed as text in a bubble which is right aligned.

I tried to use a UITableViewController and set the CellStyle to Custom (override). Then I created two different UITableViewCell classes in code. Then I extended these new classes with the ISupportDynamicHeight interface to support dynamic row height.

When initializing the view, I registered the new UITableViewCells (this.TableView.RegisterClassForCellReuse). Finllay I added an override of the GetCell method. There I would like to decide which cell layout to use.

In the end I was not successfull with this. The GetCell override is never called and so I could not manage to set the cell layout myself. Doing this totally from scratch (writing my own table source and so on) works, but it would be nice to write less code and take the benefits Crosslight offers.

Do you have any advice?

Generally, I must say doing things like in the Crosslight samples works fine. But trying to customize things seems very hard to me. It would be great if Crosslight could be better customizable.

Thanks,

Thomas

All times are GMT -5. The time now is 12:26 PM.
Previous Next