Code, Code, Revolution!
Ever wondered how many lines of code you’ve written? Try this command in a shell:
find . -name “*” | xargs wc -l
Of course you must move to the projects’ directory first. I looked for an addon for XCode but realized it’s not needed. If you’re a windows junkie, install an add-on to VS or install Cygwin to get the *nix experience!
My iPhone project was 4164 lines. That include comments of course. But it’s also just for the client app. There’s a bunch of C# web service and sql code in the back end. How many lines is your iPhone app?
I put the tee I got at the tech talk world tour up for sale on an online auction site. Interested in owning a one of a kind (almost, there’s only about 300 of them) baby blue t-shirt from Apple? Check out the auction here: http://www.tradera.com/Unique_Apple_iPhone_Tech_Talk_World_Tour_Stockholm_t_shirt-auktion-79732112
“It is aaaall over!” To quote Mike Goldberg of the UFC. To be honest, the finish wasn’t all that exciting, I got a baby-blue T-shirt. The event was a bit different from other events I’ve been to. First of all they made it very clear that the event was under NDA, meaning no bloging (oops), no photography (oooops) etc. Very Apple to prevent the community to share ideas and solutions.
The event was all about introducing application development to newcomers to the Mac family and more specifically the iPhone platform. Not surprisingly 95% of the attendees raised their hands on the question “are you new to iPhone development?”, being such a new platform I can’t see many people outside of Apple who consider themselves senior iPhone developers. They day was divided into different sessions:
Read the rest of this entry »

I was in India last week for work and got a pleasant suprise when my iPhone indicated that I got mail at 3 am. The email was from Apple informing me that I was welcome to attend the tech talks in Stockholm on december 8 (next week). The event is all day and will be held at KTH which is actually just a few minutes walk from my appartment. My friend and collegue, Hampus Nilsson, also signed up but unfortunately his registration wasn’t accepted.
Read more about the event at iPhone Tech Talk World Tour
Apple just released the 2.2 update for the iPhone, with that there’s also an updated SDK. As usual Apple is rather quiet about what is really updated with the new firmware but they have a list here
Google Maps
StreetView is not available in Sweden yet. Too bad for the location sharing apps on app store, their applications are now useless.
Mail
Mail is updated with bug fixes. There’s no visual differences.
Podcasts
They can now be downloaded from iTunes over WiFI/3G. Not very exciting to me.
Safari
Improved stability and performance. I haven’t tested it thoroughly yet but hopefully they’ve solved the problems. Safari has been almost unusable for me on sites not optimized for phones with constant crashes.
Improved sound quality of Visual Voicemail messages
Pressing Home button from any Home screen displays the first Home screen
Preference to turn on/off auto-correction in Keyboard Settings
Some people has really been whining about this. I can’t really understand why. I think it’s pretty good, at least for Swedish.
A while back I wrote about the sliding menu in the Facebook application. I was truly impressed by their application and especially the sliding menu. One of the major problems with the iPhone UI in my opinion is the lack of intuitive ways to present navigation to many functions for a single view. The sliding menu is the best implementation that adress that problem I’ve seen so far.
I actually went about building a sliding menu control with the intent to put the code on my blog. However, I didn’t finish it because I was still busy with my real job at Avantime and the iPhone application I was working on. But yesteday I got an email from a fellow iPhone developer asking if he could get some pointers in how to go about building sliding menu and to be honest I had sort of forgotten about the project all together. I spent a few hours today completing the code and adding comments to make it fit for another iPhone related blog post.
The idea behind the sliding menu is to use an UIScrollView to host the buttons and listen to the scrolling events to find the content offset of the UIScrollView and show/hide some indicator to inform the user that he/she can actually scroll the button row. I’ve recorded a short demo here:
Amazingly beautiful colors init?
The sliding menu control is initialized with a frame dictating the size of the control, the background color and an array of UIButtons. I didn’t implement the “can scroll left/right” indicator but the function exist and prints messages to the log.
Download the sample project containg the sliding menu control
I just have to share this problem I ran into this week and just couldn’t find the solution for. I recently installed and configured new Sharepoint MOSS 2007 farm. It has two servers, one server hosts all services and the other is a plain WFE. After a week or so in production the search server decided to give up and die. Everything looked fine and dany, it was running and I could start/stop it through “services on server” in central admin. But when trying to access the search service settings in the SSP it gave me this informative error:
The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress.
It was running but offline. I had no reoccuring errors in the event log but trying to open the settings through SSP it gave me a cryptic error and when checking log file there was another the another informative error (NOT):
Fail to obtain crawl status. Microsoft.Office.Server.Search.Administration.DeletedConcurrencyException: Object e26da097-50ff-4386-b3f6-2b2b30f73b96 not found.
I tried restarting the services. Ran the Sharepoint repair tool. Verified the service accounts. Tried everything I could find on Google, which was quite a lot. Nothing could resurrect the search service from its either offline or moving state. Before going through the tedious work of re-installing the entire farm I disconnected both servers from the farm and re-connected them to the same farm. I cheered like a little girl on her first alcohol buzz when the search service was once again operational. It saved me plenty of sleep! If you are unfortunate enough to encounter the same problem, i hope this will save you some sleep too.
In a previous post I wrote about downloading an image asynchronously. As my work has progressed with my app (which is soon to be released on app store) I realized that the InternetImage class worked very well in the simulator but crashed my application very often on the actual device. The problem with the first version of the class was that it ran by itself, downloading the image and then calling back to it’s delegate when done. The delegate receiver was supposed to release the InternetImage class when it got the message. At first I was very content with the solution and found it pretty neat. However, when images are not downloaded as fast as they are on the simulator with a 24mbit internet connection, there’s a pretty big chance that the user didn’t wait for the image to load before moving to the next view in the application. What happens is:
Read the rest of this entry »
With this blog I try to provide useful tips and solutions for programming .NET, Objective-C and more. My name is Björn Sållarp, and I love writing code.