Today I’m gonna take some time to write down my progress for Duke-CSA iOS app development.
This new feature is temporarily named “Q&A”. Duke Chinese students, especially class of 2020 freshmen, can post their questions about Duke student lives, classes, and other stuff on here. Upperclassmen are then able to answer them on the app. Both questions and answers can be voted on, just like Stack Overflow. Users can also comment on answers.
Most of the code for data transfer between the online database and the app was copied from Jay’s earlier work on the app. I also refactored a little bit to make the code cleaner.
Below are some screenshots of the app for now.
Main View: all questions ordered
Detail of a question with all its answers
Detail of an answer with all its comments
compose a new question
The voting buttons are functional but cannot be highlighted for now. I already know the reason is with updating TableViewCell – the button will only update its image when the TableViewCell is reloaded. I will probably be able to fix this tomorrow.
The reply function is used in three places of the app – Event, Rendezvous, and QA, so I made a new file ReplyController and extended this classes in these individual controllers, which made the code much shorter and easier to debug. However, the code structure for Event is a little different so I’ll work on that later.
The other function that Jay and I would like to implement is showing the class database collected by CSA. A search feature would be awesome, too.