Thursday, March 17, 2011

iOS Linebreak Fun

Learned something the hard way today.  You'd think that the order in which properties are set shouldn't matter even in weirdo Objective-C land, but things are different over there.

The following will wrap long button text, but limit it to two lines.

button.titleLabel.lineBreakMode = UILineBreakModeWordWrap;
button.titleLabel.numberOfLines = 2;

The following will wrap long button text all over your image and outside the bounds of your button.  You'll be scratching your head for a while wondering why the numberOfLines property doesn't have any effect.

titleLabel.numberOfLines = 2;
button.titleLabel.lineBreakMode = UILineBreakModeWordWrap;

Monday, February 28, 2011

Shop Stats open for business!

Shop Stats is out of closed beta and now ready for open signups!

After I made a couple of paid Android apps available on Market, I quickly found out how painful it is to keep track of my sales through Google Checkout.  I was spending more time refreshing and counting than coding.  Thus, Shop Stats was born.

With this web service, you can:

  • leave the overview page open and it'll auto-refresh with the latest numbers throughout the day
  • see your sales broken out by state in case your state makes you pay sales tax for digital goods
  • sanity check your numbers when you fill out your tax forms
  • see the effect of app update timing
  • lots more coming...