Can I Disable Functions If Its iPhone 5?

Discussion in 'iOS Programming' started by loon3y, Oct 15, 2012.

  1. loon3y, Oct 15, 2012
    Last edited: Oct 15, 2012

    loon3y macrumors 65816


    Oct 21, 2011
    basically, i have this problem for the new version of my app.

    basically before, on my view controller for the iphone 4 version i had a product name and short description on a "custom bar", and when u tapped it it brought the bar up and it brought up a "long html description".

    now since the iphone 5 came out, theres extra real estate, so theres no need for that function, i can just have the "long description" just appear.

    heres some screen shots


    but i need to disable the tap function for iphone 5's only. is this possible? in anyway shape or form?
  2. Reason077 macrumors 68020


    Aug 14, 2007
    Just check how much height your view has available, and make your decision based on that. This approach is more robust than identifying the device model. For example:

    CGRect bounds = self.view.window.bounds;
    if (bounds.size.height <= 480) {
      // ... enable "tap to view long description" feature ...

Share This Page