Pixate / pixate-freestyle-ios

Pixate Freestyle for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autolayout issue

binyamg opened this issue · comments

  • I am just starting to use Freestyle in a project that uses autolayout.
  • I have a UIButton subclass where I added my own image and label and lay them out side by side using autolayout.
  • I get the following error: "Auto Layout still required after executing -layoutSubviews. QButton's implementation of -layoutSubviews needs to call super".

Here is my scss style for button:

view.light-theme {

    button {
        border-radius: $button-border-radius;   

        label {         
            font-family: $button-text-font;
            font-size: $button-text-size;
            font-weight: $button-font-weight;
            text-transform: uppercase;
        }
    }


    button.flat{

        label{
            color: $button-flat-light-theme-normal-text-color;
        }

        &:normal{
            background-color: $button-flat-light-theme-normal-bg-color;
        }

        &:highlighted{
            background-color: $button-flat-light-theme-highlighted-bg-color;
        }
        &:selected{
            background-color: $button-flat-light-theme-selected-bg-color;
        }
        &:disabled{
            background-color: $button-flat-light-theme-disabled-bg-color;

            label {
                color: $button-flat-light-theme-disabled-text-color;
            }
        }
    }         

}
  • Calling [PixateFreestyle updateStyles:self] solved the issue.