Archive for the 'Development' Category

Autoresizing text view in table cells

Thursday, August 11th, 2016

Continuing from the previous version, I upgraded to Swift 3 and Xcode 8 (beta 4). Most of the glitches are gone, but every now and then one shows up. So I’m not entirely sold on the whole thing yet. I’m still having doubts if it wouldn’t be simpler to just have the user enter text […]

Autoresizing table cells

Monday, July 25th, 2016

Extending the autoresizing of UITextView to table cells, this is how that looks. First, let’s create a trivial model class and a storage class for that model: class Item: NSObject {   var text: String        init(text: String) {     self.text = text     super.init()   }     } class ItemStore {   var allItems […]

Autoresizing UITextView

Sunday, July 24th, 2016

A problem I needed to solve was: while editing in a text view, I want the view to grow and shrink depending on the text entered. I also want this to work in conjunction with auto-layout. This is something I’ve been fighting for some time, but now I sat down and spent enough time (and […]

Medical IT crap, the why

Monday, July 11th, 2016

(Continuing from my previous post.) I think the major problem is that buyers specify domain functionality, but not the huge list of “non-functional requirements”. So anyone fulfilling the functional requirements can sell their piece of crap as lowest bidder. Looking at a modern application, non-functional requirements are stuff like resilience, redundancy, load management, the whole […]


Saturday, March 12th, 2016

Developing the Metaverse: Kickstarter project. Yes, I’m a little bit a part of it, and I’ve signed up, too. It would be pretty awesome if it could be done.

Another creator pattern for clusters

Thursday, September 15th, 2011

This is about Cocoa, and in particular about class clusters. The problem I wanted to solve was having a class cluster with easily extendable hierarchy without too much interdependency. In my case, I want to create a number of different UITableViewCell descendants, depending on the particular data element the cell should handle. If the data […]

Don’t do

Wednesday, November 17th, 2010

I just found another weirdness in Apple’s Objective C. If you have the same name for several components of an object path, the runtime starts stuttering and behaving very badly. Intermittently, you can’t scroll, or only extremely slowly, everything turns into molasses. No errors, mind, just mindbogglingly slow. This stuttering and slowness seems to affect […]

Is it nil or isn’t it?

Monday, October 4th, 2010

A bit of Objective-C weirdness I don’t quite get. The weirdness occurs if “view” in the code below is nil, that is if [idr getAsView:newFrame] returns nil. You’d expect the verticalOffset not to be incremented, but it is. Even though view is nil, view.frame.size.height still evaluates to “21” (in this case) and verticalOffset gets incremented. […]

Method forwarding in Objective-C

Friday, August 13th, 2010

I scraped together the following from a number of sources and got it to work fine and without compiler warnings. Interesting links are, among others: But, I get ahead of myself. The idea here is to have one object forward method invocations to another. Typically, you have a class responding to method A, […]

Solution: open the market

Monday, June 14th, 2010

Now we’ve arrived at the last of the solutions in my list, namely “Opening the market for smaller entrepreneurs”. There are a number of reasons we have to do this, and I’ve touched on most of them before in other contexts. The advantages of having a large all-in-one vendor to deliver a single system doing […]