Skip to content

A framework for developing games for iOS Today Extensions (widgets) with SpriteKit.

License

Notifications You must be signed in to change notification settings

Felizolinha/WidGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WidGame

WidGame is an easy way to use SpriteKit for devoloping your own iOS Widgets games.

Features

  • Easily use SpriteKit on your widget

  • Easily change your widget view expandability status("Show More" and "Show Less") and height

  • Easily detect widget events from your scene

Usage

Inherit your Scene from WGScene

public class YourScene: WGScene { }

Inherit your Widget View Controller to WGViewController

public class YourWidgetViewController: WGViewController { }

Presenting your initial scene

public func presentInitialScene() {
    //Override this method to show your first scene
}

Adapt your scene to expandability of your widget view

func widgetActiveDisplayModeDidChange(_ activeDisplayMode: NCWidgetDisplayMode, withMaximumSize maxSize: CGSize) {
    //Add code for when your view change it expandability status
    
    //Don't forget to call super.widgetActiveDisplayModeDidChange(activeDisplayMode, withMaximumSize: maxSize) on your code!
}
func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { 
     //Add code for when your view will change it expandability status
        
    //Don't forget to call super.viewWillTransition(to: size, with: coordinator) on your code!
}

Download this project to see an example of the framework working

See the Documentation for more info on how to use the classes and methods.

About

A framework for developing games for iOS Today Extensions (widgets) with SpriteKit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published