I have been learning Swift the last 1-1/2 month and now want to compare to Xojo iOS before I commit a decision. The reason I am doing this is because iOS is still new and I want to know what may be or may not be done for my needs. On the back of my mind, I think Xojo iOS may still be easier than Swift/Xcode. I have 2 questions and could not find the answer in the webinar or guide or docs to show how they may be.
- Example as in the iOS “Phone” app table cells. There is an accessory on the right of the cell in the form of the small letter “i” within a circle (stand for information). When tapped, the contact phone view will open to show the contact details. If the cell is tapped on the main body, then a call is initiated.
Question: How to display the “i” accessory? and corresponding action?
- Example as in the iOS “Message” app table cells. When cell is swipped left, the red color “delete” box appear on the right. When the “edit” on the navigator is tapped, all cells show a red “-” sign on the left.
Question: How to do this? and the corresponding action?
Thanks for any help and guidance.
The first question (displaying an information “i” in an iOSTable) can be done easily when you create the cell that contains the data. Look into setting the accessory type of the iOSTableCellData object:
The second is not going to be possible without significant declares. I think that @jean-paul devulder has a full featured UITableView implementation that would allow this otherwise you are out of luck because of the work involved in this regard with Xojo (unless you want to fake it).
Thanks for your reply.
I was at that doc page earlier today. I was thinking it could be the “Detail” AccessroyType from reading the explanation. The symbol column was blank so I wasn’t sure. I had a hard time figuring out how to use the information and implementing the code there.
Disappointed that second is not possible. Actually I had gone ahead and written the beginning part of my app in Swift and these two features were done fairly easily. This is going to be a show stopper because I have already thought through the ViewController sequence implementation.
Still, thanks for your reply.
I poke around more and realised that there is a TableDetail example that show how to implement the information detail of question 1.
For question 2, I can do how it is being done in the iOS “Photo” app where the photo is first selected and then a Trash can is displayed on the right of the toolbar on the target view. My original detail view is for editing the details content. Maybe now I make some changes to the detail view and add the trash can. But I need to be careful to prevent user from deleting when they may think they are abandoning the edit… maybe pop up an alert. Whereas in the Photo app, you can’t edit the photo so a trashcan is understood as delete that photo.