Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-18-2011, 06:15 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 77
tazboy is on a distinguished road
Default iPhone/iPod vs iPad vs OSX

I'm currently programming for iPhone. I've watched some videos on how to make that code work with the iPad without a lot of extra coding. Does that seem like a fair assessment? What about if I wanted to make a Mac app, could I reuse a lot of the same code from the iPhone app?
tazboy is offline   Reply With Quote
Old 11-18-2011, 06:19 PM   #2 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

If you follow the MVC pattern, yes. You'd just have the change the view since OSX controls are different from iOS and tweak the controller a little bit to work with the new controls.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.

New app - See screenshots and details at www.globaclock.com.

If you want to thank me, click the link. Every click counts. If you want to do more, buy my app. A link is available on my website. Thanks.
Domele is offline   Reply With Quote
Old 11-18-2011, 08:04 PM   #3 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by tazboy View Post
I'm currently programming for iPhone. I've watched some videos on how to make that code work with the iPad without a lot of extra coding. Does that seem like a fair assessment? What about if I wanted to make a Mac app, could I reuse a lot of the same code from the iPhone app?
Programmatically, and iPad really is a giant iPod touch, with a few extra controls added (split view controllers and popovers.) It's not hard at all to write "universal" apps that run on iPhones and iPads both, and adapt perfectly to each.

Mac OS is fairly different. There are no view controllers, for example. You work with windows and documents. Your document object tends to be the brains of your application. To get an idea of how different Mac OS is: If the class name starts with "UI", it doesn't exist in Mac OS.

The file system is nearly identical, the data structure classes are nearly identical. Core Animation is nearly identical at the layer level, but the way it interacts with windows and views is quite different.

Some of the lower level data and communications classes are different as well. NSURLConnection, for example, is a little different, and there is a class NSURLDownload in Mac OS that handles asynchronously downloading remote data directly to a file.

As the other poster said, if you follow the MVC design pattern, and carefully keep your user interface separate from the code that does the communications/data processing/file system, you can share good-sized chunks of your code between platforms. Expect to have to completely redesign the user interface, however.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Reply

Bookmarks

Tags
ipad, mac, osx

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 393
17 members and 376 guests
7twenty7, Alex-alex, Apptronics RBC, baja_yu, chiataytuday, dre, e2applets, ipodphone, jeroenkeij, leostc, matador1978, mbadegree, n00b, pbart, QuantumDoja, Retouchable, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,125
Posts: 402,910
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:28 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0