Saturday, August 28, 2010

Nieman Journalism App uses Tyree Apps' OOZWebView

We are happy to note that Joshua Benton and the Nieman Journalism Lab at Harvard have incorporated the OOZWebView into their iPhone application. It is really exciting to know that something we have made open source is actually helpful and valuable.

Now the whole concept of Open Source becomes clearer to us. This great feeling isn't going to feed the kids, but it's pretty powerful and we've already had a few inquiries about paying gigs based on publicity we've gotten through our Open Source work.

Based on Joshua's work with out plugin we've made some changes and found a bug. The bug occurred when the plugin was used in offline mode and has now been fixed in the github repository for the plugin. One of the things that Joshua added to our codebase was a command to scale the web pages. Originally, when one would load a webpage, the first page would look fine and then any future pages had the potential to look too big. So he suggested that we add a line in the ConnectionDidFinishLoading method (line 158 of the OOZWebView.m file) to allow the page to resize:

[self.webView setScalesPageToFit:YES];

However, when we did add that code it resized our initial page as well. Now the initial page would shrink to fit itself onto the screen rather than staying at the original size. It was a simple matter of setting a viewport command in the meta data of the html controlling the initial page to rectify the situation.

By setting the viewport, we are telling the iPhone how to scale the content of the website. Apple has an excellent developer article about viewports and Safari and the iPhone. However, if you're the impatient type, try sticking this code into your html:

<meta name="viewport" content="width=320, user-scalable=yes">

This is a meta command so it needs to go into the "head" section of your html page.

Tuesday, August 3, 2010

UIPopoverController and SplitView Matt Gemmell Saves the Day

Until now Apple provided a SplitView controller for your iPad that worked fine. However, they used it in a slightly different way in some of their own applications (like Settings).

If you wanted to implement similar features you had to roll your own controller and then worry that you've screwed something up and introduced a bug that won't appear until well after your application ships.

In steps Matt Gemmell who has produced an open source splitview controller for the iPad that offers some really cool user interface enhancements. His twitter library seems to pop up in everyone's applications. Perhaps this controller code will wind its way around as well.