rubymotion_generators 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubymotion_generators/version.rb +1 -1
- data/lib/templates/table_view_controller.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 934014e4f6b8dfcf4529b5dc91f11ab94aae68a3
|
4
|
+
data.tar.gz: 3a0286f7d6e4aed5d63f101c601a062d6d42770f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e37086656ce7b11ef344f2a1638f4354026dfd93a4318d4b4afd9f1e3a2da353dc755a75d370284f53ef66fda2f4a8995332d7bb97e4b2e20b23e4cbb9a4ed
|
7
|
+
data.tar.gz: 82c81d00951477d685a64b39c2b32a0f197d3b0e8b8c8e1b0147e99acb6d0eedcc1945729c5e0d480252bd4c813319ed0058ce639a2c4b1d3d896381929fe3dd
|
@@ -36,7 +36,10 @@ class < UITableViewController
|
|
36
36
|
|
37
37
|
def tableView(tableView, cellForRowAtIndexPath:indexPath)
|
38
38
|
cellIdentifier = self.class.name
|
39
|
-
cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier)
|
39
|
+
cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier) || begin
|
40
|
+
UITableViewCell.alloc.initWithStyle(UITableViewCellStyleDefault, reuseIdentifier: cellIdentifier)
|
41
|
+
end
|
42
|
+
|
40
43
|
# Configure the cell...
|
41
44
|
cell
|
42
45
|
end
|
@@ -54,6 +57,8 @@ class < UITableViewController
|
|
54
57
|
def tableView(tableView, commitEditingStyle:editingStyle, forRowAtIndexPath:indexPath)
|
55
58
|
if editingStyle == UITableViewCellEditingStyleDelete
|
56
59
|
# Delete the row from the data source
|
60
|
+
# e.g. @your_data.delete_at(indexPath.row)
|
61
|
+
# Remove the row from the table view
|
57
62
|
tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation:UITableViewRowAnimationFade)
|
58
63
|
elsif editingStyle == UITableViewCellEditingStyleInsert
|
59
64
|
# Create a new instance of the appropriate class, insert it into the
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubymotion_generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Waite
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|