Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6210089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:05:57+00:00 2026-05-24T06:05:57+00:00

I have an iPad app and an iPhone app. I would like to join

  • 0

I have an iPad app and an iPhone app.

I would like to join them so that if the join app will run on the iPad it would have a behaviour and if it runs on the iPhone it will have another.

The first thing that i thought was to make different views and select the view for the iphone/ipad but i also have some things specific to the ipad and iphone (example : splitViewController) so only selecting a different view won’t help.

What is the best way to join 2 such apps ? i would like a more elegant method than doing something like

if(isIPhone)
{
// code for iphone

}
else if(isIPad)
{
// code for iPad

}

every time i have a difference between the 2 versions. Thanks!

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:05:58+00:00Added an answer on May 24, 2026 at 6:05 am

    I believe that the WWDC 2010 session videos include an iPad Development Overview that covers exactly this issue.

    Here’s the approach I’ve taken, according to Apple’s guidance:

    You can set platform-specific Main Interface nibs, which means you can set platform-specific app delegates as well. So you perhaps have a superclass app delegate that does all your app setup, then subclasses to deploy either an iPad UI or an iPhone UI.

    This is helpful since, on the iPad, split views need a traffic cop to determine what content goes where. Now you’ve got a spot to put that logic independent of the view controllers: in the app delegate.

    From there, any time there is a view controller that is common to both platforms but has some specific behavior for each, a view controller superclass is created that handles all common functionality. An iPad-specific subclass might then override the -refreshView: method to do some additional animation, or to add properties and delegate methods to support split views.

    While you can definitely test for iPad-ness with if else, this can get really gnarly in a view controller as you add delegate methods that only matter on one platform. By splitting it up this way, you get code that’s a lot easier to maintain and read. This can all mean a lot of refactoring of an existing project. In my case, though, it only took about an hour and the result is a very tidy app that’s easy to jump in and modify for one or both platforms.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPhone app and would like to create iPad version of it.
I have an ipad app and would like to make it run also on
I have an iPhone Application that I would like to port to the iPad.
I have an iPhone app that I would like to port over to the
I know that after I have deployed my ipad/iphone app into App Store, it
I have a few labels on my first Ipad App. How to make them
I would like to make a button in my iPad app (probably will be
I really would like to write an app or apps for iPhone / iPad.
I am developing an augmented reality iOS app (iPhone/iPad/iPod) and I would like to
I have an iPhone app that I want to change into an iPad app.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.