05/10/2010
Dear Non-Developer Readers,
I may start posting some technical stuff up here from time to time. I’ll try to not let it dominate my bi-annual blog posts. Also, I’m testing out this code highlighting plugin which seems to work pretty well.
My Problem:
I want to hide the background of a UISearchBar and the methods I found only worked on SDK versions 3.1.3 and below. That method basically grabs the subview (of class UISearchBarBackground) that contains the background image and sets it to hidden:
[[searchBar.subviews objectAtIndex:0] setHidden:YES];
Well that only works in versions of the iPhone SDK prior to 3.2. In 3.2 and beyond this technique no longer works (which is exactly why these sort of whatever.subviews hacks should generally be avoided).
My Solution:
In iPhone SDK 3.2 and 4.0 I’ve found this alternative technique that works:
[[searchBar.subviews objectAtIndex:0] removeFromSuperview];
And if you want to go all out and attempt to future-proof your code give this a try (no guarantee that it won’t still break though – Apple could still change the class name or change the structure of the UISearchBar in a future SDK update):
for (UIView *subview in searchBar.subviews) {
if ([subview isKindOfClass:NSClassFromString(@"UISearchBarBackground")]) {
[subview removeFromSuperview];
break;
}
}
04/29/2010
As I was watching the Orioles pre-game show last night (before watching the Capitals miserable loss) I saw that MASN was promoting a video blog created by one of my favorite Orioles, Brian Roberts! Well he picked the best name possible for his blog, “The B-Log“.

08/18/2009

Saturday I went to to see the Orioles lose to the Angels in Baltimore. On our way out of Oriole Park at Camden Yards we saw the van pictured above and I must say that it is awesome and I must own one. Obviously vans are pretty cool to begin with, but adding an Orioles paint job adds to the grandeur.
About 10 minutes after I took this photo, we walked through the Inner Har and happened upon people fleeing one of the buildings. Apparently, there was a shooting moments before we arrived after a few rival gang members happened upon each other in the most tourist filled area of Baltimore. Fortunately, no one was killed though it was still a pretty nasty scene – we saw police attending to a shot gang member through a doorway and we almost stepped in some blood outside…ugh.
Thankfully I spotted this van and stopped to snap a few photos, otherwise we might have arrived at the Inner Harbor a minute earlier…