Sliding Keyboards

Today I’m going to present a workaround for a slightly obscure but still annoying problem on the iPhone. Let me begin by quoting myself:

If you create a view controller, put a UITextView inside a table cell in that controller’s view, make that UITextView the first responder, and then push the new controller onto a Navigation stack, the keyboard does not scroll in from the right; it pops into view immediately. That’s ugly …

It turns out that, with a little hack, you can make the keyboard slide in properly.

Continue reading

Posted in iPhone | Comments Off

Full Text Search (Part 7)

A word about the BEGINSWITH operator of NSPredicate: “Caution”! I was using this operator to drive iterative prompting while developing my Full-Text Search (FTS) demo, and found its performance unsatisfactory.

Continue reading

Posted in iPhone | Comments Off

Six Word Stories: Telekinesis

“Just remember: There is no spork.”

Editorial Note: I’m moving Book Club to Wednesdays. Sorry for the late notice.

Posted in Six Word Stories | Comments Off

Full Text Search (Part 6)

Heretofore, I’ve been working with an “OR” implementation of Full-Text Search (FTS). This sort of implementation takes one or more keywords, and returns all the objects which match one or more of them. I’d been avoiding an “AND” implementation (which only returns objects which contain all the specified keywords) because I suspected that the Core Data/SQLite combination would make a hash of the necessary query plans, but this turns out not to be the case. So today: “AND” style FTS!

Continue reading

Posted in iPhone | Comments Off

Full Text Search (Part 5)

Today I’m going to post minor revisions to some earlier Full-Text Search (FTS) code. These changes address index construction.

Continue reading

Posted in iPhone | Comments Off

Full Text Search (Part 4)

I want to return to yesterday’s topic, and look at further optimizing the Full-Text Search (FTS) query. Although we’ve addressed the gross inefficiencies caused by suboptimal query plans, there is still some fat to trim; it turns out that the sorting of results can be a significant factor in query performance.

Continue reading

Posted in iPhone | Comments Off

Full Text Search (Part 3)

Yesterday, I covered some of the more interesting parts of a prototype implementation of Full-Text Search (FTS) on the iPhone; today I want to start to address one of the performance problems in that prototype. To begin with, it takes a ridiculously long time to execute a search on the index. This turns out to have a simple remedy.

Continue reading

Posted in iPhone | Comments Off

Full Text Search (Part 2)

Today we’re back to implementing Full-Text Search (FTS) on the iPhone. On Monday I presented an FTS prototype written in Python, and since then I’ve been working on porting it to Objective-C, targeting Cocoa and iPhone OS. I’ve implemented a working prototype on that platform – albeit one that runs very slowly on the device – and today I’d like to present some of the more interesting parts of this work-in-progress.

Continue reading

Posted in iPhone | Comments Off

Belated

Due to my immersion in full-text search, Book Club is going to be delayed until Wednesday. My apologies.

In the meantime, why not enjoy a Lore Sjöberg piece: Con Men Lose Their Cool in the E-Mail Era.

Posted in Jack Handy | Comments Off

Full Text Search (Part 1)

I want to add full text search (FTS) to my iKnowPeople app. (Have I mentioned that you can buy it on iTunes?). FTS is a pretty old idea, and most DBs support it (albeit usually through some sort of add-on). Sqlite (the DB underlying Core Data on the iPhone) supports it, but, unfortunately, Core Data doesn’t let you access this feature.

This means I’m going to have to roll my own implementation. Which is what I’m going to be talking about for most of this week. (We’re still doing con games tomorrow, though.) Today I’m going to outline the basic approach and write a prototype in Python. Let’s get started.

Continue reading

Posted in iPhone, Python | Comments Off