diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 9d77203..02f55f0 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -73,7 +73,7 @@ class MainController < UIViewController # You really should create a new style in the stylesheet, # but you can do it inline too, like so rmq.style do |sv| - sv.top = rand(rmq.device.height) + sv.frame = {top: rand(rmq.device.height)} sv.scale = 10.0 end }, @@ -81,7 +81,7 @@ class MainController < UIViewController rmq.animate( duration: 0.2, animations: -> (rmq) { rmq.style do |sv| sv.scale = 1.0 - sv.top = 230 + sv.frame = {top: 230} end }) }) diff --git a/app/stylesheets/main_controller_stylesheet.rb b/app/stylesheets/main_controller_stylesheet.rb index 0ceef90..cc6eb26 100644 --- a/app/stylesheets/main_controller_stylesheet.rb +++ b/app/stylesheets/main_controller_stylesheet.rb @@ -168,15 +168,13 @@ class MainControllerStylesheet < ApplicationStylesheet def popup_wrapper(st) st.hidden = true - st.frame = {w: screen_width - 20, h: 120} - st.centered = :both + st.frame = {w: screen_width - 20, h: 120, centered: :both} st.background_color = color.white st.z_position = 100 end def popup_text_label(st) label st - st.padded = {l: 10, t: 10, b:10, r: 10} st.text_alignment = :left st.color = color.black st.font = font.system(10) diff --git a/templates/collection_view_controller/app/controllers/name_controller.rb b/templates/collection_view_controller/app/controllers/name_controller.rb index 592b088..2dc56c4 100644 --- a/templates/collection_view_controller/app/controllers/name_controller.rb +++ b/templates/collection_view_controller/app/controllers/name_controller.rb @@ -68,8 +68,7 @@ __END__ # 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} - st.centered = :horizontal + st.frame = {t: 10, w: 200, h: 96, centered: :horizontal} st.image = image.resource('logo') st.tag(:reapply_style) end diff --git a/templates/controller/app/controllers/name_controller.rb b/templates/controller/app/controllers/name_controller.rb index b1832ce..d2c3cb6 100644 --- a/templates/controller/app/controllers/name_controller.rb +++ b/templates/controller/app/controllers/name_controller.rb @@ -27,8 +27,7 @@ __END__ # 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} - st.centered = :horizontal + st.frame = {t: 10, w: 200, h: 96, centered: :horizontal} st.image = image.resource('logo') st.tag(:reapply_style) end