应用程序找不到app_width(拼音运动查询)



我的应用找不到app_width .

错误

#<MainStylesheet 的未定义局部变量或方法app_width=" _x002E_..=">(名称错误)

main_stylesheet.rb

class MainStylesheet < ApplicationStylesheet
  ...
  def logo_text(st)
    st.image = image.resource('logo-text')
    if landscape?
    else
      st.frame = {t: 250, w: app_width, h: 60, centered: :horizontal}
    end
  end
end

app_width已被弃用,并在 1.2.0 版中删除。

请改用device_widthscreen_width

最新更新