I upgraded this site to WordPress 3.0, which took less than a minute and was completely painless. I also upgraded the themes & plugins. Upgrading the Suffusion theme, which I’m using, messed up all of the options so things might have looked weird while I was fixing the theme options.
Mike Cohen
Catching up
I apologize for not blogging since WWDC. I’ve been busy catching up with work. There’s a lot of NDA stuff I can’t talk about, along with some secret stuff at work. I’ve also been busy with Removr. The game levels are playable & the menu screens work, but it still needs level maps & sound effects.
I’m still waiting to hear if my offer on that condo in San Leandro was accepted. I was supposed to find out yesterday, but the seller seems reluctant and is waiting to review additional offers. Keeping my fingers crossed.
links for 2010-06-17
-
Applications running on devices with large displays (iPhone 4 and iPad) may want to render at a lower resolution than the devices' native resolution for better performance.
-
Kids Are Heroes and Niles Technology Group are leading the way in developing unique programs and products to help students become effective social entrepreneurs. By teaching the virtue of helping others, while at the same time helping schools be their best, Kids Are Heroes and Niles Technology Group are paving a new way for students to make a mark on their world.
The night before WWDC
I’m really excited about WWDC, which starts tomorrow. I’ll probably go to sleep early, so I can get up at 5AM to wait in line for the keynote. Today I went on the pilgrimage to the Apple Company store in Cupertino.
Yesterday I met with a realtor and looked at several places in San Leandro. I found one that I really liked, which I’m still waiting to hear from.
Unfortunately I’ve been sick with an upset stomach since I arrived here. To top it off, I chipped a tooth today. Hopefully I’ll be able to hold out until I get home so I won’t have to miss any part of WWDC.
PicSlide 1.6 & iDjembe 2.1 Approved
PicSlide 1.6 has been approved. It adds a Magic Panda that finds the newest and most interesting photos. iDjembe 2.1 was also approved a few days ago and is now a Universal app that supports iPad, iPhone, and iPod Touch.
Off to San Francisco
I’m getting ready to leave for San Francisco this afternoon. I’m going to WWDC and I’ll be spending some time with a realtor looking at some homes there.
Some iPads Can't Take the Heat
Via NYT > Technology:
Some Apple iPads are overheating in the sun, although its unclear if this is a widespread problem or confined to a small percentage of iPads.
This happened to me a few times when I was sitting outside in the sun with my iPad. It will suddenly shut down and show a temperature warning screen.
links for 2010-06-01
-
Biggest non-story ever. I love how the right wingers get their panties in a bunch over a non-issue like this yet they completely ignore all of Bush's illegal acts.
Quick and easy image caching for UITableViews
PicSlide uses a table that lets you choose a picture to play with. For each picture it shows a thumbnail. When the thumbnails are loaded from the application’s resources, you don’t have to be too concerned with image loading time.However, when I load those thumbnails from the web, as I do now with the Magic Panda, scrolling the table can become extremely slow.
Previously, I was loading the thumbnail directly from my table data source’s cellForRowAtIndexPath: method.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"tvCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"tvCell" owner:self options:nil];
cell = tvCell;
self.tvCell = nil;
}
NSString *url = [picUrls objectAtIndex: indexPath.row];
UIImageView *img = (UIImageView*)[cell viewWithTag: 2];
img.image = [UIImage imageWithData: [NSData dataWithContentsOfURL:[NSURL URLWithString: url]]];
}
If you don’t have too many rows, a NSMutableDictionary makes a quick & easy image cache. I simply added one method to implement image caching:
NSMutableDictonary *imageCache;
- (UIImage *)getCachedImage: (NSString*)url
{
UIImage* theImage = [imageCache objectForKey:url];
if ((nil != theImage) && [theImage isKindOfClass:[UIImage class]]) {
return theImage;
}
else {
theImage = [UIImage imageWithData: [NSData dataWithContentsOfURL:[NSURL URLWithString: url]]];
[imageCache setObject:theImage forKey:url];
return theImage;
}
}
When I load my table, I now call getCachedImage rather than fetching the image directly.
img.image = [self getCachedImage: url];
The result can be seen below:


