Your online searching blog. Find Blogging tricks and many more

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

Monday 30 January 2012

create-iphone-friendly-websites


10+ useful code snippets to develop iPhone friendly websites

 by Jean-Baptiste Jung70 Comments -
When developing websites, you have to care about different browsers, as well as mobile devices such as iPhones or iPods. In this article, let’s have a look at the 10+ most useful code snippets (Javascript, PHP, CSS, etc) for developing iPhone friendly websites, quickly and efficiently.

Detect iPhones and iPods using Javascript

When developing for the iPhone and the iPod Touch, the first thing we have to do is obviously detect it, so we can apply specific code or styles to it. The following code snippets will detect iPhones and iPods using Javascript, and redirect those users to an iPhone specific page.
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) {
window.location = "http://m.espn.go.com/wireless/?iphone&i=COMR";
}
}

Detect iPhones and iPods using PHP

Although the previous snippet works great, Javascript can be disabled on the iPhone. For this reason, you may prefer to use PHP in order to detect iPhones and iPods touch.
if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) {
header('Location: http://yoursite.com/iphone');
exit();
}

Set iPhone width as the viewport

How many times did you load a website in your iPhone and it just looked like a thumbnail? The reason of this is that the developer forgot to define the viewport (or didn’t know it existed). The width=device-width statement allows you to define the document width as being the same than the width of the iPhone screen. The two other statements are preventing the page from being scaled, which is useful if you’re developing an iPhone-only website. Otherwise, you can remove those statements.
Defining a viewport is easy: Just insert the following meta in the head section of your html document.
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">

Insert an iPhone specific icon

When a user adds your page to the home screen, the iPhone will automatically use a screenshot of your website as an icon. But you can provide your own icon, which is definitely better.
Defining a custom iPhone icon is easy: Simply paste the following in the head section of your html document. The image should be 57px by 57px in .png format. You do not need to add the shine or corners, as the iPhone will do that for you automatically.
<rel="apple-touch-icon" href="images/template/engage.png"/>

Prevent Safari from adjusting text size on rotate

When you rotate the iPhone, Safari adjust text size. If for some reason you’d like to prevent this effect, simply use the following CSS declaration. It has to be inserted in your CSS file.
The -webkit-text-size-adjust is a webkit-only CSS property that allow you to control text adjustment.
html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6 {
-webkit-text-size-adjust:none;
}

Detect iPhone orientation

Due to the fact that the iPhone allow its users to view a page in both portrait and landscape modes, you may need to be able to detect in which mode the document is being read.
This handy javascript function will detect the current iPhone orientation and will apply a specific CSS class so you can style it your way. Note that in this example, the CSS class is added to the page_wrapper ID. Replace it by the desired ID name (See line 24).
window.onload = function initialLoad() {
updateOrientation();
}

function updateOrientation(){
var contentType = "show_";
switch(window.orientation){
case 0:
contentType += "normal";
break;

case -90:
contentType += "right";
break;

case 90:
contentType += "left";
break;

case 180:
contentType += "flipped";
break;
}
document.getElementById("page_wrapper").setAttribute("class", contentType);
}

Apply CSS styles to iPhones/iPods only

Browser sniffing can be useful, but for many reasons it isn’t the best practice to detect a browser. If you’re looking for a cleaner way to apply CSS styles to the iPhone only, you should use th following. It has to be pasted on your regular CSS file.
@media screen and (max-device-width: 480px){
/* All iPhone only CSS goes here */
}

Automatically re-size images for iPhones

On recent websites, most images are above 480 pixels wide. Due to the iPhone small size, there’s a strong chance that images will break out of the wrapper area.
Using the following CSS code, you’ll be able to automatically re-size the website images to 100%. As the device max width is 480px, images will never be wider.
@media screen and (max-device-width: 480px){
img{
max-width:100%;
height:auto;
}
}

Hide toolbar by default

On a small screen such as the iPhone screen, a toolbar is useful but also wastes a lot of space. If you’d like to hide Safari toolbar by default when an iPhone visitor open your website, just implement the following javascript code.
window.addEventListener('load', function() {
setTimeout(scrollTo, 0, 0, 1);
}, false);

Make use of special links

Do you remember those “mailto” link that were very popular some years ago? This prefix automatically open the default email client used by the person who clicked on it. The iPhone has introduced two similar prefixes, tel and sms, which allows the person who clicked on it to phone or text automatically.
I’m definitely not a fan of those, but maybe that will be useful to you. The only thing you have to do to implement this, is to paste the following anywhere on your html page.
<a href="tel:12345678900">Call me</a>
<a href="sms:12345678900">Send me a text</a>

Simulate :hover pseudo class

As no one is using a mouse on the iPhone, the :hover CSS pseudo class isn’t used. Though, using some Javascript you can simulate the :hover pseudo class when the user will have his finger on a link.
var myLinks = document.getElementsByTagName('a');
for(var i = 0; i < myLinks.length; i++){
myLinks[i].addEventListener('touchstart', function(){this.className = "hover";}, false);
myLinks[i].addEventListener('touchend', function(){this.className = "";}, false);
}
Once you added the code above to your document, you can start css styling:
a:hover, a.hover {
/* whatever your hover effect is */
}

Tuesday 24 January 2012

iphone-video-apps-for-iphone-free-download-from-itunes


Video Apps

  1. Video Downloader iWoopie Lit 
    iWoopie Lite can search global video portals (Youtube/DailyMotion and match more), watch and download videos to your iPhone.
    iwoopie 30 Best Free iPhone 3G Photo & Video Applications 
  2. Wiki Tap 
    WikiTap uses special tools geared towards phone-centred community participation. Community members upload relevant videos, pictures and audio-commentaries into the larger knowledge community.
    wiki tap 30 Best Free iPhone 3G Photo & Video Applications 
  3. 12seconds.tv 
    The 12seconds iPhone application allows you to create and post fun slideshows on the go!
    12seconds 30 Best Free iPhone 3G Photo & Video Applications 
  4. Comcast Mobile App 
    The Comcast Mobile App is an iPhone app from Comcast Cable Communications that lets you read your email, check your digital voice mail and get TV and Movie information on your iPhone.
    comcast mobile 30 Best Free iPhone 3G Photo & Video Applications 
  5. Joost 
    Watch over 46000 videos from Joost on your iPhone or iPod touch with this free app Store app download from Joost.
    Joost 30 Best Free iPhone 3G Photo & Video Applications 
  6. AppVee 
    AppVee is the largest and most extensive resource for professional, high-quality video reviews of iPhone applications.
    appvee 30 Best Free iPhone 3G Photo & Video Applications 
  7. Air Video Free 
    Air Video Free is a fully functional ad-supported application that allows you to stream videos to your iPhone over Wi-Fi. You don’t need to copy the videos to the device.
    air video free 30 Best Free iPhone 3G Photo & Video Applications 
  8. Air Cam Live Video (Lite) 
    Air Cam Live Video for the iPhone is a great application for viewing your live webcam feeds over local, Wi-Fi or 3G and EDGE networks.
    air cam live video 30 Best Free iPhone 3G Photo & Video Applications 
  9. Pixelpipe 
    Liberate your media with Pixelpipe and get your photos off of your iPhone and out to your favorite social network, micro-blog, photo/video and blog services. Video uploads from the 3GS at original resolution up to 200MB.
    pixelpipe 30 Best Free iPhone 3G Photo & Video Applications 
  10. CNNMoney (News, Stock, Video) 
    CNNMoney iPhone application delivers breaking business news and comprehensive market coverage from the leader in business and financial news. The application includes news, analysis, financial data and original video content.
    CNNMoney 30 Best Free iPhone 3G Photo & Video Applications

iphone-photography-apps-free-download-from-itunes


Photography Apps

  1. Free Photo Filters 
    Free photo filters app provides filters include Lomography Filter, Poloarizing Filter, Black and White Filter, Retro Effect Filter and more.
    free photo filters 30 Best Free iPhone 3G Photo & Video Applications 
  2. SP Photo Fix Lite 
    You can fix your photo (brightness, contrast, sharpness, hue, saturation) before sending it by email directly on your iPhone.
    sp photo fix lite 30 Best Free iPhone 3G Photo & Video Applications 
  3. PhotoBox 
    PhotoBox is the all in one solution for the weekend warrior photographer, giving you a large range of photo filters and effects.
    photoBox 30 Best Free iPhone 3G Photo & Video Applications 
  4. iRetouch Lite 
    iRetouch List is an advanced image retouching application for iPhone.
    iretouch lite 30 Best Free iPhone 3G Photo & Video Applications 
  5. Photonasis 4.0 Lite 
    Photonasis is the must have program for anyone who’s into photography and wants to add very nice touches into his/her photos.
    photonasis 30 Best Free iPhone 3G Photo & Video Applications 
  6. PhotoCurves 
    PhotoCurves enables you to create your own filers: tones and contrast.
    PhotoCurves 30 Best Free iPhone 3G Photo & Video Applications 
  7. Crop for Free 
    Crop for Free is an utilities for your iPhone to crop your photos, retains image quality, rotate your photos and ability to crop multiple times before saving.
    cropforfree 30 Best Free iPhone 3G Photo & Video Applications 
  8. Photon 
    Photon allows your entire photo and video collection securely stored in the cloud and available on your iphone with musical slide shows and editing tools.
    photon 30 Best Free iPhone 3G Photo & Video Applications 
  9. Puri! Lite 
    Puri! Lite is a photo sticker booth that you canbring with you everywhere. With the latest update, you can show off your great photos to your friends on Facebook with a click of a button!
    puri 30 Best Free iPhone 3G Photo & Video Applications 
  10. Real Cam LE 
    Control your iPhone camera with built-in screen touches. Everything you need to control and set up your camera is in the same live preview screen.
    real cam le 30 Best Free iPhone 3G Photo & Video Applications 
  11. Polarize 
    Want to add a funky retro look to your photos? Polarize will do the job for you!
    polarize 30 Best Free iPhone 3G Photo & Video Applications 
  12. AA+ Shake Pic Lite 
    Shake your device to open Pandora’s box, in simply 2 steps and see what amazing outcome you’ll get.
    AA Shake 30 Best Free iPhone 3G Photo & Video Applications 
  13. iSwap Faces 
    iSwap Faces morphs one person into another for everyone’s entertainment.
    iswap faces 30 Best Free iPhone 3G Photo & Video Applications 
  14. SP Photo Cal Lite 
    The easy way to create a calendar for your iPhone wallpaper, using pictures from the Picture Library.
    sp photo cal lite 30 Best Free iPhone 3G Photo & Video Applications 
  15. Comic Touch Lite 
    Make your photos come alive by giving them the Comic Touch. Add balloon to give your subjects thoughts and words
    comic touch lite 30 Best Free iPhone 3G Photo & Video Applications 
  16. iFunto Lite 
    With your photograph, iFunto will merge it with fun and interesting background and you will not be able to stop laughing.
    ifunto 30 Best Free iPhone 3G Photo & Video Applications 
  17. BeamCatcher 
    BeamCatcher is the free app that lets your friends and family wirelessly share photos with you.
    beam catcher 30 Best Free iPhone 3G Photo & Video Applications 
  18. Private Pics 
    The perfect application for anyone who wants to keep people from accidentally seeing their private pictures.
    private pics 30 Best Free iPhone 3G Photo & Video Applications 
  19. Rotzy Photo Sharing 
    Rotzy helps you share and discuss everything around you through photos and send photos to Twitter, Facebook, Thumblr and your own website. You can even use it to create your own mobile photo blog!
    rotzy photo sharing 30 Best Free iPhone 3G Photo & Video Applications 
  20. AroundShare 
    AroundShare integrates with your existing blogs, social networking sites and tools like RSS, Flickr, Twitter, WordPress blogs, Google maps and more.
    aroundshare 30 Best Free iPhone 3G Photo & Video Applications