I am trying to figure out the best way to implement the blue dot like the Mail app for unread cells. I have the blue dot but I am just trying to figure out the logic behind it. The table is populated by an xml file. Right now I have it set as so, when the parsing method is called, it sets a boolean to NO within the data object. Then when the tableview populates itself, if the boolean is NO, the image is displayed, and then during didSelectRowAtIndex, I then set the boolean to YES and the image disappears. The problem lies here, every time I refresh the table, the xml is re-parsed and the instance variable is reset to NO and the user is informed that the cell hasn't been clicked. How do I fix that? What's the best logic around it?
iOS unread cell icon
215 views Asked by Jon Erickson At
2
There are 2 answers
0
TotoroTotoro
On
Michael Dautermann is making a good point in his answer. For your situation, where the feed is often refreshed, you can keep a set where you keep track of the read elements by storing their ID's there (whatever they are). Then, in your tableView:cellForRowAtIndexPath: method, you just check if the current element's id exists in the set, and don't show the "new" image if it does.
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in XML-PARSING
- Gradle SAXParseException cvc-complex-type.2.4.a
- XPath - how to exclude text from child node
- Can not extract resource from com.android.aaptcompiler.ParsedResource@124d2e11
- Cannot Access Podcast Category from RSS Feed Using FeedKit due to Missing Member
- How to get all child and sibling data from an XML file and output to a table
- Uncaught Error: Call to a member function registerXPathNamespace() on boolean in
- Dynamically parsing XML in Databricks
- XML namespaces default vs namespace prefix
- XML Parsing in Snowflake with sub nodes
- Parsing an XML with missing content
- Inserting XML tags at specific part of file without disrupting format
- Extracting value of xml in PostgreSQL
- How would a real developer do this?
- XML (TEI document) parsing in R: how can I extract only the head?
- Serializing XML into POCO and then into JSON string
Related Questions in TABLEVIEW
- ColletionView inside table view not displaying data correctly
- Add item to a TableView that the user sorted by a certain column while respecting the sort
- NPE for TableCell's skin
- How can i make a custom TableColumn display cell observable?
- Multiple collection views in table view layout issue
- JavaFx how to use default and custom column-header css style in tableview?
- How to make cells in a MaterialFX MFXTableView editable?
- Stop tableView scrolling under status bar (Swift 5, Xcode 15)
- Cannot open my QML MessageDialog using my C++ signal
- How to force ttkbootstrap TableView column title to always stay right justified
- MessageDialog is not showing when I validate a condition in a qml TableView
- Unable to .bind("<<TreeviewSelect>>".. to work with TableView to get selected row data
- Edit cells and lock them in QML TableView
- It is valid Accessing BehaviorRelay value directly for UITableView in RxSwift?
- How to set the row height of data rows of ttkbootstrap.tableview.Tableview (bootstrap.TableView NOT tk.TreeView)?
Related Questions in READ-UNREAD
- How to implement efficiently unread-read message count in Java based application
- Laravel count, groupBy and orderBy not working properly
- Xamarin forms: How can I show the unread message count in chat?
- Send emails using VBScript, but leave the Sent Item as Unread?
- read unread mail and mark it as unseen using java
- Views For Unread Gem For Public activity
- To manage more than 100 hits with one step
- Mark as unread flag is not working in IMAP + ruby
- Office 365 UnRead Email PowerShell admin report
- Gmail API : unable to request unread message
- Displaying iOS badge number / Handling unread messages (xCode - OBJECTIVE-C)
- Android - Keep global track of unseen notifications, best practices
- Javamail search unread mails with a keyword (multiple searchterms)
- Is it possible to use the gem Unread with the gem Public Activity?
- How to make status "read" to "unread" by using unread gem?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Instead of re-parsing the XML each time you refresh the table, parse it once and then save the data (or an array of dictionaries, or whatever) it parsed out into as a variable within the object.
That way, the state of the "read" blue dot or "unread" will persist between table reloads.