Showing posts with label iphone. Show all posts
Showing posts with label iphone. Show all posts

Thursday, April 16, 2009

Transparent Background on iPhone UIWebView

Well, Apple has hidden a little nugget in the docs that took me quite some time to dig up. Here's the simple solution to creating a UIWebView with a transparent background:

  • set your background color of the UIWebView to clear
  • set the css for the body to background-color: transparent
  • here's the bugger... set the opaque property of the UIWebView to NO

The code looks something like this:

UIWebView *w = [[UIWebView alloc] initWithFrame:CGRectMake(10, 10, self.bounds.size.width-20, self.bounds.size.height-60)];
[w setBackgroundColor:[UIColor clearColor]];
[w setOpaque:NO];
[self addSubview:w];
self.myWebView = w;
[w release];

And in the HTML:

body {
margin: 0;
padding: 0;
width: 220px;
background-color: transparent;
}

Hope that helps someone!

Monday, June 11, 2007

iPhone Application Development

Today was the opening day of the WWDC (worldwide developer's conference) for Apple and Stevie boy announced that 3rd party application development would be supported on the iPhone in the form of Web 2.0/AJAX applications running in Safari. They also announced the release of Safari for Windows.

All that I have heard in response to this news is how badly it sucks. I don't get it? May be I'm biased since that's mostly what we build - rich-internet applications and web 2.0 stuff - but I think this is a great step! What exactly do the nay sayers plan on creating for a phone anyway? Halo 5 mobile? Let's be real for a second. Probably the most valuable applications that you'll find on a phone are going to be data mashup type applications that a user can get a bit of info on, make a quick - and small - reaction to and get out. I never thought I would want to be editing excel spreadsheets on my phone. Anyone that does, I've got an idea for your portable spreadsheet work, it's called a laptop.

The form factor of a phone sized device must be strongly considered in the type of application that you build. I've had a Palm for as long as they've been around and I think I opened a Word document all of once on it. Never edited it. I think I was just seeing if it worked, actually. Same goes for my Blackberry. Can I open and edit documents - yes. Have I ever, no. May be I'm in the minority, but I don't think I am. The ability to send and receive email and attachments that are images and sound files seems to be more important for a phone device.

Lets make a few assumptions for a moment. Let's assume that it truly is a full version of Safari that is running on the iPhone. It has been stated that the OS is a FULL version of OS X on the device. Obviously, the interface elements that are in the desktop version are not on the phone nor are they required but the core kernel is - at least, that's what Steve Jobs said at the D:All things digital conference a few weeks ago. So, if it's a full version of Safari running on the Apple WebKit, then it should support plug-ins. If it supports plug-ins, it should support Flash. If that's the case, we can develop applications in Flash and Flex and deploy them to the iPhone! That's all we needed to hear. To extend that a bit, I read a lot of complaints about developing games for the phone. If it supports Flash, your golden. There's plenty of game content developed in Flash. If it truly supports all types of plug-ins, you could develop a game in Director or Unity and deploy it to those plug-ins as well.

Now, it would be nice to have a little icon on the phone like the other applications, but that's not going to keep us from developing for it. If a user has to bookmark my app to get to it, so be it. Maybe Apple can extend the concept they're starting with by embracing their own Widget model of development. The existing apps that come on the phone look as though they are identical to the Widget versions of applications on the desktop OS so it doesn't seem like it would be too far off to support that. Again, it would be leveraging AJAX and the Safari WebKit to do so.

This morning there was a lot of buzz on the announcements from Adobe and Apple. The Adobe boards were buzzing with 'wait till you hear the news from Apple' chatter. We were kind of thinking that the iPhone would somehow support installed applications with Adobe's new AIR (Apollo). It seemed like the timing on it was right and knowing how the .air files install into the AIR framework, it seemed like a possibility. There was no announcement from either Apple or Adobe though, so I guess that's not going to happen. But, it seems like if the assumptions from above hold true, it could possibly happen in the future. Now that would be cool! They could keep the iPhone system hooks to a minimum for security reasons and have an installation option for applications on the phone. That would probably be a really nice way to satisfy a decent amount of people and protect the phone's stability. We'll have to see I guess.

So, if the assumptions above hold true, and developing an application in Flex (or AJAX or Flash) and deploying it to an iPhone through Safari on the phone is possible, it sounds like it's time to scheme up a few nice little apps for the end of June!

Thursday, June 07, 2007

New iPhone Ads on SeeSpotSlide

Apple has release 4 new iPhone ads to the world for the iPhone release on June 29th. I really wish I wasn't locked in with Verizon at this time but the service is good and my Blackberry is OK... But, DAMMIT! I'm going to be really bummed when that phone comes out! I think we might get one at Knoware just to have it in house and play with the interface. That's one of the benefits to working at our company - these new solutions are part of our DNA. We need to see them for the GUI (graphic user interface), hold them for the TUI (tactile user interface), and hear or speak with them for the VUI (voice/sound user interface) so that we can understand, appreciate and debate the validity of the solution. I know, I know. You're thinking Huey, Dewey, and Lewy but that's what we call 'em and we're sticking to it ;)

So, we have 3 of the 4 ads currently available in SeeSpotSlide's advertising section. Until we're told by Apple to remove them - which I don't think we're doing anything wrong by having them available - have at it! We'll get the 4th one up there today.

technorati tags:, , ,