Skip to content

Restyle! on modal not working? #157

@exocode

Description

@exocode

Could it be, that modals dont restyle?
(I am working with teacup along promotion)

I have this simple UIView which works with restyle!

class HomeScreen < PM::Screen

  title "Dashboard"

  stylesheet :home_screen

  layout :layout_style do
    subview UILabel, :featured_title
  end

  def on_load
    open_modal WelcomeScreen  
  end

  def on_rotate
    self.view.backgroundColor = UIColor.grayColor
    self.view.restyle!
  end
end

But this does not work (same code in a modal window)

class WelcomeScreen < PM::Screen

  title "Please login first"

  stylesheet :welcome

  layout :welcome_background do
    subview UILabel, :featured_title
  end

  def on_rotate
    self.view.backgroundColor = UIColor.grayColor
    self.view.restyle!
  end

  def dismiss_modal
    close saved: true
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions