A review of RubyMotion
samsoff.es
A review of RubyMotion
1–10 of 31 posts
Re: A review of RubyMotion
#2The example author made here feels like I will end up typing about twice as much with RubyMotion than objective C.
Ruby: @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @window.makeKeyAndVisible
Objective C: self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible];
Re: A review of RubyMotion
#3Objective C classes and methods are designed to be long and mostly typed by Xcode's autocomplete. With RubyMotion, I will end up typing out all those verbose methods, which I don't know if it's something I feel too big about. The example author made here feels like I will end up typing about twice as much with RubyMotion than objective C. Ruby: @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @windo…
I'm a Rubyist, it's my primary language and I'd love to use it over Objective-c. But I'm also starting really like Obj-c, and right now it's the best thing out there for iOS because of XCode.
If you want to learn how to make iOS apps, learn Objective-c. Or at the very least learn it first. Trust me, you'll be glad you did.
Re: A review of RubyMotion
#4Objective C classes and methods are designed to be long and mostly typed by Xcode's autocomplete. With RubyMotion, I will end up typing out all those verbose methods, which I don't know if it's something I feel too big about. The example author made here feels like I will end up typing about twice as much with RubyMotion than objective C. Ruby: @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @windo…
Re: A review of RubyMotion
#5 id navigationBar = [UINavigationBar appearance];
[navigationBar setBackgroundImage:[UIImage imageNamed:@"nav-background.png"] forBarMetrics:UIBarMetricsDefault];
[navigationBar setTitleTextAttributes:[[NSDictionary alloc] initWithObjectsAndKeys:
[UIFont cheddarFontWithSize:24.0f], UITextAttributeFont,
[UIColor colorWithWhite:0.0f alpha:0.4f], UITextAttributeTextShadowColor,
[UIColor whiteColor], UITextAttributeTextColor,
nil]];
which could be id navigationBar = [UINavigationBar appearance];
[navigationBar setBackgroundImage:[UIImage imageNamed:@"nav-background.png"] forBarMetrics:UIBarMetricsDefault];
[navigationBar setTitleTextAttributes:@{
UITextAttributeFont : [UIFont cheddarFontWithSize:24],
UITextAttributeTextShadowColor : [UIColor colorWithWhite:0 alpha:0.4],
UITextAttributeTextColor : [UIColor whiteColor],
}];
as compares to the Ruby, navigationBar = UINavigationBar.appearance
navigationBar.setBackgroundImage(UIImage.imageNamed('nav-background.png'), forBarMetrics: UIBarMetricsDefault)
navigationBar.setTitleTextAttributes({
UITextAttributeFont: UIFont.cheddarFontWithSize(24.0),
UITextAttributeTextShadowColor: UIColor.colorWithWhite(0.0, alpha:0.4),
UITextAttributeTextColor: UIColor.whiteColor
})
Also kind of wondering where he got "cheddarFont". :-)Re: A review of RubyMotion
#6Re: A review of RubyMotion
#7What is the advantage? I'm neither an iOS or ruby developer, please enlighten me. It seems like this gives you a different language syntax to access the same libraries with no additional abstraction. It doesn't seem like it would speed up development much.
Re: A review of RubyMotion
#8What is the advantage? I'm neither an iOS or ruby developer, please enlighten me. It seems like this gives you a different language syntax to access the same libraries with no additional abstraction. It doesn't seem like it would speed up development much.
Re: A review of RubyMotion
#9One of the ObjC examples could be more concise. He writes: id navigationBar = [UINavigationBar appearance]; [navigationBar setBackgroundImage:[UIImage imageNamed:@"nav-background.png"] forBarMetrics:UIBarMetricsDefault]; [navigationBar setTitleTextAttributes:[[NSDictionary alloc] initWithObjectsAndKeys: [UIFont cheddarFontWithSize:24.0f], UITextAttributeFont, [UIColor colorWithWhite:0.0f alpha:0.4f], UITextAttributeT…
Re: A review of RubyMotion
#10One of the ObjC examples could be more concise. He writes: id navigationBar = [UINavigationBar appearance]; [navigationBar setBackgroundImage:[UIImage imageNamed:@"nav-background.png"] forBarMetrics:UIBarMetricsDefault]; [navigationBar setTitleTextAttributes:[[NSDictionary alloc] initWithObjectsAndKeys: [UIFont cheddarFontWithSize:24.0f], UITextAttributeFont, [UIColor colorWithWhite:0.0f alpha:0.4f], UITextAttributeT…