Tag ‘objective-c’

How to intercept navigation in a UIWebView

UIWebView is a great control to display formatted text (using HTML language). That text might contain links that you want to intercept in Objective-C and do a specific action (push a new view for example).

You can do this by implementing UIWebViewDelegate protocol…

Continue reading

Native iPhone look in rhomobile

Brad Midgley

Getting to Railsconf 2009-81

Rhomobile provides great instant gratification in building applications. See my last article for a starter.

There are some elements you’ll miss as you start to work on the iPhone target. The back button is one and the custom tab bar is another.

The main bar can currently be customized by building rhodes from source (the way I did in the previous post). Open platform/iphone/rhorunner.xcodeproj in Xcode and double-click MainWindow.xib under Resources. This will launch it in Interface Builder.

You might wonder why the bottom bar is a toolbar and not a tab bar. Native iPhone apps typically use a tab bar that switches the view above the bar. This isn’t going to work for rhodes however–we aren’t going to change to a different view. We’ll simply tell the UIWebView to go to another part of the application. Fortunately,

Continue reading