simple-view 0.1.3 → 0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +14 -7
- data/Rakefile +3 -7
- data/app/app_delegate.rb +2 -0
- data/app/simple_view_controller.rb +33 -15
- data/app/user_info_controller.rb +67 -0
- data/app/view_anchoring_controller.rb +27 -0
- data/lib/simple-view.rb +1 -7
- data/lib/simple_view/extensions/fixnum.rb +9 -0
- data/lib/simple_view/extensions/string.rb +16 -3
- data/lib/simple_view/extensions/ui_color.rb +2 -2
- data/lib/simple_view/extensions/ui_font.rb +2 -2
- data/lib/simple_view/extensions/ui_image.rb +2 -2
- data/lib/simple_view/extensions/ui_view.rb +48 -81
- data/lib/simple_view/layout.rb +1 -1
- data/lib/simple_view/styles.rb +4 -4
- data/lib/simple_view/version.rb +1 -1
- data/lib/simple_view/view_builder.rb +250 -0
- data/lib/simple_view/view_proxy.rb +22 -44
- data/spec/acceptance/view_anchoring_controller_spec.rb +82 -0
- data/spec/extensions/fixnum_spec.rb +15 -0
- data/spec/extensions/string_spec.rb +1 -1
- data/spec/extensions/ui_color_spec.rb +1 -1
- data/spec/extensions/ui_font_spec.rb +1 -1
- data/spec/extensions/ui_image_spec.rb +1 -1
- data/spec/extensions/ui_view_spec.rb +1 -17
- data/spec/layout_spec.rb +15 -0
- data/spec/styles_spec.rb +17 -0
- data/spec/view_builder_spec.rb +229 -0
- data/spec/view_proxy_spec.rb +172 -0
- metadata +18 -44
- data/lib/simple_view/builders/helpers/has_background_color.rb +0 -10
- data/lib/simple_view/builders/helpers/has_color.rb +0 -9
- data/lib/simple_view/builders/helpers/has_font.rb +0 -9
- data/lib/simple_view/builders/helpers/has_text_color.rb +0 -11
- data/lib/simple_view/builders/helpers/has_tint_color.rb +0 -10
- data/lib/simple_view/builders/ui_activity_indicator_view_builder.rb +0 -12
- data/lib/simple_view/builders/ui_button_builder.rb +0 -32
- data/lib/simple_view/builders/ui_control_builder.rb +0 -9
- data/lib/simple_view/builders/ui_image_view_builder.rb +0 -38
- data/lib/simple_view/builders/ui_label_builder.rb +0 -18
- data/lib/simple_view/builders/ui_progress_view_builder.rb +0 -28
- data/lib/simple_view/builders/ui_search_bar_builder.rb +0 -31
- data/lib/simple_view/builders/ui_segmented_control_builder.rb +0 -28
- data/lib/simple_view/builders/ui_slider_builder.rb +0 -52
- data/lib/simple_view/builders/ui_switch_builder.rb +0 -10
- data/lib/simple_view/builders/ui_tab_bar_builder.rb +0 -20
- data/lib/simple_view/builders/ui_table_view_builder.rb +0 -15
- data/lib/simple_view/builders/ui_table_view_cell_builder.rb +0 -19
- data/lib/simple_view/builders/ui_text_field_builder.rb +0 -8
- data/lib/simple_view/builders/ui_text_view_builder.rb +0 -8
- data/lib/simple_view/builders/ui_toolbar_builder.rb +0 -11
- data/lib/simple_view/builders/ui_view_builder.rb +0 -58
- data/spec/builders/ui_activity_indicator_view_builder_spec.rb +0 -12
- data/spec/builders/ui_button_builder_spec.rb +0 -12
- data/spec/builders/ui_control_builder_spec.rb +0 -5
- data/spec/builders/ui_image_view_builder_spec.rb +0 -31
- data/spec/builders/ui_progress_view_builder_spec.rb +0 -12
- data/spec/builders/ui_segmented_control_builder_spec.rb +0 -13
- data/spec/builders/ui_table_view_builder_spec.rb +0 -12
- data/spec/builders/ui_table_view_cell_builder_spec.rb +0 -17
- data/spec/builders/ui_view_builder_spec.rb +0 -35
- data/spec/simple_view_spec.rb +0 -193
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -33,9 +33,9 @@ class YourViewController < UIViewController
|
|
33
33
|
|
34
34
|
def viewDidLoad
|
35
35
|
setup content_view do
|
36
|
-
label width: 200, height: 20, text: "Choose your lucky word",
|
36
|
+
label top:0, left: 0, width: 200, height: 20, text: "Choose your lucky word", text_color: "#eee"
|
37
37
|
image_view top: 50, left: 50, right: 50, image: "sample.jpg"
|
38
|
-
toolbar
|
38
|
+
toolbar left: 0, right: 0, bottom: 0
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -46,8 +46,8 @@ Use block for more control over the view instance
|
|
46
46
|
````ruby
|
47
47
|
def viewDidLoad
|
48
48
|
setup view do
|
49
|
-
button tint_color: '#f00' do
|
50
|
-
|
49
|
+
button tint_color: '#f00' do |button|
|
50
|
+
button.setTitle "Submit" forState: UIControlStateNormal
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
@@ -61,11 +61,12 @@ SimpleView provides shorthand methods for most UIKit classes
|
|
61
61
|
def viewDidLoad
|
62
62
|
setup view do
|
63
63
|
label text: 'Hi there!' # shorthand
|
64
|
-
add UILabel, text: 'Hi there!' #
|
64
|
+
add UILabel, text: 'Hi there!' # same as above
|
65
65
|
end
|
66
66
|
end
|
67
67
|
````
|
68
68
|
|
69
|
+
- UIActionSheet via `action_sheet`
|
69
70
|
- UIActivityIndicatorView via `activity_indicator`
|
70
71
|
- UIButton via `button`
|
71
72
|
- UIDatePicker via `date_picker`
|
@@ -151,13 +152,19 @@ class ViewController
|
|
151
152
|
end
|
152
153
|
````
|
153
154
|
|
154
|
-
### View
|
155
|
+
### View positioning and sizing
|
155
156
|
|
156
157
|
Position the view without doing a lot of calculation
|
157
158
|
|
158
159
|
````ruby
|
159
160
|
setup view do
|
160
|
-
toolbar bottom: 10, left: 10, right: 10
|
161
|
+
toolbar bottom: 10, left: 10, right: 10
|
162
|
+
end
|
163
|
+
````
|
164
|
+
|
165
|
+
````ruby
|
166
|
+
setup view do
|
167
|
+
table_view width: 100.percent, height: 100.percent
|
161
168
|
end
|
162
169
|
````
|
163
170
|
|
data/Rakefile
CHANGED
@@ -6,13 +6,9 @@ require 'motion/project'
|
|
6
6
|
|
7
7
|
Motion::Project::App.setup do |app|
|
8
8
|
app.name = 'SimpleViewDemo'
|
9
|
+
app.deployment_target = '5.0'
|
9
10
|
|
10
|
-
app.
|
11
|
-
app.files.unshift(File.join(File.dirname(__FILE__), 'lib/simple_view
|
12
|
-
app.files.unshift(File.join(File.dirname(__FILE__), 'lib/simple_view/styles.rb'))
|
13
|
-
app.files.unshift(Dir.glob(File.join(File.dirname(__FILE__), 'lib/simple_view/builders/*.rb')))
|
14
|
-
app.files.unshift(File.join(File.dirname(__FILE__), 'lib/simple_view/builders/ui_control_builder.rb'))
|
15
|
-
app.files.unshift(File.join(File.dirname(__FILE__), 'lib/simple_view/builders/ui_view_builder.rb'))
|
16
|
-
app.files.unshift(Dir.glob(File.join(File.dirname(__FILE__), 'lib/simple_view/builders/helpers/*.rb')))
|
11
|
+
app.detect_dependencies = false
|
12
|
+
app.files.unshift(Dir.glob(File.join(File.dirname(__FILE__), 'lib/simple_view/*.rb')))
|
17
13
|
app.files.unshift(Dir.glob(File.join(File.dirname(__FILE__), 'lib/simple_view/extensions/*.rb')))
|
18
14
|
end
|
data/app/app_delegate.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
class AppDelegate
|
2
2
|
def application(application, didFinishLaunchingWithOptions:launchOptions)
|
3
|
+
return true if RUBYMOTION_ENV == 'test'
|
4
|
+
|
3
5
|
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
|
4
6
|
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(SimpleViewController.alloc.init)
|
5
7
|
@window.rootViewController.wantsFullScreenLayout = true
|
@@ -1,27 +1,45 @@
|
|
1
1
|
class SimpleViewController < UIViewController
|
2
2
|
include SimpleView::Layout
|
3
3
|
|
4
|
+
DEFAULT_CELL_ID = 'DefaultCellId'
|
5
|
+
|
4
6
|
def viewDidLoad
|
5
|
-
|
6
|
-
|
7
|
-
|
7
|
+
super
|
8
|
+
|
9
|
+
@demos = [
|
10
|
+
{caption: 'View Anchoring', controller: ViewAnchoringController},
|
11
|
+
{caption: 'User Info', controller: UserInfoController}
|
12
|
+
]
|
8
13
|
|
9
14
|
setup view, controller: self do
|
10
|
-
controller.title =
|
15
|
+
controller.title = 'Demo'
|
11
16
|
|
12
|
-
|
17
|
+
table_view delegate: controller, dataSource: controller, width: 100.percent, height: 100.percent do
|
18
|
+
view.registerClass UITableViewCell, forCellReuseIdentifier: DEFAULT_CELL_ID
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
13
22
|
|
14
|
-
|
15
|
-
rect styles: :square, backgroundColor: "#993300", anchors: [:top]
|
16
|
-
rect styles: :square, backgroundColor: "#CC9900", anchors: [:top, :right]
|
23
|
+
# UITableView dataSource and delegate
|
17
24
|
|
18
|
-
|
19
|
-
|
20
|
-
|
25
|
+
def numberOfSectionsInTableView tableView
|
26
|
+
1
|
27
|
+
end
|
21
28
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
29
|
+
def tableView tableView, numberOfRowsInSection: section
|
30
|
+
@demos.size
|
31
|
+
end
|
32
|
+
|
33
|
+
def tableView tableView, cellForRowAtIndexPath: indexPath
|
34
|
+
cell = tableView.dequeueReusableCellWithIdentifier DEFAULT_CELL_ID
|
35
|
+
cell.textLabel.text = @demos[indexPath.row][:caption]
|
36
|
+
cell
|
37
|
+
end
|
38
|
+
|
39
|
+
def tableView tableView, didSelectRowAtIndexPath: indexPath
|
40
|
+
tableView.deselectRowAtIndexPath indexPath, animated: true
|
41
|
+
|
42
|
+
controller = @demos[indexPath.row][:controller].alloc.init
|
43
|
+
navigationController.pushViewController controller, animated: true
|
26
44
|
end
|
27
45
|
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
class UserInfoController < UIViewController
|
2
|
+
include SimpleView::Layout
|
3
|
+
|
4
|
+
DEFAULT_CELL_ID = 'DefaultCellId'
|
5
|
+
|
6
|
+
def viewDidLoad
|
7
|
+
super
|
8
|
+
|
9
|
+
@data = [
|
10
|
+
[{title: 'mobile', text: '123456789'}],
|
11
|
+
[{title: 'email', text: 'nyan.cat@meme.com'}],
|
12
|
+
[{title: 'Facebook', text: 'Nyan Cat'}]
|
13
|
+
]
|
14
|
+
|
15
|
+
setup view, controller: self do
|
16
|
+
controller.title = 'User Info'
|
17
|
+
|
18
|
+
table_view style: UITableViewStyleGrouped,
|
19
|
+
delegate: controller, dataSource: controller,
|
20
|
+
width: 100.percent, height: 100.percent do |table_view|
|
21
|
+
|
22
|
+
table_view.tableHeaderView = UserInfoHeader.alloc.initWithFrame [[0, 0], [view.width, 80]]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# UITableView dataSource and delegate
|
28
|
+
|
29
|
+
def numberOfSectionsInTableView tableView
|
30
|
+
@data.size
|
31
|
+
end
|
32
|
+
|
33
|
+
def tableView tableView, numberOfRowsInSection: section
|
34
|
+
@data[section].size
|
35
|
+
end
|
36
|
+
|
37
|
+
def tableView tableView, cellForRowAtIndexPath: indexPath
|
38
|
+
cell = tableView.dequeueReusableCellWithIdentifier(DEFAULT_CELL_ID) || UITableViewCell.alloc.initWithStyle(UITableViewCellStyleValue2, reuseIdentifier:DEFAULT_CELL_ID)
|
39
|
+
cell.textLabel.text = @data[indexPath.section][indexPath.row][:title]
|
40
|
+
cell.detailTextLabel.text = @data[indexPath.section][indexPath.row][:text]
|
41
|
+
cell
|
42
|
+
end
|
43
|
+
|
44
|
+
def tableView tableView, didSelectRowAtIndexPath: indexPath
|
45
|
+
tableView.deselectRowAtIndexPath indexPath, animated: true
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
class UserInfoHeader < UIView
|
50
|
+
include SimpleView::Layout
|
51
|
+
|
52
|
+
def initWithFrame frame
|
53
|
+
if super
|
54
|
+
setup self do
|
55
|
+
image_view name: 'avatar', image: 'test.jpg',
|
56
|
+
width: 50, height: 50, top: 20, left: 10
|
57
|
+
|
58
|
+
label name: 'full_name', text: 'Nyan Cat', font: '16 bold', backgroundColor: 'clear',
|
59
|
+
height: 20, top: 20, left: 70, right: 10
|
60
|
+
|
61
|
+
label text: 'Internet Meme', font: '14', textColor: '#666', backgroundColor: 'clear',
|
62
|
+
height: 18, top: 45, left: 70, right: 10
|
63
|
+
end
|
64
|
+
end
|
65
|
+
self
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class ViewAnchoringController < UIViewController
|
2
|
+
include SimpleView::Layout
|
3
|
+
|
4
|
+
def viewDidLoad
|
5
|
+
SimpleView::Styles.define :square,
|
6
|
+
width: 20,
|
7
|
+
height: 20
|
8
|
+
|
9
|
+
setup view, controller: self do
|
10
|
+
controller.title = "View Anchoring"
|
11
|
+
|
12
|
+
rect name: 'fill', styles: :square, backgroundColor: "#000", top: 0, left: 0, bottom: 0, right: 0
|
13
|
+
|
14
|
+
rect name: 'tl', styles: :square, backgroundColor: "#990000", top: 0, left: 0
|
15
|
+
rect name: 'tc', styles: :square, backgroundColor: "#993300", top: 0
|
16
|
+
rect name: 'tr', styles: :square, backgroundColor: "#CC9900", top: 0, right: 0
|
17
|
+
|
18
|
+
rect name: 'ml', styles: :square, backgroundColor: "#006600", left: 0
|
19
|
+
rect name: 'mc', styles: :square, backgroundColor: "#336666"
|
20
|
+
rect name: 'mr', styles: :square, backgroundColor: "#0033FF", right: 0
|
21
|
+
|
22
|
+
rect name: 'bl', styles: :square, backgroundColor: "#000099", bottom: 0, left: 0
|
23
|
+
rect name: 'bc', styles: :square, backgroundColor: "#660099", bottom: 0
|
24
|
+
rect name: 'br', styles: :square, backgroundColor: "#990066", bottom: 0, right: 0
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/simple-view.rb
CHANGED
@@ -5,12 +5,6 @@ unless defined?(Motion::Project::Config)
|
|
5
5
|
end
|
6
6
|
|
7
7
|
Motion::Project::App.setup do |app|
|
8
|
-
app.files
|
9
|
-
app.files.unshift(File.join(File.dirname(__FILE__), 'simple_view/layout.rb'))
|
10
|
-
app.files.unshift(File.join(File.dirname(__FILE__), 'simple_view/styles.rb'))
|
11
|
-
app.files.unshift(Dir.glob(File.join(File.dirname(__FILE__), 'simple_view/builders/*.rb')))
|
12
|
-
app.files.unshift(File.join(File.dirname(__FILE__), 'simple_view/builders/ui_control_builder.rb'))
|
13
|
-
app.files.unshift(File.join(File.dirname(__FILE__), 'simple_view/builders/ui_view_builder.rb'))
|
14
|
-
app.files.unshift(Dir.glob(File.join(File.dirname(__FILE__), 'simple_view/builders/helpers/*.rb')))
|
8
|
+
app.files.unshift(Dir.glob(File.join(File.dirname(__FILE__), 'simple_view/*.rb')))
|
15
9
|
app.files.unshift(Dir.glob(File.join(File.dirname(__FILE__), 'simple_view/extensions/*.rb')))
|
16
10
|
end
|
@@ -1,13 +1,26 @@
|
|
1
1
|
module SimpleView
|
2
|
-
module
|
2
|
+
module StringExtensions
|
3
|
+
def underscore
|
4
|
+
word = self.dup
|
5
|
+
word.gsub!(/::/, '/')
|
6
|
+
word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2')
|
7
|
+
word.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
|
8
|
+
word.tr!("-", "_")
|
9
|
+
word.downcase!
|
10
|
+
word
|
11
|
+
end
|
12
|
+
|
3
13
|
def to_color
|
4
|
-
html_colour = self.
|
14
|
+
html_colour = self.dup
|
15
|
+
html_colour.gsub!(%r{[#;]}, '')
|
16
|
+
|
5
17
|
case html_colour.size
|
6
18
|
when 3
|
7
19
|
colours = html_colour.scan(%r{[0-9A-Fa-f]}).map { |el| (el * 2).to_i(16) }
|
8
20
|
when 6
|
9
21
|
colours = html_colour.scan(%r<[0-9A-Fa-f]{2}>).map { |el| el.to_i(16) }
|
10
22
|
else
|
23
|
+
return ::UIColor.clearColor if html_colour == 'transparent' || 'clear'
|
11
24
|
raise ArgumentError
|
12
25
|
end
|
13
26
|
|
@@ -49,4 +62,4 @@ module SimpleView
|
|
49
62
|
end
|
50
63
|
end
|
51
64
|
|
52
|
-
String.send(:include, SimpleView::
|
65
|
+
String.send(:include, SimpleView::StringExtensions)
|
@@ -1,101 +1,68 @@
|
|
1
1
|
module SimpleView
|
2
|
-
module
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
11
|
-
alias_method :subview, :find
|
12
|
-
|
13
|
-
def sibling name
|
14
|
-
if superview
|
15
|
-
superview.find name
|
16
|
-
else
|
2
|
+
module UIViewExtensions
|
3
|
+
module Traversing
|
4
|
+
attr_accessor :name
|
5
|
+
|
6
|
+
def find name
|
7
|
+
subviews.each do |subview|
|
8
|
+
return subview if subview.name == name
|
9
|
+
end
|
17
10
|
nil
|
18
11
|
end
|
19
|
-
|
12
|
+
alias_method :subview, :find
|
13
|
+
|
14
|
+
def sibling name
|
15
|
+
if superview
|
16
|
+
superview.find name
|
17
|
+
else
|
18
|
+
nil
|
19
|
+
end
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
def closest name
|
23
|
+
view = sibling name
|
24
|
+
if view.nil? && superview
|
25
|
+
view = superview.closest name
|
26
|
+
end
|
27
|
+
view
|
25
28
|
end
|
26
|
-
view
|
27
29
|
end
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
max_height = superview ? superview.bounds.size.height : 0
|
33
|
-
|
34
|
-
@anchors ||= [:top, :left]
|
35
|
-
anchor_top = @anchors.include?(:top)
|
36
|
-
anchor_left = @anchors.include?(:left)
|
37
|
-
anchor_bottom = @anchors.include?(:bottom)
|
38
|
-
anchor_right = @anchors.include?(:right)
|
39
|
-
|
40
|
-
self.autoresizingMask = UIViewAutoresizingNone
|
41
|
-
self.autoresizingMask |= UIViewAutoresizingFlexibleTopMargin unless anchor_top
|
42
|
-
self.autoresizingMask |= UIViewAutoresizingFlexibleLeftMargin unless anchor_left
|
43
|
-
self.autoresizingMask |= UIViewAutoresizingFlexibleBottomMargin unless anchor_bottom
|
44
|
-
self.autoresizingMask |= UIViewAutoresizingFlexibleRightMargin unless anchor_right
|
45
|
-
self.autoresizingMask |= UIViewAutoresizingFlexibleWidth if anchor_left && anchor_right
|
46
|
-
self.autoresizingMask |= UIViewAutoresizingFlexibleHeight if anchor_top && anchor_bottom
|
47
|
-
|
48
|
-
if (anchor_left && anchor_right) || (anchor_left && !@right.nil?)
|
49
|
-
f.size.width = max_width - self.left - @right.to_i
|
50
|
-
elsif anchor_right
|
51
|
-
f.origin.x = max_width - self.width - @right.to_i
|
52
|
-
elsif !anchor_left && !anchor_right
|
53
|
-
f.origin.x = max_width / 2 - f.size.width / 2
|
31
|
+
module Dimensions
|
32
|
+
def left
|
33
|
+
self.frame.origin.x
|
54
34
|
end
|
55
35
|
|
56
|
-
|
57
|
-
|
58
|
-
elsif anchor_bottom
|
59
|
-
f.origin.y = max_height - self.height - @bottom.to_i
|
60
|
-
elsif !anchor_top && !anchor_bottom
|
61
|
-
f.origin.y = max_height / 2 - f.size.height / 2
|
36
|
+
def setLeft value
|
37
|
+
self.frame = [[value, self.frame.origin.y], [self.frame.size.width, self.frame.size.height]]
|
62
38
|
end
|
63
39
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
def top
|
68
|
-
self.frame.origin.y
|
69
|
-
end
|
70
|
-
|
71
|
-
def setTop value
|
72
|
-
self.frame = [[self.frame.origin.x, value], [self.frame.size.width, self.frame.size.height]]
|
73
|
-
end
|
74
|
-
|
75
|
-
def left
|
76
|
-
self.frame.origin.x
|
77
|
-
end
|
40
|
+
def top
|
41
|
+
self.frame.origin.y
|
42
|
+
end
|
78
43
|
|
79
|
-
|
80
|
-
|
81
|
-
|
44
|
+
def setTop value
|
45
|
+
self.frame = [[self.frame.origin.x, value], [self.frame.size.width, self.frame.size.height]]
|
46
|
+
end
|
82
47
|
|
83
|
-
|
84
|
-
|
85
|
-
|
48
|
+
def width
|
49
|
+
self.frame.size.width
|
50
|
+
end
|
86
51
|
|
87
|
-
|
88
|
-
|
89
|
-
|
52
|
+
def setWidth value
|
53
|
+
self.frame = [[self.frame.origin.x, self.frame.origin.y], [value, self.frame.size.height]]
|
54
|
+
end
|
90
55
|
|
91
|
-
|
92
|
-
|
93
|
-
|
56
|
+
def height
|
57
|
+
self.frame.size.height
|
58
|
+
end
|
94
59
|
|
95
|
-
|
96
|
-
|
60
|
+
def setHeight value
|
61
|
+
self.frame = [[self.frame.origin.x, self.frame.origin.y], [self.frame.size.width, value]]
|
62
|
+
end
|
97
63
|
end
|
98
64
|
end
|
99
65
|
end
|
100
66
|
|
101
|
-
UIView.send(:include, SimpleView::
|
67
|
+
UIView.send(:include, SimpleView::UIViewExtensions::Traversing)
|
68
|
+
UIView.send(:include, SimpleView::UIViewExtensions::Dimensions)
|