Closed matthewsinclair closed 9 years ago
Hi Matt,
I'm pretty unavailable this weekend, but hopefully will get some time to devote to it next week. Keep us updated as you bang your head against this. :-)
No probs. I've parked it for now. I'll get back to it later in the week. Thanks.
@jamonholmgren I wonder if this might be an issue with MotionKit? I'm using MK to layout an outer view, which has the table view controller as an inner view. Could that affect the way that the search bar is displayed? Might @colinta have some tips?
Hmm, wow that's interesting... well MotionKit isn't going to do anything odd to your views, but it is possible that the hierarchy you've got there is "unexpected" by Apple.
If you can whip up a sample project I'll try and take a look - it might be Monday or Tuesday before I have a chance, though.
@colinta Ok, I'll see what I can do. It might be later this week before I can get back to this.
Closing. searchable
is close to being fully functional in the new redpotion DataTableScreen
:+1: Can't wait!
I've finally gotten around to attempt to use some of the PM goodness with CoreData, CDQ and
NSFetchResultsControllers
, which I have used extensively throughout my app.To warm up to the main game, I'm trying to get the
PM::Table::Searchable
module to work, but I'm having some very odd screen refresh problems. No matter what I do, when I tap into the search box, it "moves" about 44 pixels up the page, and ends up going underneath the nav bar.The search bar renders perfectly on presentation, it's just when I tap in it to type something in that it flies up the page.
I have looked everywhere for what might be causing, and there's a few StackOverflow posts that suggest overriding
setVisible
, but that is not working in my case.Here's my hacked version of
PM::Table::Searchable
:What I want to do is get it all working first, then I will try to integrate it back into PM when I migrate to PM2.0. For the moment, I'm just calling
make_searchable
when the view appears.This class
TCSearchDisplayController
is just an empty subclassUISearchDisplayController
that I was experimenting with. It is empty at the moment.For the record, what I am trying to head towards is to use a NSCompoundPredicate to perform the search. I'm already using a predicate to filter the CDQ entities, and what I want to do is to add a
search_predicate
when the user types something in the search box. From what I know, that should work. The problem is, at the moment, I can't get the search box to display properly so that I can type in it.Curiously, hacking the search box's frame works momentarily, but then it just flies back up the page again before it settles down.
Any ideas would be most helpful.
PS: Please ignore the crappy state that this is in, I'm just trying to get it working and then I will clean it up for a possible PR.