Monthly Archives: June 2011

Introducing Universal Applications for iPhone OS


With the introduction of iPad, iPhone SDK 3.2 now supports development of three types
of applications: iPhone apps, iPad apps and Universal apps.
• iPhone Applications. iPhone applications are optimized to run on iPhone and iPod
touch. These applications run on iPad in their original resolution or can be optionally
set to be pixel- doubled to accommodate for the larger display.
• iPad Applications. iPhone SDK 3.2 supports the development of iPad applications
that are optimized to take advantage of iPad features, but run only on iPad.
• Universal Applications. iPhone SDK 3.2 supports the development of Universal
applications. A Universal app is optimized to run on all iPhone OS devices—itʼs
essentially an iPhone app and an iPad app built as a single binary.
This document covers the guidelines you should follow to create well-designed
Universal applications.
A Universal app can determine which device itʼs running on and provide the best
experience for that device. Well-designed Universal apps leverage a deviceʼs unique
hardware features, provide the right choice of user interface elements, and use only the
functionality that is supported by that device.
Apple recommends that iPhone OS developers design, code and build their applications
as Universal applications. Building apps as Universal apps makes it easier for everyone.
Itʼs easier for developers because thereʼs only one app to manage on the App Store.
Itʼs easier for users because theyʼll know that it runs on any device they own

Read More

1 Comment

Posted by on June 30, 2011 in iPhone


iOS Sample Code

Sample Code

Study sample code for implementation examples of iOS features. Each sample code project is build-able and executable source example of how to accomplish a task for a specific technology. They show the correct sequence of calls and parameter data types to provide a generalized method for API use that developers can modify for their specific needs.

Click here for Sample Code.

Leave a comment

Posted by on June 30, 2011 in iPhone


iOS 5 for Developers

iOS 5, the latest version of the world’s most advanced mobile operating system, includes over 200 new user features, and an updated SDK with over 1,500 new APIs and powerful new development tools. Start developing today to take advantage of iCloud Storage, Newsstand Kit, Core Image, GLKit, Twitter and new Game Center APIs.

Click here for More detail

Leave a comment

Posted by on June 30, 2011 in iPhone


Apple iOS 5 new features

Notification Center

All your alerts. All in one place.

You get all kinds of notifications on your iOS device: new email, texts, friend requests, and more. With Notification Center, you can keep track of them all in one convenient location. Just swipe down from the top of any screen to enter Notification Center. Choose which notifications you want to see. Even see a stock ticker and the current weather. New notifications appear briefly at the top of your screen, without interrupting what you’re doing. And the Lock screen displays notifications so you can act on them with just a swipe. Notification Center is the best way to stay on top of your life’s breaking news.


A custom newsstand for all your subscriptions.

Read all about it. All in one place. iOS 5 organizes your magazine and newspaper app subscriptions in Newsstand: a folder that lets you access your favorite publications quickly and easily. There’s also a new place on the App Store just for newspaper and magazine subscriptions. And you can get to it straight from Newsstand. New purchases go directly to your Newsstand folder. Then, as new issues become available, Newsstand automatically updates them in the background — complete with the latest covers. It’s kind of like having the paper delivered to your front door. Only better.

Read More

Leave a comment

Posted by on June 30, 2011 in iPhone


drag and drop with html5


  var eat = ['yum!', 'gulp', 'burp!', 'nom'];
  var yum = document.createElement('p');
  var msie = /*@cc_on!@*/0; = 1;

  var links = document.querySelectorAll('li > a'), el = null;
  for (var i = 0; i < links.length; i++) {
    el = links[i];

    el.setAttribute('draggable', 'true');

    addEvent(el, 'dragstart', function (e) {
      e.dataTransfer.effectAllowed = 'copy'; // only dropEffect='copy' will be dropable
      e.dataTransfer.setData('Text',; // required otherwise doesn't work

  var bin = document.querySelector('#bin');

  addEvent(bin, 'dragover', function (e) {
    if (e.preventDefault) e.preventDefault(); // allows us to drop
    this.className = 'over';
    e.dataTransfer.dropEffect = 'copy';
    return false;

  // to get IE to work
  addEvent(bin, 'dragenter', function (e) {
    this.className = 'over';
    return false;

  addEvent(bin, 'dragleave', function () {
    this.className = '';

  addEvent(bin, 'drop', function (e) {
    if (e.stopPropagation) e.stopPropagation(); // stops the browser from redirecting...why???

    var el = document.getElementById(e.dataTransfer.getData('Text'));


    // stupid nom text + fade effect
    bin.className = '';
    yum.innerHTML = eat[parseInt(Math.random() * eat.length)];

    var y = yum.cloneNode(true);

    setTimeout(function () {
      var t = setInterval(function () {
        if ( <= 0) {
          if (msie) { // don't bother with the animation
   = 'none';
        } else {
 -= 0.1;
      }, 50);
    }, 250);

    return false;


Leave a comment

Posted by on June 27, 2011 in HTML 5


Progress bar with html5

Let’s start with a substrate, which will be filled with progress. We are going to round the angles of the rectangle with the help of arc () function, so in this case the rectangle will always be rounded at the angles in a way of semicircles. To create an arbitrary rounding (as when using a border-radius) it is sufficient to use two Bezier curves (Bezier and quadratic curves) and direct interval between them (degenerating to a point in a semicircle, as in our case). Thus, the function of creation of the substrate’s filled outline will look in the following way:

function roundRect(ctx, x, y, width, height, radius) {
    ctx.moveTo(x + radius, y);
    ctx.lineTo(x + width - radius, y);
    ctx.arc(x+width-radius, y+radius, radius, -Math.PI/2, Math.PI/2, false);
    ctx.lineTo(x + radius, y + height);
    ctx.arc(x+radius, y+radius, radius, Math.PI/2, 3*Math.PI/2, false);

Then we add shadows and volume to the substrate. Create volume using a linear gradient with three stops, the shadows – with the standard properties of the context:

function progressLayerRect(ctx, x, y, width, height, radius) {;
    // Define the shadows
    ctx.shadowOffsetX = 2;
    ctx.shadowOffsetY = 2;
    ctx.shadowBlur = 5;
    ctx.shadowColor = '#666';
     // first grey layer
    ctx.fillStyle = 'rgba(189,189,189,1)';
    roundRect(ctx, x, y, width, height, radius);
    // second layer with gradient
    // remove the shadow
    ctx.shadowColor = 'rgba(0,0,0,0)';
    var lingrad = ctx.createLinearGradient(0,y+height,0,0);
    lingrad.addColorStop(0, 'rgba(255,255,255, 0.1)');
    lingrad.addColorStop(0.4, 'rgba(255,255,255, 0.7)');
    lingrad.addColorStop(1, 'rgba(255,255,255,0.4)');
    ctx.fillStyle = lingrad;
    roundRect(ctx, x, y, width, height, radius);

Two layers are being used here – the lower solid gray and the top white with gradients of transparency. In my opinion it provides more precise boundaries of the substrate and looks more realistic, in any case you can always experiment with all the color settings.

Read More

Leave a comment

Posted by on June 27, 2011 in HTML 5


geolocation with html5

The Geolocation API provides a method to locate the user’s exact (more or less – see below) position. This is useful in a number of ways ranging from providing a user with location specific information to providing route navigation.

Although it’s not actually part of the HTML5 specification, as it was developed as a separate specification by the W3C, rather than the WHATWG, if the esteemed HTML5 Doctors Remy Sharp and Bruce Lawson felt it was fitting enough to include in their book, then it’s perfectly ok to write about it here.

The API is actually remarkably simple to use and this article aims to introduce the API and show just how easy it is.


Browser Compatibility

Currently the W3C Geolocation API is supported by the following desktop browsers:

  • Firefox 3.5+
  • Chrome 5.0+
  • Safari 5.0+
  • Opera 10.60+
  • Internet Explorer 9.0+

There is also support for the W3C Geolocation API on mobile devices:

  • Android 2.0+
  • iPhone 3.0+
  • Opera Mobile 10.1+
  • Symbian (S60 3rd & 5th generation)
  • Blackberry OS 6
  • Maemo

Read More


Leave a comment

Posted by on June 26, 2011 in HTML 5