Samples
Samples
TicTacToe
Language: Oxygene, Platform: Toffee, Category: UIKit
https://github.com/remobjects/ElementsSamples/tree/master/Oxygene/Toffee/UIKit/TicTacToe
-
TicTacToe
-
References
- CoreGraphics
- Foundation
- GameKit
- libToffee
- UIKit
- rtl
- Source Files
-
Other Files
- Resources\Game Images\Grid@2x.png
- Resources\Game Images\Grid.png
- Resources\Game Images\Paper@2x.png
- Resources\Game Images\Paper.png
- Resources\Game Images\O1.png
- Resources\Game Images\O1@2x.png
- Resources\Game Images\X1@2x.png
- Resources\Game Images\X1.png
- Resources\Game Images\O2@2x.png
- Resources\Game Images\O2.png
- Resources\Game Images\O3@2x.png
- Resources\Game Images\O3.png
- Resources\Game Images\O4@2x.png
- Resources\Game Images\O4.png
- Resources\Game Images\O5@2x.png
- Resources\Game Images\O5.png
- Resources\Game Images\X2@2x.png
- Resources\Game Images\X2.png
- Resources\Game Images\X3@2x.png
- Resources\Game Images\X3.png
- Resources\Game Images\X4@2x.png
- Resources\Game Images\X4.png
- Resources\Game Images\X5@2x.png
- Resources\Game Images\X5.png
- Resources\Info.plist
- Resources\App Icons\App-29.png
- Resources\App Icons\App-57.png
- Resources\App Icons\App-58.png
- Resources\App Icons\App-96.png
- Resources\App Icons\App-114.png
- Resources\App Icons\App-512.png
- Resources\App Icons\App-1024.png
- Resources\Launch Images\Default.png
- Resources\Launch Images\Default@2x.png
- Resources\Launch Images\Default-568h@2x.png
- RootViewController~iphone.xib
-
References
AppDelegate.pas
namespace TicTacToe;
interface
uses
GameKit,
UIKit;
type
[IBObject]
AppDelegate = class(IUIApplicationDelegate)
private
public
property window: UIWindow;
method application(application: UIApplication) didFinishLaunchingWithOptions(launchOptions: NSDictionary): Boolean;
method applicationWillResignActive(application: UIApplication);
method applicationDidEnterBackground(application: UIApplication);
method applicationWillEnterForeground(application: UIApplication);
method applicationDidBecomeActive(application: UIApplication);
method applicationWillTerminate(application: UIApplication);
method authenticateLocalPlayer;
end;
implementation
method AppDelegate.application(application: UIApplication) didFinishLaunchingWithOptions(launchOptions: NSDictionary): Boolean;
begin
window := new UIWindow withFrame(UIScreen.mainScreen.bounds);
var n := new UINavigationController withRootViewController(new RootViewController);
n.navigationBar.tintColor := UIColor.darkGrayColor;
window.rootViewController := n;
window.makeKeyAndVisible;
result := true;
end;
method AppDelegate.authenticateLocalPlayer;
begin
end;
method AppDelegate.applicationWillResignActive(application: UIApplication);
begin
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
end;
method AppDelegate.applicationDidEnterBackground(application: UIApplication);
begin
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
end;
method AppDelegate.applicationWillEnterForeground(application: UIApplication);
begin
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
end;
method AppDelegate.applicationDidBecomeActive(application: UIApplication);
begin
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
end;
method AppDelegate.applicationWillTerminate(application: UIApplication);
begin
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
end;
end.
