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

cell.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

Update

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

How to get line number and file of your RoR code

add czech pluralize to i18n

Rails 2.1.0 – named_scope

New version of rails comes with a great feature called named_scope.

# in your model.rb

and you can use its as:

# somewhere in your code