-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
215 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# A sample Gemfile | ||
source "https://rubygems.org" | ||
gem 'rubymotion_generators' | ||
# gem "rails" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
rubymotion_generators (0.1.0) | ||
thor (~> 0.15) | ||
thor (0.18.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
rubymotion_generators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
$:.unshift("/Library/RubyMotion/lib") | ||
require 'motion/project' | ||
require 'bundler' | ||
|
||
Bundler.require | ||
|
||
Motion::Project::App.setup do |app| | ||
# Use `rake config' to see complete project settings. | ||
app.name = 'navbarissue' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
class AppDelegate | ||
def application(application, didFinishLaunchingWithOptions:launchOptions) | ||
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | ||
tabbar = UITabBarController.alloc.init | ||
first_view_controller = FirstViewController.alloc.init | ||
second_view_controller = SecondViewController.alloc.init | ||
tabbar.viewControllers = [first_view_controller, second_view_controller] | ||
tabbar.title = NSBundle.mainBundle.infoDictionary["CFBundleName"] | ||
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(tabbar) | ||
@window.makeKeyAndVisible | ||
true | ||
end | ||
|
||
def applicationWillResignActive(application) | ||
# 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 | ||
|
||
def applicationDidEnterBackground(application) | ||
# 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 | ||
|
||
def applicationWillEnterForeground(application) | ||
# 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 | ||
|
||
def applicationDidBecomeActive(application) | ||
# 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 | ||
|
||
def applicationWillTerminate(application) | ||
# Called when the application is about to terminate. Save data if appropriate. See also | ||
# applicationDidEnterBackground | ||
end | ||
|
||
=begin | ||
# Optional UITabBarControllerDelegate method. | ||
def tabBarController(tabBarController, didSelectViewController:viewController) | ||
end | ||
=end | ||
|
||
=begin | ||
# Optional UITabBarControllerDelegate method. | ||
def tabBarController(tabBarController, didEndCustomizingViewControllers:viewControllers, changed:changed) | ||
end | ||
=end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class FirstViewController < UIViewController | ||
def viewDidLoad | ||
super | ||
self.view.backgroundColor = UIColor.whiteColor | ||
# Do any additional setup after loading the view. | ||
end | ||
|
||
def viewDidUnload | ||
|
||
super | ||
# Release any retained subviews of the main view. | ||
end | ||
|
||
def shouldAutorotateToInterfaceOrientation(interfaceOrientation) | ||
interfaceOrientation == UIInterfaceOrientationPortrait | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class SecondViewController < UIViewController | ||
def viewDidLoad | ||
super | ||
self.view.backgroundColor = UIColor.whiteColor | ||
# Do any additional setup after loading the view. | ||
end | ||
|
||
def viewDidUnload | ||
|
||
super | ||
# Release any retained subviews of the main view. | ||
end | ||
|
||
def shouldAutorotateToInterfaceOrientation(interfaceOrientation) | ||
interfaceOrientation == UIInterfaceOrientationPortrait | ||
end | ||
end |
Binary file added
BIN
+2.3 KB
build/iPhoneSimulator-6.0-Development/navbarissue.app/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
AAPL???? |
Binary file not shown.
20 changes: 20 additions & 0 deletions
20
build/iPhoneSimulator-6.0-Development/navbarissue.dSYM/Contents/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.apple.xcode.dsym.com.yourcompany.navbarissue</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>dSYM</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+174 KB
build/iPhoneSimulator-6.0-Development/navbarissue.dSYM/Contents/Resources/DWARF/navbarissue
Binary file not shown.
Binary file added
BIN
+72.3 KB
...js/Users/folivifolly/Documents/projects/rubymotion/navbarissue/app/app_delegate.rb.i386.o
Binary file not shown.
Binary file added
BIN
+76.3 KB
...nt/objs/Users/folivifolly/Documents/projects/rubymotion/navbarissue/app/app_delegate.rb.o
Binary file not shown.
Binary file added
BIN
+43.7 KB
...Documents/projects/rubymotion/navbarissue/app/controllers/first_view_controller.rb.i386.o
Binary file not shown.
Binary file added
BIN
+47.7 KB
...olly/Documents/projects/rubymotion/navbarissue/app/controllers/first_view_controller.rb.o
Binary file not shown.
Binary file added
BIN
+43.6 KB
...ocuments/projects/rubymotion/navbarissue/app/controllers/second_view_controller.rb.i386.o
Binary file not shown.
Binary file added
BIN
+47.6 KB
...lly/Documents/projects/rubymotion/navbarissue/app/controllers/second_view_controller.rb.o
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
extern "C" { | ||
void ruby_sysinit(int *, char ***); | ||
void ruby_init(void); | ||
void ruby_init_loadpath(void); | ||
void ruby_script(const char *); | ||
void ruby_set_argv(int, char **); | ||
void rb_vm_init_compiler(void); | ||
void rb_vm_init_jit(void); | ||
void rb_vm_aot_feature_provide(const char *, void *); | ||
void *rb_vm_top_self(void); | ||
void rb_rb2oc_exc_handler(void); | ||
void rb_exit(int); | ||
void MREP_F129B38F722A46609D9C2272E166B17A(void *, void *); | ||
void MREP_97749E7DE3EA4E03977FACAEE541525C(void *, void *); | ||
void MREP_51AB5483B9F746B18B522EBAE461F708(void *, void *); | ||
} | ||
|
||
extern "C" | ||
void | ||
RubyMotionInit(int argc, char **argv) | ||
{ | ||
static bool initialized = false; | ||
if (!initialized) { | ||
ruby_init(); | ||
ruby_init_loadpath(); | ||
if (argc > 0) { | ||
const char *progname = argv[0]; | ||
ruby_script(progname); | ||
} | ||
try { | ||
void *self = rb_vm_top_self(); | ||
MREP_F129B38F722A46609D9C2272E166B17A(self, 0); | ||
MREP_97749E7DE3EA4E03977FACAEE541525C(self, 0); | ||
MREP_51AB5483B9F746B18B522EBAE461F708(self, 0); | ||
} | ||
catch (...) { | ||
rb_rb2oc_exc_handler(); | ||
} | ||
initialized = true; | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
extern "C" { | ||
void rb_define_global_const(const char *, void *); | ||
void rb_rb2oc_exc_handler(void); | ||
void rb_exit(int); | ||
void RubyMotionInit(int argc, char **argv); | ||
} | ||
int | ||
main(int argc, char **argv) | ||
{ | ||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | ||
int retval = 0; | ||
try { | ||
RubyMotionInit(argc, argv); | ||
rb_define_global_const("RUBYMOTION_ENV", @"development"); | ||
rb_define_global_const("RUBYMOTION_VERSION", @"1.35"); | ||
retval = UIApplicationMain(argc, argv, nil, @"AppDelegate"); | ||
rb_exit(retval); | ||
} | ||
catch (...) { | ||
rb_rb2oc_exc_handler(); | ||
} | ||
[pool release]; | ||
return retval; | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
describe "Application 'navbarissue'" do | ||
before do | ||
@app = UIApplication.sharedApplication | ||
end | ||
|
||
it "has one window" do | ||
@app.windows.size.should == 1 | ||
end | ||
end |