11
May
2009
 

Magical iPhone View Controllers

by Matt Long

Update: This is documented behavior.

Every now and again while doing development you stumble upon something that makes you go, hmmmm. Those are normally the moments at which you have to ask yourself, “is this a bug or a feature”. If it’s a bug, then you should file a radar with Apple, however, what if it’s a feature? You blog about it, of course!

I have done a bit less iPhone development than Marcus, so he was a little stumped while looking through some of my code where I created a view controller using a simple alloc/init. Most interestingly is that fact that the app works. It loads the correct nib and displays the view just fine without any trouble. Notice I said alloc/init and not alloc/initWithNibName. How can this possibly work? How did my controller “know” which view to use?
(more…)

 
8
May
2009
 

MacBook Pro looking for a good home

by Marcus Zarra

Having finally decided that I prefer the 1920×1200 display of the 17″ Macbook Pros I am finally committing to one size of laptop. To help force myself into that commitment I am going to be selling my gently used late 2008 15″ Macbook Pro.

The specs are:

* 2.53 Ghz Intel Core Duo
* 4GB RAM
* 320 GB Harddrive
* 512 Nvidia Video cards (9400 and 9600)
* 2 USB
* 1 FW/800

All of the original hardware and equipment are included.

The asking price is $1,800.00 plus shipping.

The machine is in perfect condition as shown in these photos on flickr (http://tr.im/kQ11).

If you are interested in this machine please contact me at marcus at cimgf dot com.

 
3
May
2009
 

Core Data and Plug-ins

by Marcus Zarra

Thanks to the ability to have configurations in a Core Data Managed Object Model and being able to save data to multiple Persistent Stores, it is possible to have a Core Data Model that is constructed from not only an internal model, but from the models of all the plug-ins that are loaded into the application.

In this example we are going to build a basic application with the following requirements:

  • A plug-in framework
  • Plug-ins can extend the managed object model of the application
  • Removal of a plug-in should not corrupt the persistent store.

(more…)

 
3
Apr
2009
 

WWDC 2009

by Marcus Zarra

I am happy to confirm that I will be at WWDC this year in San Francisco. I am making this trip a little tighter, time-wise than I have in the past so I will be arriving on Sunday, June 7th and leaving on June 13th.

I normally post my nighttime plans on twitter (@mzarra) so if you are interested in having a chat then that is the best way to track me down. I will also be tweeting which sessions I am going to throughout the day.

I look forward to seeing everyone there, it should be very interesting as always.

 
26
Mar
2009
 

Don’t Blindly Trust D.E.B.B.

by Marcus Zarra

In some recent discussions I have been shocked to realize that many developers treat DEBB as gospel. This is a terrible idea. DEBB is written by people like me and I am a moron.

(more…)

 
26
Feb
2009
 

Don’t Screw Your Customers Over

by Marcus Zarra

As part of working with the print world I occasionally have to actually print something out. Publishers like to have paper copies of contracts, tax documents, etc. Its a pain in the rear and outdated but a necessary evil at this point.

One such occasion happened today and I needed to mail out a new signed contract to THe Pragmatic Programmers. As luck would have it, I lost my aging copy of Mail Factory, an app that prints nice mailing labels, since the last time I needed to print a label. No big deal, I went to their website and tried to download a new copy. Since the last time I used it, about a year ago, they have cancelled that product and rebranded it Labels & Addresses. Still no big deal, I downloaded the new application and recreated my label.

When I went to print the label I saw in the preview window that they printed “trial version” on the label. Ok, now this is starting to get annoying. If you are going to let me demo the software, let me demo it! Don’t put trial version on the very first label I try to print!

I took a deep breath, remembered that I have been using their software for many years now and decided to just buy a license. They even took my old license in and gave me a discount. Blood pressure dropped, things were fine. Then I ran into their payment processor — Digital River.

I am stunned, stunned, that anyone is still using these thieves! Immediately they try to charge me a “license backup” fee which is an Opt-Out. Annoyed, I opt out of that. On the payment page I have a choice for PayPal. Surprise, there is a $3.50 “manual processing fee” for PayPal. This is NOT 1998! Still, I wanted to print a pretty label so I back out, add a credit card and hit process. I am then presented with this:

SWREG - Error
Uploaded with plasq‘s Skitch!

Did my order go through or not? Who knows? I check my credit card provider, no charge. But are they slow or did it fail?

I contact the software vendor but they are only open until noon EST. Guess I will find out tomorrow or the next day since their site claims they strive to respond within 1-2 days. A happy customer this does not make.

Advice

Do not do this to your customers. Stop using these payment processing services that charge you insane amounts of money and screw your customers over. Spend a day (yes it only takes ONE day) and write your own that links to Google or PayPal. Or just use E-Junkie like I do. This is a customer facing system. When you bend your customers over with additional fees, cryptic error messages and other junk, they are not going to come back to you and say “please sir I would like some more”.

Also, respond to customer email within 24 hours. Don’t let it sit. Don’t give your customers a 7 hour window per day that you handle email. This is just bad.

My Solution

I deleted their software, will be asking for a refund (IF they ever charge me) and I wrote the label by hand. I will not be going back to them any time in the future for any of their software unless they stop using Digital River.

 
3
Feb
2009
 

Record Your Core Animation Animation

by Matt Long

Every once in a while I find a way to combine multiple technologies that, while they don’t produce anything terribly useful, are very interesting when combined. In this post I will be taking a look at combining Core Animation and QuickTime. As you may or may not be aware, you can draw in a graphics context while your Core Animation animation is running and add each image created to a QTMovie object from QTKit. This enables you to create a QuickTime movie of your Core Animation animation. Here’s how.
(more…)

 
28
Jan
2009
 

Don’t treat your customers like thieves

by Marcus Zarra

Every once in a while I run across a situation that just amazes me. While this topic is not strictly about software development it is about the subject of the business of software.

Our customers give us money for something we have already written.

This is an important point to grasp. We write software once and sell it many times over with no production costs other than initial development. Unlike almost every other industry in the world we only have to write the software once! We do not have to produce something new every time a customer wants to purchase something from us.

(more…)

 
24
Jan
2009
 

Dropping NSLog in release builds

by Fraser Hess

NSLog() is a great tool that helps debugging efforts. Unfortunately it is expensive, especially on the iPhone, and depending on how it’s used or what you’re logging, it could leak sensitive or proprietary information. If you look around the web, you’ll find a few different ways to drop NSLog in your release builds. Here is what I’ve put together based on those.
(more…)

 
1
Dec
2008
 

MacDev 2009 Christmas Offer

by Marcus Zarra

As most of you know, Scotty is hosting a developer’s conference next year in England. To make this event even more enticing, he has just announced a Christmas offer.

Sign up for MacDev2009 before the 24th of December and get FREE copies of both Code Collector Pro and Changes App together worth over £40.

There are going to be some great speakers at this event and I am looking forward to it.

 
25
Nov
2008
 

Adding iTunes-style search to your Core Data application

by Fraser Hess

iTunes has a very neat way of searching your library, where it takes each word in your search and tries to find that word in multiple fields. For example, you can search for “yesterday beatles” and it will match “yesterday” in the Name field and “beatles” in the Artist field. The basic predicate binding for NSSearchField provided by Interface Builder is not complex enough to archive this kind of search. I need to build the predicate dynamically since I can’t assume what field the user is trying to search and that each additional word should filter the list further – just like iTunes. Here is how to go about adding iTunes-style searching.
(more…)

 
13
Nov
2008
 

Landscape Tab Bar Application for the iPhone

by Matt Long

As you develop applications for the iPhone, you will likely use the project templates provided in Xcode. One such template, called “Tab Bar Application” helps you get a tab bar application set up quickly, but by default the application it generates only supports portrait mode for display. So how can you make the application also support landscape or even only support landscape? In this post we will address that question.
(more…)

 
5
Nov
2008
 

Core Animation Tutorial: Interrupting Animation Progress

by Matt Long

Starting and stopping animations in Core Animation is as simple as adding and removing your animation from the layer upon which is being run. In this post I am going to talk about how to interrupt animation progress and how to determine whether an animation completed its full run or was interrupted. This is accomplished with the animation delegate -animationDidStop:finished.
(more…)

 
27
Oct
2008
 

Announcement: Marcus’ Core Data Book Just Went Beta!

by Matt Long

Core Data BookA lot of hard work has gone into this book already and I see it becoming the definitive text on the subject of Core Data. The release date is slated for March 30, 2009, but it’s great to see it in beta. If you want to pick up the beta in PDF, it is available now from Pragmatic here: Core Data: Apple’s API for Persisting Data under Mac OS X.

While new Cocoa programmers will find it a great help to getting started quickly with Core Data, the book also covers some really interesting and advanced topics such as data versioning and migration, Spotlight/Quick Look integration, Sync Services, and multi-threading. You can really see Marcus’ command of the subject shine in these chapters which are already available in the beta.

Give Marcus some feedback on the book as it progresses. It’s going to be a great reference for any Cocoa Developer looking to harness the power of Core Data.

$21.00 for the beta PDF
$41.35 for the beta PDF plus hard copy when it’s released in March.

Mad props to Marcus. Congratulations!

 
25
Oct
2008
 

Core Animation Tutorial: Slider Based Layer Rotation

by Matt Long

It is often helpful to create a custom control for you application that will display a value as a level like a gas gauge shows how full your tank is. In this post I will demonstrate how to create a three layer tree that will show the current rotation of a circular layer as the value from a slider (NSSlider) is updated in real time. The layers include the root layer, the rotation layer, and a text layer that will display the current rotation in degrees.
(more…)