From 559e6b30d81d5ef6701279e75a2843bbf9581857 Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Mon, 27 Apr 2015 17:24:04 -0400 Subject: [PATCH 1/3] The comment was confusing that it was just that one method. Moved the method to the bottom for clarity. --- .../collection_view_screen/app/screens/name_screen.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/templates/collection_view_screen/app/screens/name_screen.rb b/templates/collection_view_screen/app/screens/name_screen.rb index ab16809..6d76e76 100644 --- a/templates/collection_view_screen/app/screens/name_screen.rb +++ b/templates/collection_view_screen/app/screens/name_screen.rb @@ -25,11 +25,6 @@ class <%= @name_camel_case %>Screen < UICollectionViewController end end - # Remove the following if you're only using portrait - def will_animate_rotate(orientation, duration) - reapply_styles - end - def numberOfSectionsInCollectionView(view) 1 end @@ -51,4 +46,8 @@ class <%= @name_camel_case %>Screen < UICollectionViewController puts "Selected at section: #{index_path.section}, row: #{index_path.row}" end -end \ No newline at end of file + # Remove the following if you're only using portrait + def will_animate_rotate(orientation, duration) + reapply_styles + end +end From 90a7b02d54b2024f30edf3acce2a9b8549b6895a Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Mon, 27 Apr 2015 18:08:10 -0400 Subject: [PATCH 2/3] find isn't available in a UICollectionViewCell --- templates/collection_view_screen/app/views/name_cell.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/collection_view_screen/app/views/name_cell.rb b/templates/collection_view_screen/app/views/name_cell.rb index c88a8f1..b214794 100644 --- a/templates/collection_view_screen/app/views/name_cell.rb +++ b/templates/collection_view_screen/app/views/name_cell.rb @@ -2,9 +2,9 @@ class <%= @name_camel_case %>Cell < UICollectionViewCell attr_reader :reused def on_load - find(self).apply_style :<%= @name %>_cell + rmq(self).apply_style :<%= @name %>_cell - q = find(self.contentView) + q = rmq(self.contentView) # Add your subviews, init stuff here # @foo = q.append!(UILabel, :foo) end From 1578872b1d00efa18373989884977b3cd9960f33 Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Mon, 27 Apr 2015 19:07:16 -0400 Subject: [PATCH 3/3] Revert "find isn't available in a UICollectionViewCell" This reverts commit 90a7b02d54b2024f30edf3acce2a9b8549b6895a. --- templates/collection_view_screen/app/views/name_cell.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/collection_view_screen/app/views/name_cell.rb b/templates/collection_view_screen/app/views/name_cell.rb index b214794..c88a8f1 100644 --- a/templates/collection_view_screen/app/views/name_cell.rb +++ b/templates/collection_view_screen/app/views/name_cell.rb @@ -2,9 +2,9 @@ class <%= @name_camel_case %>Cell < UICollectionViewCell attr_reader :reused def on_load - rmq(self).apply_style :<%= @name %>_cell + find(self).apply_style :<%= @name %>_cell - q = rmq(self.contentView) + q = find(self.contentView) # Add your subviews, init stuff here # @foo = q.append!(UILabel, :foo) end