From 821c418936db2ae98eafff90f9992de843ffbc6e Mon Sep 17 00:00:00 2001 From: Paul Colton Date: Wed, 4 Sep 2013 11:31:05 -0700 Subject: [PATCH] added new example --- Examples/HelloWorld/.gitignore | 16 +++++++++++++++ Examples/HelloWorld/Gemfile | 8 ++++++++ Examples/HelloWorld/Gemfile.lock | 14 +++++++++++++ Examples/HelloWorld/Rakefile | 19 ++++++++++++++++++ Examples/HelloWorld/app/app_delegate.rb | 12 +++++++++++ .../HelloWorld/app/helloworld_controller.rb | 12 +++++++++++ .../HelloWorld/resources/Default-568h@2x.png | Bin 0 -> 1659 bytes Examples/HelloWorld/resources/default.css | 10 +++++++++ Examples/HelloWorld/spec/main_spec.rb | 9 +++++++++ Examples/HelloWorld/vendor/PXEngine.framework | 1 + 10 files changed, 101 insertions(+) create mode 100644 Examples/HelloWorld/.gitignore create mode 100644 Examples/HelloWorld/Gemfile create mode 100644 Examples/HelloWorld/Gemfile.lock create mode 100644 Examples/HelloWorld/Rakefile create mode 100644 Examples/HelloWorld/app/app_delegate.rb create mode 100644 Examples/HelloWorld/app/helloworld_controller.rb create mode 100644 Examples/HelloWorld/resources/Default-568h@2x.png create mode 100644 Examples/HelloWorld/resources/default.css create mode 100644 Examples/HelloWorld/spec/main_spec.rb create mode 120000 Examples/HelloWorld/vendor/PXEngine.framework diff --git a/Examples/HelloWorld/.gitignore b/Examples/HelloWorld/.gitignore new file mode 100644 index 0000000..c357662 --- /dev/null +++ b/Examples/HelloWorld/.gitignore @@ -0,0 +1,16 @@ +.repl_history +build +tags +app/pixate_code.rb +resources/*.nib +resources/*.momd +resources/*.storyboardc +.DS_Store +nbproject +.redcar +#*# +*~ +*.sw[po] +.eprj +.sass-cache +.idea diff --git a/Examples/HelloWorld/Gemfile b/Examples/HelloWorld/Gemfile new file mode 100644 index 0000000..c638d64 --- /dev/null +++ b/Examples/HelloWorld/Gemfile @@ -0,0 +1,8 @@ +source 'https://rubygems.org' + +gem 'rake' +# Add your dependencies here: +gem 'motion-pixate' + + + diff --git a/Examples/HelloWorld/Gemfile.lock b/Examples/HelloWorld/Gemfile.lock new file mode 100644 index 0000000..bb597d8 --- /dev/null +++ b/Examples/HelloWorld/Gemfile.lock @@ -0,0 +1,14 @@ +GEM + remote: https://rubygems.org/ + specs: + motion-pixate (1.3) + sass + rake (10.1.0) + sass (3.2.10) + +PLATFORMS + ruby + +DEPENDENCIES + motion-pixate + rake diff --git a/Examples/HelloWorld/Rakefile b/Examples/HelloWorld/Rakefile new file mode 100644 index 0000000..eea8447 --- /dev/null +++ b/Examples/HelloWorld/Rakefile @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +$:.unshift("/Library/RubyMotion/lib") +require 'motion/project/template/ios' +require 'rubygems' +require 'motion-pixate' + +begin + require 'bundler' + Bundler.require +rescue LoadError +end + +Motion::Project::App.setup do |app| + # Use `rake config' to see complete project settings. + app.name = 'HelloWorld' + app.pixate.key = 'KEY CODE' + app.pixate.user = 'USER ID' + app.pixate.framework = 'vendor/PXEngine.framework' +end diff --git a/Examples/HelloWorld/app/app_delegate.rb b/Examples/HelloWorld/app/app_delegate.rb new file mode 100644 index 0000000..9723e13 --- /dev/null +++ b/Examples/HelloWorld/app/app_delegate.rb @@ -0,0 +1,12 @@ +class AppDelegate + def application(application, didFinishLaunchingWithOptions:launchOptions) + + @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) + @window.rootViewController = HelloWorldController.alloc.init + @window.rootViewController.wantsFullScreenLayout = true + @window.styleMode = PXStylingNormal + @window.makeKeyAndVisible + + true + end +end diff --git a/Examples/HelloWorld/app/helloworld_controller.rb b/Examples/HelloWorld/app/helloworld_controller.rb new file mode 100644 index 0000000..b8d4a81 --- /dev/null +++ b/Examples/HelloWorld/app/helloworld_controller.rb @@ -0,0 +1,12 @@ +class HelloWorldController < UIViewController + + def viewDidLoad + margin = 20 + + @button = UIButton.buttonWithType(UIButtonTypeCustom) + @button.frame = [[margin, 260], [view.frame.size.width - margin * 2, 40]] + view.addSubview(@button) + view.styleId = "myView" + end + +end diff --git a/Examples/HelloWorld/resources/Default-568h@2x.png b/Examples/HelloWorld/resources/Default-568h@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..87de5551f28d702ff56eb369de697e446f20d1f5 GIT binary patch literal 1659 zcmeHGJ#W)M7{0a$p^A!ye^!?p?2?o9{Ju2JSj%#!f?2i-L9yc6seCVmZw6hJj zGEE4Cl)EqskD^q|bZMfi2|ITq2~HsVP?s)}>ex+KV+n<285cZUA+S=CNeQbZ^&V6( z!H6gbZx#sF%9|P{aC#&WE%AF=%cxIdiI*-7IFB`ihQpyeEXpkDBciG*!U|H9f5TzS41%swu62v@U5zH0cE<5JBBr?4yA&lp;Q95mtXc)@e7!eugCCz}g{cmU( z&e17v(aU`QDx5l_n4%U<*>U2D!Sy!sP_b4^sLNU6Fm^QSVspSaO9w25wRTx1(008b z$~_Z?ZEIGPayRm*W$2R7kb}V2aJ^VGcGapuDrG`UrCO|*Mp3C&@LsW6GVzRSFz+~| z5ub7WORl<*n=eBci^v8|f~VB4CoF`MqP1XgE|rCPQ?9=_m(7J-B$7e-X#W`X%q8|G zH|L8h9`n_wk=XY{EcV;yzs|&`xZXT)OmUx|pTGX}>WlbypDkn8$