View Source from Safari on iPad

UPDATE: Thank you to Rixtur for the update for iOS 6. Steps updated.

I’ve been enjoying the iPad quite a bit.  This device is going to change everything.  I have lots of thoughts, one of which is that the iPad will be a high productivity device.  Feeding into that, here’s a quick way to view the html, css and javascript source code of a web page from Safari on the iPad.
This guide is adapted from Dustin Caruso’s note on viewing source in Safari for the iPhone.

1. Visit this page using Safari on your iPad. Continue reading View Source from Safari on iPad

Using an HTML Web View with a Transparent Background in iPhone SDK's Interface Builder and Xcode

Something almost every iPhone application needs is an About and Help view that allows the user to learn a little bit about the application they’re using and  how it should be operated.  The problem with a UITextView in Apple’s XCode and Interface Builder SDK is that you can not use rich-text styling or even bold one line over another.

One solution to this problem would be to create image files containing stylized text and then rasterize them and allow the user to page through them.  The problem with this is that you can’t have tappable URLs or links embedded in the text.

David Peixotto, coding ninja and my business partner for Neutrinos, suggested we look at using a Webview or HTML view and put an imageview in the background.  The trick is telling the iPhone to display a UIWebView with a transparent background.  I looked around for the solution to this and came across this helpful post in the iPhone Developer SDK forums.

Step one of getting a transparent web view in interface builder is to create HTML in the controller.m for the view containing the webview that contains the CSS line: <body style=”background-color:transparent”> Inside the <head> </head> sections of the html.

Step two is to set the background color of the webview to clear or transparent:  myWebView.backgroundColor = [UIColor clearColor]; Continue reading Using an HTML Web View with a Transparent Background in iPhone SDK's Interface Builder and Xcode

Custom Styling the ShareThis Button Using CSS Without API Calls

ShareThis CSS Style Classes Button

I was just doing a ShareThis icon for a client I’m working with and found that how to properly style the button is poorly documented.  In order to replace the whole icon and text, you are supposed to use the developer API.

I only wanted to style the text, so I was hunting for some CSS to style the text and could not find the right classes to call.  Some hunting turned up the following: Continue reading Custom Styling the ShareThis Button Using CSS Without API Calls