mirror of
https://github.com/zhigang1992/RubyMotion-PixateFreestyle.git
synced 2026-01-12 17:52:19 +08:00
added new example
This commit is contained in:
16
Examples/HelloWorld/.gitignore
vendored
Normal file
16
Examples/HelloWorld/.gitignore
vendored
Normal file
@@ -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
|
||||
8
Examples/HelloWorld/Gemfile
Normal file
8
Examples/HelloWorld/Gemfile
Normal file
@@ -0,0 +1,8 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rake'
|
||||
# Add your dependencies here:
|
||||
gem 'motion-pixate'
|
||||
|
||||
|
||||
|
||||
14
Examples/HelloWorld/Gemfile.lock
Normal file
14
Examples/HelloWorld/Gemfile.lock
Normal file
@@ -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
|
||||
19
Examples/HelloWorld/Rakefile
Normal file
19
Examples/HelloWorld/Rakefile
Normal file
@@ -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
|
||||
12
Examples/HelloWorld/app/app_delegate.rb
Normal file
12
Examples/HelloWorld/app/app_delegate.rb
Normal file
@@ -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
|
||||
12
Examples/HelloWorld/app/helloworld_controller.rb
Normal file
12
Examples/HelloWorld/app/helloworld_controller.rb
Normal file
@@ -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
|
||||
BIN
Examples/HelloWorld/resources/Default-568h@2x.png
Normal file
BIN
Examples/HelloWorld/resources/Default-568h@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
10
Examples/HelloWorld/resources/default.css
Normal file
10
Examples/HelloWorld/resources/default.css
Normal file
@@ -0,0 +1,10 @@
|
||||
button {
|
||||
text: Pixate Says Hello!;
|
||||
background-image: linear-gradient(blue, lightblue);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#myView {
|
||||
background-image: linear-gradient(white, gray);
|
||||
}
|
||||
|
||||
9
Examples/HelloWorld/spec/main_spec.rb
Normal file
9
Examples/HelloWorld/spec/main_spec.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
describe "Application 'HelloWorld'" do
|
||||
before do
|
||||
@app = UIApplication.sharedApplication
|
||||
end
|
||||
|
||||
it "has one window" do
|
||||
@app.windows.size.should == 1
|
||||
end
|
||||
end
|
||||
1
Examples/HelloWorld/vendor/PXEngine.framework
vendored
Symbolic link
1
Examples/HelloWorld/vendor/PXEngine.framework
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
/Users/pcolton/Library/Developer/Xcode/DerivedData/Pixate_Engine-cxbqfllitlqcspcaxewxldmpknhu/Build/Products/Debug-iphonesimulator/PXEngine.framework
|
||||
Reference in New Issue
Block a user