BuySellAds.com

Until Dec 3rd, 44% off all Manning books, including Barcodes with iOS! Promo code: mobicftw
Our DNA is written in Objective-C
Jump

Free Range

You will often find yourself working with NSRange parameters and variables, especially when dealing with strings. I stumbled into a problem that I think is an SDK bug, that prompted me to look at the header and find out what kind of functions are provided to us for comfortably dealing with NSRange.

Read more

Most Amazing Keynote Ever

Apple PR just confirmed that this year’s WWDC keynote will go down in history as the most amazing keynote ever, and your’s truly will be in attendance. Unfortunately I am not prepared for camping out to get in the main conference venue to make sure I can see that with my own eyes. Oh, how much I would love to be able to make it…

The four pillars of amazingness have been confirmed to be:

  • The Amazing Steve Jobs himself
  • Lion “Unveiling”
  • iOS 5, Codename “Fleeting Image”
  • iCloud, the amazing cloud service with the extra i

This effectively rises my excitement level to new heights. Apple had kept their iOS 5 plans really close to their chest to avoid Google stealing the coolest ideas and thunder.

Read more

App Shoutout for May

Every once in a while (monthly?) I like to give a shout out to apps that are making good use of components that came from my store.

If you have any released app that I have not mentioned so far, let me know, but please only if you are allowed to do so. I hate receiving mails with information that I cannot publish.

Prepaid 3G Data for Visitors to the USA – Truth and Fiction

As a fellow iOS Developer you might find yourself in San Francisco for WWDC or maybe on assignment. If you’re like me then you cannot survive with a modicum of connectivity. Unfortunately AT&T has visitors jump through hoops and has loads of horror stories in stock to deter people from getting what they really want.

Thanks to my sponsors at Scribd I’m here in San Francisco for the second time this year and I would like to summarize what I have learned about your options when it comes to getting affordable wireless data for the short time you’ll be in the USA.

So far I have found two viable options, the easier one being with T-Mobile, the harder but ultimately more enjoyable one going via the main iPhone carrier in the US, AT&T.  Read more

Tons of Changes

Devin Snipes asks:

I’ve advanced in my iOS development and have officially started work on a client project. My client has requested tons of changes since I told them the application was complete. Should I keep doing these changes or just stop. I under-charged them, made several thousand changes and also felt like I over-worked myself. How would you deal with this?

My second question is related to the somewhat ‘legal’ matters of iOS development. Do you have a standard iOS development contract that you request your clients to abide by? If so, could you send me a copy or could I look over it to get some idea as to what I should do.

Both are really good questions. (“Good question” usually means that they don’t have a simple answer)But let me attempt to go back in my own experience and give you a couple of pointers as to how I dealt with exactly the same situation and what I learned from it.

Read more

Design by a Friend

Apple tells us that apps are 60% design and only 30% code. So you want to have an experienced designer at your side that has some experience in designing iPhone UI and UX. But at the same time professionals can easily charge $100 per hour or more. A typical iOS app icon would cost you $500. All these price tags make professional looking apps seem out of reach …

Meet Christian Pfandler!

Christian, or CP how we call him, is doing his designing mostly out of passion, but contrary to established designers he has retained the flexibility of a one-man shop. Flexibility that reduces your cost as he is willing to scale his efforts for you from an eye-catching app icon all the way to fully designing an app.

It’s great to call Christian Pfandler a friend of mine worth thousands of dollars normally needed when you hire a designer. So all of our recent design work was done by Christian Pfandler who is frankly a total graphics geek and artisan. He will also start his own UI & UX design related blog soon at www.cp.tv.

Read more

What Impact will new Web-Technologies have on iOS Developers?

Jamar Parris asks:

I’ve really been contemplating whether to focus my efforts on one versus the other as I’m still new to both technologies. What impact do you think will HTML5, CSS3, WebGL, etc have on Objective-C iOS developers?

The question web versus native is one that makes waves every once in a while when there is support for a new formerly native technology in browsers or when Apple rejects an app. Let me expand my answer a bit, as there were a couple of recent experiences that serve well to underline my opinion on this question.

Read more

And Now Lazy Loading with NSURLConnection

In my previous post I demonstrated how to quickly whip up some lazy loading for a UIImageView. Today I revamped it to use NSURLConnection instead, because this would allow for cancelling the request. It also gives us the option of specifying if we want to make use of the cache and also how long we’re actually willing to wait for an answer.

That sounds more straightforward than it actually is. If you simply use an NSURLConnection with its delegate methods then you might not see anything wrong, unless you are using this lazy image view as subview of a UIScrollView. The problem there is that the scroll view blocks the run loop and so your connection events will not get delivered until you lift the finger.

But I found a solution for that. Let me know in the comments if you think something could be done in a more elegant way. The code for this is available in the NSAttributedString+HTML project.

Read more

A Quick Lazy-Loading UIImageView

In case you ever need to enhance UIImageView to load it’s image lazily… like if it’s coming from a web URL.

I used this on my NSAttributedStrings+HTML open source project to improve performance and also be able to have images that are not available locally. But you don’t want to do a synchronous call over the web, that would block your UI.

I admit, it’s a quickie, but hey, sometimes those are also fun!

Read more

Functions as Parameters – Old & New

This topic is not for the faint of heart because it requires that you permit an additional level of abstraction in your brain to be able to grasp it. Until know all my ivars and properties where either scalar values (like an NSInteger) or pointers to Objective-C instances (like NSString *). But there are cases when you actually want to be able to store more complex functionality yet not have the overhead of object creation and messaging.

From the C days we have a mechanism called “function pointers” and today I’ll show you how you can pass a function itself to an Obj-C class and store it in an instance variable. There are a couple of SDK functions that make use of that.

The we’ll explore the modern-day equivalent of providing this sort of “plug in” dynamic functionality: doing the same thing with blocks. If you’re lucky to have iOS 4.x as minimum requirement for your project then those blocks might be nicer to work with than function pointers.

Read more