Skip to content

Instantly share code, notes, and snippets.

@jballanc
Forked from czarneckid/sample_controller.rb
Created December 6, 2013 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jballanc/7816855 to your computer and use it in GitHub Desktop.
Save jballanc/7816855 to your computer and use it in GitHub Desktop.
class SampleController < UIViewController
def viewDidLoad
super
self.view.backgroundColor = UIColor.whiteColor
frame = UIScreen.mainScreen.applicationFrame
origin = frame.origin
size = frame.size
text_view = UITextView.alloc.initWithFrame([[origin.x, origin.y],
[size.width * 2, size.height]])
text_view.text = sample_text
text_view.editable = false
scroll_view = UIScrollView.alloc.initWithFrame(frame)
scroll_view.showsHorizontalScrollIndicator = true
scroll_view.showsVerticalScrollIndicator = true
scroll_view.scrollEnabled = true
scroll_view.addSubview(text_view)
scroll_view.contentSize = text_view.frame.size
self.view.addSubview(scroll_view)
end
def sample_text
<<EOS
RubyMotion offers developers the expressiveness of Ruby with no compromises. It's hard to imagine a more appealing way to build native iOS applications.
This is AWESOME! With just minimal iOS experience, I was able to get a working app up and running on my phone. Oh, the feeling of power!
RubyMotion is a dream come true for Rubyists who want to create fast, native iOS apps!
Now you can develop in your favorite language on your favorite mobile platform. Done right. For real. What are you waiting for?
With RubyMotion, we can now leverage our Ruby expertise to solve problems in the mobile space. Developing for iOS will never be the same again.
After years of iOS work, RubyMotion seems like a thousand kittens playing the piano while sliding down a double-rainbow.
RubyMotion offers developers the expressiveness of Ruby with no compromises. It's hard to imagine a more appealing way to build native iOS applications.
This is AWESOME! With just minimal iOS experience, I was able to get a working app up and running on my phone. Oh, the feeling of power!
RubyMotion is a dream come true for Rubyists who want to create fast, native iOS apps!
Now you can develop in your favorite language on your favorite mobile platform. Done right. For real. What are you waiting for?
With RubyMotion, we can now leverage our Ruby expertise to solve problems in the mobile space. Developing for iOS will never be the same again.
After years of iOS work, RubyMotion seems like a thousand kittens playing the piano while sliding down a double-rainbow.
RubyMotion offers developers the expressiveness of Ruby with no compromises. It's hard to imagine a more appealing way to build native iOS applications.
This is AWESOME! With just minimal iOS experience, I was able to get a working app up and running on my phone. Oh, the feeling of power!
RubyMotion is a dream come true for Rubyists who want to create fast, native iOS apps!
Now you can develop in your favorite language on your favorite mobile platform. Done right. For real. What are you waiting for?
With RubyMotion, we can now leverage our Ruby expertise to solve problems in the mobile space. Developing for iOS will never be the same again.
After years of iOS work, RubyMotion seems like a thousand kittens playing the piano while sliding down a double-rainbow.
RubyMotion offers developers the expressiveness of Ruby with no compromises. It's hard to imagine a more appealing way to build native iOS applications.
This is AWESOME! With just minimal iOS experience, I was able to get a working app up and running on my phone. Oh, the feeling of power!
RubyMotion is a dream come true for Rubyists who want to create fast, native iOS apps!
Now you can develop in your favorite language on your favorite mobile platform. Done right. For real. What are you waiting for?
With RubyMotion, we can now leverage our Ruby expertise to solve problems in the mobile space. Developing for iOS will never be the same again.
After years of iOS work, RubyMotion seems like a thousand kittens playing the piano while sliding down a double-rainbow.
RubyMotion offers developers the expressiveness of Ruby with no compromises. It's hard to imagine a more appealing way to build native iOS applications.
This is AWESOME! With just minimal iOS experience, I was able to get a working app up and running on my phone. Oh, the feeling of power!
RubyMotion is a dream come true for Rubyists who want to create fast, native iOS apps!
Now you can develop in your favorite language on your favorite mobile platform. Done right. For real. What are you waiting for?
With RubyMotion, we can now leverage our Ruby expertise to solve problems in the mobile space. Developing for iOS will never be the same again.
After years of iOS work, RubyMotion seems like a thousand kittens playing the piano while sliding down a double-rainbow.
RubyMotion offers developers the expressiveness of Ruby with no compromises. It's hard to imagine a more appealing way to build native iOS applications.
This is AWESOME! With just minimal iOS experience, I was able to get a working app up and running on my phone. Oh, the feeling of power!
RubyMotion is a dream come true for Rubyists who want to create fast, native iOS apps!
Now you can develop in your favorite language on your favorite mobile platform. Done right. For real. What are you waiting for?
With RubyMotion, we can now leverage our Ruby expertise to solve problems in the mobile space. Developing for iOS will never be the same again.
After years of iOS work, RubyMotion seems like a thousand kittens playing the piano while sliding down a double-rainbow.
This is the end!
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment