Objective C question

Discussion in 'Mac Programming' started by farmerdoug, Sep 14, 2012.

  1. farmerdoug macrumors 6502a

    Joined:
    Sep 16, 2008
    #1
    I hope to eventually develop an Iphone app. In order to do so, I have some image processing issues to resolve. I would like to do it in Objective C without the Iphone overlay. However, the include files (UIImage.h and UIKit.h) I need (and the objects as well) do not seem to be universally available. What Xcode project can I use with these that will just run on a MAC and not have an iPhone overlay.

    Thanks
     
  2. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #2
    What do you mean by iPhone overlay ?

    UIImage and UIKit are included in the UIKit framework. You need to include that in your project to use these files :

    Screen Shot 2012-09-14 at 7.27.14 PM.png

    Every template for iOS applications will include these by default though.
     
  3. farmerdoug thread starter macrumors 6502a

    Joined:
    Sep 16, 2008
    #3
    I found (could be wrong) that I could only include UIKit or UIimage if I started an Xcode iOS project not an OS project. I don't want to be running the iOS simulator while I develop and debug this code.

    My kid has told me that I have to.
     
  4. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #4
    Oh, UIKit is not available for OS X, which uses AppKit. All UIKit code must be run through the iOS simulator or on a iOS device.

    You can work on a project using NSImage which is similar to UIImage. It's not a 1:1 translation, but the classes do share quite a few similarities. In the end though, OS X code can't really straight compile for iOS or vice versa.
     
  5. farmerdoug thread starter macrumors 6502a

    Joined:
    Sep 16, 2008
    #5
    Thanks.
    I would have responded earlier but did not get a notification. I'll look into NSImage before I bug you again.
     

Share This Page