Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle! on modal not working? #157

Open
exocode opened this issue Apr 4, 2014 · 1 comment
Open

Restyle! on modal not working? #157

exocode opened this issue Apr 4, 2014 · 1 comment

Comments

@exocode
Copy link

exocode commented Apr 4, 2014

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
@colinta
Copy link
Owner

colinta commented Apr 4, 2014

That's strange, for sure.  Can you upload a project that demonstrates this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants