Open foryouforhappy opened 10 years ago
UIButtonTypeSystem -> is available only from iOS 7.
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
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