Posted 1 month ago

How to Make Custom Drawn Gradient Backgrounds in a Grouped UITableView with Core Graphics

In iPhone app design, it is important to find a balance between customization and familiarity.  Many times, subtle differences are all you need to make yourself stand out from the crowd.  While doing the Ambiance 3.0 redesign, I wanted something to make my list of content a little different than all the other cookie cutter table views out there.

A great place to start is to implement your own background and use a clear table view background.  Many apps are now doing this and it is come to be expected from a grouped UITableView that is done with a little love.

Another way to spruce up these tables is to add a custom background color.  Since 3.0, this has been as easy as setting the cells backgroundColor property.  I implemented both of these and it wasn’t enough for me. It still looked like so many apps out there.  I thought about putting a gradient view as the background, only to find that setting a grouped UITableViewCell’s background ignored the nice rounded corners of the cell.

Almost giving up, I googled around to see if anybody else has done it and shared some code.I found this post on StackOverflow: http://stackoverflow.com/questions/400965/how-to-customize-the-background-border-colors-of-a-grouped-table-view

This was a great resource as it helped me in the right direction — Core Graphics.  It was meant as a way to customize the background of a cell before the 3.0 sdk came out, but I used it as a basis for my code to draw a gradient!  It needed tweaking and optimization, but after a little bit of hacking away at it, I was able to get it to work nicely.  I present to you the UACellBackgroundView.

To use the UACellBackgroundView, simply add the .h and .m files to your project, then set your

.h file

http://gist.github.com/292381

.m file

http://gist.github.com/292384

Whenever you want to use it, just set the cell’s backgroundView to be the UACellBackgroundView in your own UITableViewCell Subclass’s initWithStyle method. Then, when you have your data and are creating cells, simple se the position of the cell by calling setPosition, of just call the line directly if you don’t want to subclass the UITableViewCell.  The position is important as it lets the cell know to draw itself correctly depending on whether or not the cell is first, last, in the middle, or a single cell.

http://gist.github.com/292388

Hope this helps you in your quest for a better app.  If you want to use it, you will have to set your cell labels and elements to have a clear background, so hopefully you have a fast drawing method and have optimized your table view cells to do minimum work during scrolling.

Posted via email from [coneybeare code]Comment »

Posted 1 month ago

Donation Report

As detailed here, Urban Apps has pledged to donated 100% of the revenue of our sales on January 14th, 2010 to Yele, an Earthquake Recovery Relief Fund benefiting Haiti.

There were 902 copies of our software sold on the 14th. We will not only donate the 70% that we get after Apple’s cut, but we will also throw in that 30% out-of-pocket, leaving a grand total of a $902 donation.

Thank You everyone who purchased an Urban Apps application yesterday for this purpose.

-Urban Apps

Posted 1 month ago

A Days Worth of App Sales to Haiti

Inspired by Gaucho Software and their decision to donate sales proceeds to the disaster recovery efforts in Haiti, Urban Apps has decided to donate all sales of our apps for January 14th, 2010 to Yele, a Earthquake Recovery Relief fund.

Not only will we donate the proceeds from our app sales (the 70% that Apple gives us after their cut), but we will fund the additional 30% out of our pockets.  This means that if we sell 10,000 copies of our apps (all $0.99), then we will donate $10,000 to Yele.

Please help us spread the word by Tweeting, emailing or publishing the link to this page on Facebook.

Tweet This

You can find a link to all of our software here.

-Urban Apps

Posted 3 months ago

Ambiance Now Fixed for BlackBerry OS 5.0

We have submitted version 1.0.2 to BlackBerry App World for approval. Once again, we would like to apologize for any inconvenience Ambiance may have caused you and thank you for your patience. We will post here again as soon as BlackBerry approves the app.

If you cannot wait, you can pick up the app at the MobiHand Store instead.

UPDATE: 12/2/09

The new version is now live

Posted 3 months ago

Ambiance-BlackBerry OS 5.0 Update

As with many other apps, Ambiance is having compatibility issues with the new BlackBerry 5.0 OS. We are fully aware of the issues and are working around-the-clock to resolve them. At this time, we advise you to NOT purchase ambiance if you are running the BlackBerry 5.0 OS. Urban Apps would like to thank you for your patience in the matter.

We originally thought that the problems with volume were fixed, but we are having mixed results across different devices and networks upon further testing.  Urban Apps has thus had to pull the 1.0.1 update from the store.  Ambiance is confirmed to work flawlessly on any OS lower than 5.0, but we regret to say the 5.0 is not supported until we can get to the bottom of this.

If you are running 5.0 and have already purchased the app, you have a couple options:

  1. You can wait for the new version to come to the BlackBerry App World with the 5.0 fix. We do not have an accurate timeline for this but do know that we are working around-the-clock to resolve these issues.
  2. You can request a refund through BlackBerry App World athough they do make it difficult.  See FAQ 9 here

We understand the frustration and unease that comes with paying for something that does not work, but please know that Urban Apps has no intentions of leaving you without a working app. We wish to provide every customer with a working Ambiance application. Again, we appreciate your patience while we work on a fix.

Thank You,

Urban Apps

Posted 4 months ago

BlackBerry Giveaway Winner!

As promised here, we have chosen a winner of our first BlackBerry Tweet and Win giveaway.

There were 410 entries over the course of 1 week after deleting ineligible tweets that were not exactly like the one in the posting, and the tweets of us, friend and family.

We went over to http://random.org and plugged in 1-410 and got… number 102!

Counting up to the 102nd valid tweet since the beginning of the contest, we get Brandy Whipkey (@keylee95).  Congrats!

Thanks for tweeting everybody!  If you have a BlackBerry, go Download Ambiance!

Posted 4 months ago

Win a BlackBerry of Your Choice! Ambiance for BlackBerry Now Available!

To celebrate the release of Ambiance for BlackBerry (available now in the BlackBerry App World storefront), Urban Apps is giving away a new BlackBerry phone.  If you win the contest, you will get to chose a brand new BlackBerry from the 5 models Ambiance is available on!

  • Storm 2
  • Storm
  • Bold
  • Curve
  • Pearl

All you have to do to enter is tweet the following:

UrbanApps BlackBerry Giveaway! Tweet and win a BlackBerry to celebrate the release of #Ambiance on BlackBerry App World! http://bit.ly/e5ZGl

Multiple entries (tweets) are not only OK, but encouraged! Just make sure the tweet is exactly the same as above.  We will randomly choose a winner from those tweets on Monday, November 9th. The winner will be notified via Twitter from the account @urbanapps. Good Luck!

Posted 4 months ago

Fixing symbolicatecrash...

Because you found your way here, I am assuming you already know what symbolicatecrash is and when/why you would use it. If not, take a detour < href=”http://furbo.org/2008/08/08/symbolicatifination/”>here and come back. This tool has been great but is very temperamental. It worked for a while when I first started, then it broke and stopped giving results. I applied the Alan Quatermain Fix, but things still weren’t right.

Well, tonight I had a client app rejected from crash I couldn’t reproduce. I only had 1 crash log from Apple, and the stupid symbolicatecrash script wasn’t finding anything! I had to dig in and see what was up. After spending a little bit brushing up my Perl, I was able to fix the problem. Basically, the Regex that the script uses was failing to match in two places: the bundle name, and the versions.

Change lines 372-377 in the symbolicatecrash script to look like this:


^\s* (\w+) \s* \- \s* (\w+) \s*    (?# the range [1,2])
(\+)? (?# the application may have a + in front of the name [3])
([^\s]+) (?# bundle name [4])
\s* \w+ \s* (?# the versions--generally "??? [???]")
\? (?# possible UUID [5])
\s* (\/.*)\s*$ (?# first fwdslash to end we hope is path [6])

There are 2 changes from the pre-Alan-Quartermain-Fix:
On line 374, I changed the (.+) to be ([^\s]+) just like the AQ fix.
On line 375, I changed the \s+ .+ \(.+\) \s* to be \s+ \w+ \s* because my crash reports never have versions in parenthesis.

I don’t know if this will work for everybody, but it works for me and the crash reports I get back from iPods and iPhones. Good luck!

Posted via email from [coneybeare code] | Comment »

Posted 4 months ago

Ambiance has been named the "App of the Day"...

(via http://appoftheday.com/app/Ambiance)

Its a great honor to be named alongside apps like Tweetie 2 and DropBox. This is great!

Posted via email from [coneybeare code] | Comment »

Posted 4 months ago

Overriding -[UINavigationController drawRect:] to add a custom background image...

I needed to do this across the board for a client app and thought I would share…

Posted via email from [coneybeare code] | Comment »