Altering the background color of cell.accessoryView and cell.editingAccessoryView

Upon reading the documentation (a novel idea), I found the article, “A Closer Look at Table-View Cells”. It helped me understand the composition of the cells, and I found my answer… cells look like this… Since the cell.accessoryView is a sister view to cell.contentView I had to ask the cell.contentView for its superview, and then … Read more

iPhone:Find the current timezone offset in HOURS

There is a very nice NSTimeZone object which will give you the timezone offset from GMT in seconds: float timezoneoffset = ([[NSTimeZone systemTimeZone] secondsFromGMT] / 3600.0); For more see blog post http://blog.indieiphonedev.com/2011/01/09/getting-the-timezone-on-the-device/

How to figure out the font size of a UILabel when -adjustsFontSizeToFitWidth is set to YES?

I’m not sure if this is entirely accurate, but it should be pretty close, hopefully. It may not take truncated strings into account, or the height of the label, but that’s something you might be able to do manually. The method – (CGSize)sizeWithFont:(UIFont *)font minFontSize:(CGFloat)minFontSize actualFontSize:(CGFloat *)actualFontSize forWidth:(CGFloat)width lineBreakMode:(UILineBreakMode)lineBreakMode will return the text size, and … Read more

tech