Class: UnderOs::UI::Collection::Delegate

Inherits:
UIViewController
  • Object
show all
Defined in:
lib/under_os/ui/collection/delegate.rb

Overview

The iOS level events receiver, not for a public use

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(collection) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/under_os/ui/collection/delegate.rb', line 6

def self.new(collection)
  alloc.tap do |instance|
    instance.instance_eval do
      @collection = collection
    end
  end
end

Instance Method Details

#collectionView(collection, didDeselectItemAtIndexPath: indexPath) ⇒ Object

DataSource API



61
62
63
# File 'lib/under_os/ui/collection/delegate.rb', line 61

def collectionView(collection, numberOfItemsInSection: section)
  @collection.number_of_items(section)
end

#numberOfSectionsInCollectionView(collection) ⇒ Object

DataSource API



18
19
20
# File 'lib/under_os/ui/collection/delegate.rb', line 18

def numberOfSectionsInCollectionView(collection)
  @collection.number_of_sections
end