Giter Club home page Giter Club logo

abfrealmtableviewcontroller's People

Contributors

0xced avatar bigfish24 avatar siuying avatar skydivedan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

abfrealmtableviewcontroller's Issues

I'd like to call "indexPathForObject", so I can pre-select an item in the table

RealmTableViewController has a property named "fetchedResultsController", which is a private instance of RBQFetchedResultsController. Normally this isn't problem... unless I want to highlight a cell, programmatically, based on an object which I know to be in the result-set.

Essentially, I want to say self.tableView.selectRowAtIndexPath(self.fetchedResultsController.indexPathForObject(objectInResults))

where objectInResults is an object that I know to be a valid object that ends up getting displayed in this table.

Unfortunately, fetchedResultsController is private, so I can't do this. I know that selectRowAtIndexPath only redraws the cell, and doesn't trigger anything else. But that's all I really need. I just want to force the selection, based on a single object.

RealmTableViewController not actually updating?

Here's my setup:

I have a subclass of RealmTableViewController. I'm just trying to display info from a specific list of entities, lets call them "SpecialObjects"

So, I'm setting the entityName, basePredicate and sortDescriptors.

In my viewDidLoad routine, I'm making a web-service call to get all my "SpecialObjects". When my service successfully returns, I'm doing this:

                try realm.write({ () -> Void in
                        realm.add(specialObjects, update: true)
                    })

My expectation is that my table-view will then update with the results from this call, since new objects are being added to my Realm database. But absolutely nothing happens.

What's weird, is that if I go "back" (which dismisses this view), and then re-enter the view, then the table gets updated as I'd expect. But the only reason that this works is because Realm already had my objects init, from the prior call. At least it's proving that the objects are actually in the database.

But the table isn't updated when new objects get added in after the view is up. No notifications are firing, even though I'm calling "realm.write". The big point of having this fetched-results-contoller is the ability to update the UI when the data changes. Why this isn't happening, I can't say. Any help in this would be greatly appreciated.

RealmTableViewController is ignoring sectionNameKeyPath

In updateFetchedResultsController, this line is bad:

self.fetchedResultsController.updateFetchRequest(fetchRequest, sectionNameKeyPath: nil, andPeformFetch: true)

It's sending "nil" for sectionNameKeyPath, when we have a "sectionNameKeyPath" property. I created a PR for this here: #3

Deadlock with multiple instances?

I'm new to Realm, but setup was relatively easy and dropping in RealmTableViewController was very straightforward. But when I add multiple instances, I run in to an issue. I'm embedding three tableview controllers inside a UIPageViewController, so the user can swipe between a couple of lists. As soon as the second list comes on screen (i.e., is instantiated and starts updating), the app locks up. It appears that the multiple instances of RBQFetchedResultsController get deadlocked down in the innards somewhere. I've inquired about the deadlock in an open issue on that project, but I thought I'd mention it here to see if there are any pointers.

I see there's an open issue to refactor out RBQFRC (#8). Is that related?

Decouple the UITableViewController

It`s possible to replace the UITableViewController for TableView? It will make this library more flexible to use with custom views.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.