12

UIKit and AppKit still share a lot of concepts. Apple says:

AppKit contains all the objects you need to implement the user interface for a macOS app—windows, panels, buttons, menus, scrollers, and text fields

They also say that UIKit is used to implement the user interface:

UIKit provides the window and view architecture for implementing your interface

So what's the main difference between these two framework?

pkamb
  • 33,281
  • 23
  • 160
  • 191
Priti Kanauziya
  • 265
  • 1
  • 3
  • 13

4 Answers4

11

AppKit AppKit is included in the OS X SDK only. It provides all the classes and controls you need for creating Mac applications. Most of these classes share a common naming prefix starts with NS and classes you will be working with include - NSView, NSButton.

UIKit

UiKit is the framework that iOS uses to provide its UI and its classes start with a UI prefix. For example, both frameworks have a class to represent color include UIColor, while other concepts are pretty unique to UIKit, such as its use of predefined controllers such as UINavigationController and UITabBarController

HangarRash
  • 7,314
  • 5
  • 5
  • 32
Merry
  • 420
  • 4
  • 19
  • 4
    `NSString` and `NSObject` are not declared in `AppKit`, so they are kind of bad examples of "classes you will be working with". They are `Foundation` classes. – Sweeper Jul 25 '18 at 11:30
8

AppKit is much older and was developed for desktop machines, like Macintosh (Mac OS X) and (before that) NeXT.

UIKit is later, a deliberate reduction and rationalization of AppKit, developed for iPhones (iOS).

matt
  • 515,959
  • 87
  • 875
  • 1,141
4

AppKit is for MacOS[Cocoa] and UIKit is for iOS[Cocoa Touch]

1

They are the same UI framework except that UIKit's views and controllers were specifically made for touch, while the AppKit equivalents were specifically made for the mouse or non touch .