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

FUIButton without Xib #147

Open
foryouforhappy opened this issue Apr 30, 2014 · 2 comments
Open

FUIButton without Xib #147

foryouforhappy opened this issue Apr 30, 2014 · 2 comments

Comments

@foryouforhappy
Copy link

When I use FUIButton without Xib.
eg:
.head file
@Property(strong,nonatomic) FUIButton *btnLogin;
.m file
self.btnLogin = [FUIButton buttonWithType:UIButtonTypeSystem];
self.btnLogin.frame = CGRectMake(self.edtPwd.frame.origin.x, self.edtPwd.frame.origin.y + self.edtPwd.frame.size.height + 10, self.edtPwd.frame.size.width, self.edtPwd.frame.size.height);
self.btnLogin.buttonColor = [UIColor redColor];
self.btnLogin.cornerRadius = 6.0f;
[self.btnLogin setTitle:@"Login" forState:UIControlStateNormal];
[self.view addSubview:self.btnLogin];
//
when it run at IOS6 ,
error info:
[UIRoundedRectButton setButtonColor:]: unrecognized selector sent to instance
//

it's OK in IOS7

@ramki1979
Copy link

UIButtonTypeSystem -> is available only from iOS 7.

@jamieomatthews
Copy link
Contributor

For FlatUIKit you probably want to be using UIButtonTypeCustom. I'm going to look into adding an initializer that sets this for you, as several people are having issues related to 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

3 participants