Thursday, December 18, 2008

More iPhone code, opening some URLs in Safari

I answered a question about this in the iPhone developer forums, so thought others might find it useful too.

If you have a UIWebView in your app to show some web page (which I'm using for all the help pages.) You may still want it to open a new Safari window for other things--like links to the AppStore for other programs. This little bit sees what they web view will open, and if it's a URL on or an email address, opens that in Safari or the Mail app.

An equivalent of the "myEndsWith" is something you'll still have to do :)

- (BOOL)webView:(UIWebView *)webView 
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType {
//Opens any to in Safari (so app-store links open right :)
if ([[[request URL] host] myEndsWith:@""]) {
[[UIApplication sharedApplication] openURL:[request URL]];
return NO;
//Mailto opens in email app...
if ([[[request URL] scheme] myStartsWith:@"mailto"]) {
[[UIApplication sharedApplication] openURL:[request URL]];
return NO;
return YES;

Saturday, December 13, 2008

1 Week, 1 App

I started pulling out a few of the features in FTP On The Go since put together, they really make an entire very useful program.

The Web and FTP servers, along with the directory manager to browse your files, and the viewers for individual files (editor for text, etc) all add up into a very useful program.

Crazy that I could have stopped after the first day of work and called it done. But I wanted to add a much cooler interface...the picture here doesn't show how cool the "bounce" sizing looks when you touch the things on the screen.

About a week later and it's all done and submitted to Apple. Even a website using Peter's nice templates: WiFi Disk. Hopefully shows up in the AppStore soon!

{Edit.  Names changed more for this than any other program we've done.  One of the working titles is in the picture.  Somebody already had a USB disk product with that name, so didn't use it.  But go the .com before I noticed.}

Thursday, December 4, 2008

iPhone Toolbar Menu Icon

I needed an icon for showing a menu of choices in the "FTP On The Go" iPhone app. Since it's using an UIActionSheet, I thought this turned out well...just simple boxes (with a little shading), shown in black here so visible on the background.

Seems the blogger site loses the alpha channel. Here's the original image. Free to use in any app.