Dismissing popup view tapping outside


PSTCollectionView in rubymotion

I need use UICollectionView, but target my app for iOS < 6.0. So I’ve found PSTCollectionView library and using it with my rubymotion project. You can find whole source code in my github repo.

You need to download and link PSTCollectionView directory into vendor/PSTCollectionView .

Then update your Rakefile :

create app/controllers  and add two files – cell.rb  and  view_controller.rb


and  view_controller.rb

Finally, change  app_delegate.rb

run rake  and voila! :)

Screen Shot 2013-02-20 at 21.56.21

PSPDFKit gem for rubymotion

I’ve just released simple gem to include PSPDFKit into rubymotion project – see https://rubygems.org/gems/pspdfkit.

Installation is pretty straightforward

add to your  Rakefile :

Create  Gemfile file and add:

and execute  bundle install .

Then you need to copy/link framework and bundle files:

That’s it. Run  rake and test your installation.

PSPDFKit in rubymotion


If you’re using Bundler, you can simply add gem 'pspdfkit' to your Gemfile. See more on https://github.com/tmeinlschmidt/rm-pspdfkit

As I’ve started using this famous framework, I’d like to use it in my rubymotion application. So, there’s my setup to include this fmw in rubymotion project

  • extract PSPDFKit anywhere
  • create directory vendor  in your RM project
  • create symbolic link from your unzipped PSPDFKit to vendor/PSPDFKit.framework

and modify Rakefile accordingly

try rake , it should link and start simulator.

Next step

Add some PDF file into your app resources  folder.

And then you can try to modify app/app_delegate.rb  with simple example:

Print simple x*x table in ruby

I’ve needed to print simple table as

as you can see, x = y, cell in table = x*y (x*x to be exact)

Calculate prime numbers

Tried simple Sieve of Eratosthenes in Ruby …

we can add some tests

fetch all youtube links from any page

We made a list of great youtube videos on facebook comments and wanted to fetch these as a list, so I’ve been thinking how to achieve it. And there’s some javascript code you can paste into your console (javascript consone in a browser), it’ll fetch and display all the links for youtube. Easily change regexp to match url your want.