iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
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
@ThomasSo based from what i understand is this what you want to achieve:
What i means is similar to whats app or popular messaging? As far as i know the method that i will use in this scenario is using One Table but have different field type and then uses Custom BindingProperties that implemented like in the MyInventory samples (Message In using Left UI label, message out using Right UI Label). If this what you want to achieve i will try to create similar things if it helpsBest Regards,
Arief
Hello Arief,
the layout you showed above is what I want to achieve, but I think not the way you propose to create it.
What I want to do is having two different cell views defined in code only. And depending on the type of message (incoming or outgoing) using the right cell view to display the row within the table. Using one cell view and having a label aligned to the left and another one aligned to the right and filling only one of them is not what I want to realize.
Hi ThomasFor this moment, showing alternate cell view is not yet supported (our get cell view only called once at the start), however that feature already inside our roadmap (planned after v4 (in a few days v4 will be released)). Also for your information we planned to support the chat view by implementing alternate item layout id and also template selector for complex need.Also you are right about my method, it's rather not elegant... and also we can't easily adjust the images/readed label position too.Best Regards,Arief
are there any updates about the alternating table rows?
Hi Thomas,I will ask our engineer how it goes for alternate cell view.
Hi ThomasHere is what our engineer said, It will be planned for our next roadmap, but you can implement yourself by basically using custom cell template, and configure the style in AwakeFromNib based on the index. But if you are prefers to wait, then it'll be in our next roadmap. Possibly on September one.I will try to make a simple sample for you using our engineer method, but you can also try it yourself.Best Regards,Arief
Thank you for the information. A sample would be nice.
Best Regards,
any news about the sample you would provide?
Hi Thomas,Sorry im very late to inform you, yes we did test it and actually i'm explain him wrong, looks like if this is the case i can't make a workaround but i already inform to our developer under code CROS-887Hope that'll helps
when will CROS-887 be fixed.
At the moment I have the impression, that the Crosslight support is very slow. It takes quite same time the get an answer to a problem and a fix takes even more time or even worse, the fix never happens. Last year everything went fast. Why did this change?
Hi Thomas,We are really sorry for your inconvenience, and thank for your feedback, i will inform it to our management.Alternate table rows was planned for next version of crosslight, but i will try to tell our developer to make a nightly build if it is possible.
a nightly build would be great. Including this feature into Crosslight 4 Update1 would be fine.
I hope you guys can manage one or the other solution.
Thanks,Thomas
Hi Thomas,Just an update from our developer, most likely this will be released in september as Update Best Regards, Arief
can you confirm that this feature is in the active sprint of Crosslight 4 Update 1 which is estimated for end of September 2015?
Hi Thomas,Yes CROS-887 was on this month sprint (July-September 2015), including with CROS-893, i will poke our programmer again about those issues!Hope this will helps!Best Regards,Arief
Hi Thomasjust a head up the Crosslight update 1 is already here and already include celltemplateselector!Feel free to check it out! :)Best Regards,Arief
Thank you for the update.
It looks good on iOS. I will test it on Android soon.
One question: Is it possible to define the cell template only by code? At the moment, the cell is defined as a layout (nib/axml). Is it also possible to have cells with dynamic/flexible height?
Hi Thomas,For first questions, looks like it can be done in template selector if what you meant using non-custom cells?
For seconds questions, as far as i know android is already dynamic, for iOS we already have the code, you can check it in our Message Input Sample.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname