Resizable UITableViewCell with variable image and content height

Displaying a variable amount of text in a tableViewCell is easy. It’s one of those things you learn pretty early. Set the .rowHeight to .automaticDimension, set a top and bottom constraint, set the number of lines to 0, and you’re done.

Trying to incorporate variable text and variable image height? Not quite so easy.

If you’re like me, you’ll fight with Auto Layout for a while, maybe refer to Stack or Medium for some pointers. You might even arrive at something that appears to get things working correctly. Then you start scrolling, and your UI goes to hell.

Sound familiar? Read on. (more…)

Swift and the FileMaker Data API

I wrote a service class last week for Swift, to communicate with the FileMaker Data API. The class includes functions for:

  • Token management
  • Find request
  • Get record
  • Get records, with limits and offsets
  • Create record
  • Duplicate record (v18 Data API)
  • Edit record
  • Delete record
  • Set global fields (v18 Data API)
  • Error handling

There are a couple of walkthroughs and other FileMaker-related goodies in the repo as well.

Go see. 🚀

Send and receive FileMaker data with Twilio

If you’re using SMS with a FileMaker solution, you’re probably doing more sending than receiving. Maybe you’re using a service that converts email to SMS. Or maybe you signed up with an SMS provider like Twilio, and are sending texts from your database with httpspost. That’s fine, but what about sending an SMS /to/ a FileMaker solution? I’m not talking about just saving inbound messages as records. I mean doing a find request based on the sender’s cell number and message content, and responding with record data.

Before we dive into that, this is /not/ a post about how to set up a Twilio account. I’m assuming you’ve done that, and defined your Request URL, and copied the Twilio framework to your webserver. This post is about using the FileMaker PHP API to respond to inbound messages. Ok. Let’s go. (more…)

Simple Last.fm

I’ve never really been happy with any of the ‘now playing’-style plugins for Last.fm. So this weekend, I threw something together myself; something easier than a plugin. Now, I’ll show you how to get a simple, auto-refresh album cover in the sidebar, just like the one on this site. All you need is a small .js file (tiny!) and a standard WordPress text widget. Let’s get started.

. . .

Save the following block to a lastfm.js file and put it somewhere on your webserver. This isn’t a plugin, so it doesn’t need to live anywhere special. Open the file with your favorite editor and enter a Last.fm user name, api key, and a path for a placeholder (in case the API doesn’t return an image). (more…)