mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-04-29 05:05:36 +08:00
Whitespace only changes for generators
* Removed additional spacing included in the generators
This commit is contained in:
@@ -7,9 +7,9 @@ class <%= @name_camel_case %>Controller < UICollectionViewController
|
||||
# @window.rootViewController = UINavigationController.alloc.initWithRootViewController(main_controller)
|
||||
|
||||
<%= @name.upcase %>_CELL_ID = "<%= @name_camel_case %>Cell"
|
||||
|
||||
|
||||
def self.new(args = {})
|
||||
# Set layout
|
||||
# Set layout
|
||||
layout = UICollectionViewFlowLayout.alloc.init
|
||||
self.alloc.initWithCollectionViewLayout(layout)
|
||||
end
|
||||
@@ -42,11 +42,11 @@ class <%= @name_camel_case %>Controller < UICollectionViewController
|
||||
def numberOfSectionsInCollectionView(view)
|
||||
1
|
||||
end
|
||||
|
||||
|
||||
def collectionView(view, numberOfItemsInSection: section)
|
||||
200
|
||||
200
|
||||
end
|
||||
|
||||
|
||||
def collectionView(view, cellForItemAtIndexPath: index_path)
|
||||
view.dequeueReusableCellWithReuseIdentifier(<%= @name.upcase %>_CELL_ID, forIndexPath: index_path).tap do |cell|
|
||||
rmq.build(cell) unless cell.reused
|
||||
@@ -64,8 +64,8 @@ end
|
||||
|
||||
__END__
|
||||
|
||||
# You don't have to reapply styles to all UIViews, if you want to optimize,
|
||||
# another way to do it is tag the views you need to restyle in your stylesheet,
|
||||
# You don't have to reapply styles to all UIViews, if you want to optimize,
|
||||
# another way to do it is tag the views you need to restyle in your stylesheet,
|
||||
# then only reapply the tagged views, like so:
|
||||
def logo(st)
|
||||
st.frame = {t: 10, w: 200, h: 96}
|
||||
|
||||
@@ -17,8 +17,8 @@ class <%= @name_camel_case %>ControllerStylesheet < ApplicationStylesheet
|
||||
cl.itemSize = [cell_size[:w], cell_size[:h]]
|
||||
#cl.scrollDirection = UICollectionViewScrollDirectionHorizontal
|
||||
#cl.headerReferenceSize = [cell_size[:w], cell_size[:h]]
|
||||
cl.minimumInteritemSpacing = @margin
|
||||
cl.minimumLineSpacing = @margin
|
||||
cl.minimumInteritemSpacing = @margin
|
||||
cl.minimumLineSpacing = @margin
|
||||
#cl.sectionInsert = [0,0,0,0]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class <%= @name_camel_case %>Cell < UICollectionViewCell
|
||||
class <%= @name_camel_case %>Cell < UICollectionViewCell
|
||||
attr_reader :reused
|
||||
|
||||
def rmq_build
|
||||
|
||||
@@ -23,8 +23,8 @@ end
|
||||
|
||||
__END__
|
||||
|
||||
# You don't have to reapply styles to all UIViews, if you want to optimize,
|
||||
# another way to do it is tag the views you need to restyle in your stylesheet,
|
||||
# You don't have to reapply styles to all UIViews, if you want to optimize,
|
||||
# another way to do it is tag the views you need to restyle in your stylesheet,
|
||||
# then only reapply the tagged views, like so:
|
||||
def logo(st)
|
||||
st.frame = {t: 10, w: 200, h: 96}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
class <%= @name_camel_case %>Cell < UITableViewCell
|
||||
class <%= @name_camel_case %>Cell < UITableViewCell
|
||||
|
||||
def rmq_build
|
||||
q = rmq(self.contentView)
|
||||
|
||||
# Add your subviews, init stuff here
|
||||
# @foo = q.append(UILabel, :foo).get
|
||||
|
||||
# Or use the built-in table cell controls, if you don't use
|
||||
|
||||
# Or use the built-in table cell controls, if you don't use
|
||||
# these, they won't exist at runtime
|
||||
# q.build(self.imageView, :cell_image)
|
||||
# q.build(self.detailTextLabel, :cell_label_detail)
|
||||
|
||||
@@ -12,12 +12,12 @@ class <%= @name_camel_case %> < UIView
|
||||
end
|
||||
|
||||
|
||||
# To style this view include its stylesheet at the top of each controller's
|
||||
# To style this view include its stylesheet at the top of each controller's
|
||||
# stylesheet that is going to use it:
|
||||
# class SomeStylesheet < ApplicationStylesheet
|
||||
# class SomeStylesheet < ApplicationStylesheet
|
||||
# include <%= @name_camel_case %>Stylesheet
|
||||
|
||||
# Another option is to use your controller's stylesheet to style this view. This
|
||||
# works well if only one controller uses it. If you do that, delete the
|
||||
# works well if only one controller uses it. If you do that, delete the
|
||||
# view's stylesheet with:
|
||||
# rm app/stylesheets/views/<%= @name %>.rb
|
||||
|
||||
Reference in New Issue
Block a user