Skip to content

Shows how to use macOS AppKit Cocoa controls without StoryBoard only by programming code (objective-c)

License

Notifications You must be signed in to change notification settings

SoftwareWorks/ObjectiveCExemples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Objective-C Examples

Shows how to use macOS AppKit Cocoa controls without StoryBoard only by programming code (objective-c).

Hello World

"Hello World" The classic first application HelloWorld with NSTextField.

Application and messages

Application Shows how to create an Application with NSApplication.

Application with message loop Shows how to create your own message loop and dispatcher with NSEvent.

Common Controls

Button Shows how to create a Button and Event Click with NSButton.

CheckBox Shows how to create a CheckBox with NSButton.

ComboBox Shows how to create a ComboBox with NSComboBox.

Label Shows how to create a Label with NSTextField.

PictureBox Shows how to create a PictureBox with NSImageView.

ProgressBar Shows how to create a ProgressBar with NSProgressIndicator.

RadioButton Shows how to create a RadioButton with NSButton.

TextBox Shows how to create a TextBox with NSTextField.

TrackBar Shows how to create a TrackBar with NSSlider.

Containers

Form Shows how to create a Form with NSWndow.

GroupBox Shows how to create a GroupBox with NSBox.

Panel Shows how to create a Panel with NSScrollView.

TabControl Shows how to create a TabControl with TabPages with NSTabView and NSTabViewItem.

Menus and toolbars

MainMenu Shows how to create a MainMenu with NSMenu and NSMenuItem.

Components

Timer Shows how to create a Timer with NSTimer.

Dialogs

ColorDialog Shows how to create a ColorDialog with NSColorPanel.

FolderBrowserDialog Shows how to create a FolderBrowserDialog with NSOpenPanel.

FontDialog Shows how to create a FontDialog with NSFontPanel.

OpenFileDialog Shows how to create an OpenFileDialog with NSOpenPanel.

MessageBox Shows how to create a MessageBox with NSAlert.

SaveFileDialog Shows how to create an SaveFileDialog with NSSavePanel.

Other

ColoredTabPages Shows how to create a TabControl with colored TabPages with NSTabView, NSTabViewItem and NSColor.

Download

git clone https://github.com/gammasoft71/CocoaExamples CocoaExamples

Generate and build

To build this project, open "Terminal", go to your project folder and type following lines:

mkdir build
cd build
cmake .. -G "Xcode"
open ./CocoaExamples.xcodeproj

Remarks

This project run only on macOS with Xcode and CMake.

About

Shows how to use macOS AppKit Cocoa controls without StoryBoard only by programming code (objective-c)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 80.2%
  • CMake 19.8%