Skip to content
SwiftGUI is an experimental API inspired by SwiftUI declarative code, using Immediate Mode GUI (Dear ImGui) and running on OSX and iOS.
Swift Objective-C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Demos version 0.3 Nov 13, 2019
Docs version 0.3 Nov 13, 2019
SwiftGui-Core
SwiftGui-PlatformOSX version 0.3 Nov 13, 2019
SwiftGui-PlatformiOS version 0.3 Nov 13, 2019
SwiftGui.xcworkspace adding features, fixing bugs and new todo sample Nov 9, 2019
SwiftGui version 0.3 Nov 13, 2019
.gitattributes ling attri Nov 5, 2019
.gitignore first version Nov 3, 2019
LICENSE first version Nov 3, 2019
README.md version 0.3 Nov 13, 2019
swiftgui.png adjusting readme Nov 5, 2019

README.md

SwiftGUI (Dear ImGui + SwiftUI inspired API)

license swift version Carthage Compatible

SwiftGUI is an experimental API inspired by SwiftUI declarative code, using Dear ImGui and running on OSX and iOS.

Hello world

Window("SwiftGUI") {

    Text("Hello world!")
    
    HStack {
        RadioButtonGroup(["radio a", "radio b", "radio c"],
                         selectedState: radioState) {
            self.radioState = $0
        }
    }
    
    HStack {
        ForEach(1...7) { val in
            Button("Click \(val)")
        }
    }
}

Carthage

Carthage is intended to be the simplest way to add frameworks to your Cocoa application. Builds your dependencies and provides you with binary frameworks, but you retain full control over your project structure and setup. Carthage does not automatically modify your project files or your build settings.

To integrate SwiftGUI into your Xcode project using Carthage, specify it in your Cartfile:

github "erickjung/SwiftGUI" "0.3.0"

For OSX project, run:

carthage update --platform macOS

For iOS project, run:

carthage update --platform iOS

Features

Theme support

- Color scheme (embedded Darcula and Light)
- Custom Fonts (embedded FiraCode and DroidSans)

Widgets

- Buttons
- CheckBox
- Color Selection
- ComboBox
- Drag
- Image
- InputFields
- Lists
- Menu
- Plotting
- Popup
- RadioButton
- Sliders
- Texts
- Tooltips
- Tree
- Window
- General 
    - Group
    - HStack
    - Separator/NewLine/Spacing/Indent
    - ForEach
    - Perform

Projects

  • SwiftGUI-Core: Internal framework abstraction for cimgui
  • SwiftGUI-PlatformiOS: Specific iOS renderer/handler code
  • SwiftGUI-PlatformOSX: Specific OSX renderer/handler code
  • SwiftGUI: The SwiftUI inspired API code
  • Demos: Samples for OSX and iOS
    • Sample01-OSX: General app to show how widgets works
    • Sample02-OSX: Simple functional TODO app
    • Sample01-iOS: General app to show how widgets works

Samples

Sample01 (OSX)

screenshot01

Sample 02 (OSX) - Simple TODO application

screenshot02

Screenshot 01 (iOS)

screenshotios

License

  • MIT

Uses

You can’t perform that action at this time.