Wednesday 31 October 2012

How to check Device is iphone 4 or iphone 5

  float height = [UIScreen mainScreen].bounds.size.height;
   
    if (height==568) {
        self.deviceType = 5;
    }
    else
    {
        self.deviceType = 4;
    }

3 comments:

  1. I have read your code for checking device is iPhone 4 or iPhone 5 that is very good job to post this kind of information but i have best code to check the device so thanks for sharing this information.

    iPhone App Development

    ReplyDelete
  2. --------------------------------
    That's interesting! Can you please share more about it? Thank you.

    -------------------------------
    iPhone 5 App Development And
    iPad Application Developer

    ReplyDelete