Ad

Our DNA is written in Swift
Jump

Author Archives rss

Starting an OpenSource Project on GitHub

In my article on CoreText I mentioned that Apple left out some very useful methods from NSAttributedString, namely the ones that would allow you to create an attributed string from HTML. Now you would probably not want to create attributed strings from complex HTML documents, but use that for simple tasks like displaying one word in a different color or bold.

My first thought was that maybe I should make it a sellable component, but I dismissed this idea for two reasons:

  1. there is a certain likelyhood that Apple will implement the missing functions in the next major SDK refresh
  2. if I would get help from people who are more experienced in dealing with HTML parsing then this would benefit everybody involved

So I posted the question on Twitter as to where to put the shared code. The response was a resounding GitHub (one mention of Mercurial and Assembla each). So far I had put off dealing with GitHub, because – in contrast with many other iOS developers – I happen to very much like Subversion integration in Xcode.

Read on to learn how to get started.

Read more

HTML Colors

I am building a category for NSAttributedString that will allow me to make attributed strings from HTML code. For coloring the text there are two methods in HTML, via the deprecated font tag and via style. Both use color names or hex to describe the color.

The W3C knows 147 color names, clearly too many to type in manually. So I used a bit of shell script magic to hammer this into Objective-C. Then I also needed an elegant method to make regular UIColor objects from a hex string.

Both I am sharing in this article. These methods are invaluable if you are dealing with web people who are used to specifying colors this way. Also it might be more intuitive if you can specify colors in hex format yourself. That is, if you are a geek who is used to thinking in the hexadecimal system.

Read more

GeoCorder 1.3

GeoCorder started out as a pure track recorder but since version 1.2 it also became a great position tracker, provided that you had your own server to receive the position updates.

In this new version 1.3 you have a choice of two additional services: Google Latitude and Crossingways.

Changes

  • FIXED: Tracker would stop sending updates
  • ADDED: Google Latitude as tracking service
  • ADDED: Crossingways as tracking and upload service

Update Jan 7th: The update is now available for download from the app store.
Read more

Macocalypse Now!

Being an iOS-only developer as of yet the launch of the Mac App Store did not really stress me too much. On the contrary, I loved the experience on my mobile devices and I’m glad that Apple is now achieving what Microsoft has failed with for several years with the “Windows Marketplace” store.

Update Jan 7th: I get tons of requests to explain how to do certain iOS things on Mac. Sorry, but I am just as a noob in this area as the next guy. But I am sure, as I will dip my toe in the now much bigger Mac pool, many a tutorial will be forthcoming by yours truely.

Read on for my initial experience and some thoughts about what this means for us iOS developers.

Read more

iWoman 2.0.1

Right on the heels of the iWoman 2.0 major update this minor update addresses a couple of pressing issues:
  • Fixed: when updating from 1.x the bleeding values where incorrectly migrated. The values will be corrected from the periods.dat.bak file.
  • Fixed: crash on significant time change while app in background
  • Fixed: incorrect analysis text on Basal Temperature Tracker
  • Improved: Passcode Lock animations

Update Dec 31st, 2010: Update has been submitted to Apple. We hope for a swift approval.

Update Jan 5th: I was made aware that I had the deployment target on 4.2 effectively making the update unavailable for half of my user base. Because of this I pulled the 2.0.1 and submitted it again with a correction for this. This will delay the availability of this update once again.

Update Jan 6th: Update has been approved and will be downloadable shortly via the app store. Also because of the fierce competition we saw ourselves forced to drop the price permanently to $1.

Read more

The Future According to Apple – Predictions 2011

I should actually be sitting down to put the finishing touches on an update to one of my apps, but somehow I have these visions in my head of what our iOS-Future will look like.

So in true Getting Things Done fashion, I compiled them into a list for your shared excitement, just so that I get them out of my head and I can move on to finally being productive in this new year.

I’m not saying that these are premonitions, but they might very well be. Read on to see how exciting our year with Apple will be.

Read more

Befriending Core Text

Before the iPad was released you had basically two ways how to get text on screen. Either you would stick with UILabel or UITextView provided by UIKit or if you felt hard-core you would draw the text yourself on the Quartz level incurring all the headaches induced by having to mentally switch between Objective-C and C API functions.

As of iOS 3.2 we gained a third alternative in Core Text promising full control over styles, thread safety and performance. However for most of my apps I did not want to break 3.x compatibility and so I procrastinated looking at this powerful new API. Apps running only on iPads could have made use of Core Text from day 1, but to me it made more sense supporting iPad via hybrid apps where the iPhone part would still be backwards compatible.

Now as the year has turned the adoption of 4.x on all iOS platforms is ever more accelerating. Many new iPads where found under the Christmas tree and by now even the most stubborn people (read needing 3.x for jailbreaking and sim-unlocking) have little reason to stick with 3.x. Thus we have almost no incentive left to stick with 3.x compatibility. Yay!

Read more

Podcast #021 – “One More Thing”

The first episode with the new name is also the last on in 2010. So I look back on an eventful 2010 with a few glimpse to what 2011 holds for Cocoa developers.

If you want your work/apps highlighted in 2011 then just contact me. I’m always looking for interesting material and tips to share with my listeners.

It’s also the first time that I did not script the podcast, so there are no show notes. Let me know what you think in the comments of by e-mailing me.

iTunes Connect Closed

iTunes Connect is closed until December 29th.

This means:

  • No new app submissions or update submissions
  • No sales stats or reports
  • No ranking info

… from Apple or their sites.

Read more

Bars Like the New York Times App

Elias Sanchez asks:

Hello Oliver. Quick? Do you have any tips in making a toolbar appear/disappear? Trying to mimic what the NYT app does when looking at an article. Is it using Core Animation perhaps? Can’t find anything out there. Any ideas? ThxU

Looking at the NYT App you can see that they do quite a bit of manipulation of the bars of which there are 3: Tab Bar, Navigation Bar and sometimes a Tool Bar.

For beginning iOS Developers it might seem daunting to combine all of these for the effect that the NYT App achieves. In this article I give you an analysis of what they did so that you have their techniques at your disposal, too.

Read more