Howto

UIView: How to Make Shiny Backgrounds and Other Reusable Styles

When I first started making iPhone apps, I wrote a lot of repetitive code to style interface elements. Certainly, getting comfortable with Interface Builder eases that pain to some degree, but IB won't allow you to take advantage of a lot of available built-in styling features for your interface elements, such as curved corners, drop shadows, and stroked borders. Additionally, you can create beautiful gradient backgrounds in code pretty easily, but the code is somewhat verbose, so it really pays off to find good ways of re-using that kind of code. Also, using a programmatic approach to your app styling can eliminate the production time associated with image-based styles (e.g. custom background images). A lot of common effects used in UIs can be realized without any images whatsoever. Read more about UIView: How to Make Shiny Backgrounds and Other Reusable Styles

A Simpler Magnifying Glass (Loupe) View for the iPhone

magnifier_screen.jpg

I recently needed to create one of those magnifying glasses in an iPhone app that shows you a close-up view of where you're touching. Searching around led me to this article by Sean Christmann, which was really helpful in showing me how to create what I was looking for (Thanks Sean!). Read more about A Simpler Magnifying Glass (Loupe) View for the iPhone

How to Plan Freelance Projects (or, why I built HourPatch)

I've been freelancing full-time for 3 years now (although I started freelancing about 6 years ago), and after all this time, I've finally found a method for planning my project schedule and keeping my commitments in check.

Applying our Photoshop Thumbnail Script to Multiple Documents

A reader asked if there was a way to apply the Photoshop Thumbnail script I wrote to all open documents, so I figured I'd post it up here for everyone to see.

Drupal: How to Remove the "not verified" Text from Comment Author Names

If you have comments activated on your Drupal site, and you allow non-members to leave comments, by default Drupal will append "(not verified)" to the names of people who leave comments and aren't logged in to your site. On many sites (like mine, for instance), people aren't even allowed to register accounts, meaning every comment has that pesky "(not verified)" text with it! I find that unfriendly, so here's how you can change that.

Using the YUI Autocomplete Control as a Combo Box

Yesterday I found this article showing how to add a button to the Yahoo UI Autocomplete Control to make it behave like a combo box (i.e. all of the autocomplete's suggestions are listed in a dropdown when the button is clicked). Read more about Using the YUI Autocomplete Control as a Combo Box

Creating Image Thumbnails using PHP and ImageMagick

Last month I wrote a post on using Photoshop and Javascript to generate thumbnails. That's useful if you have to process a bunch of images for a website you're making, but what if you want to have a function on your website that accepts image uploads and then dynamically generates thumbnails? There's a lot that goes into that, but today I'm going to provide a basic PHP function (using ImageMagick) that gets the image processing part of the job done.

Thumbnail Generation with Photoshop and JavaScript

A couple of weeks ago I wrote a post called Conditional Image Resizing with Photoshop and JavaScript that illustrated how to write a script to perform quick photo cleanup and resizing within a bounded area. Today I want to talk about a similar technique for generating thumbnail images. The fundamentals are the same, but the goal is slightly different.

Conditional Image Resizing with Photoshop and JavaScript

Often I find myself having to do a lot of bulk image processing when I'm working on websites: resizing a bunch of pictures to a certain width or height, color adjustments, and sharpening, usually. It can be the most mind-numbing part of my work, and I'm always looking for ways to avoid that.

In Photoshop, you can use actions to help you automate a lot of repetitive work. However, the shortcoming I've found with actions is their lack of conditional behavior. For example, let's say I have a big batch of images, some portrait-oriented (taller than they are wide) and some landscape-oriented (vice versa), and I want to resize each of them to fit within a 500 x 500 pixel square. If the image is portrait-oriented, then I need to resize proportionally, setting the height to 500 pixels. If it's landscape-oriented, then I should resize proportionally with a 500 pixel width, instead of height. I've never found a good way to do this with a single action. But where actions fail, JavaScript comes to the rescue.

I Thought That I Was Suddenly So Popular

Today, Google Analytics is telling me that, over the past two days, there's been a surge in traffic for sphericle.com, where I occasionally post music that I've made. The site usually gets a few hits per day, but on Friday it had 60 visitors, and Saturday saw 180! Great news, right? I wondered, how did this happen? Where are these visitors coming from?

Pages

Subscribe to RSS - Howto Subscribe to Coffeeshopped Blog