BSErrorMessageView, 文本字段的错误消息视图

分享于 

2分钟阅读

GitHub

  繁體
Error message view for text field
  • 源代码名称:BSErrorMessageView
  • 源代码网址:http://www.github.com/Beniamiiin/BSErrorMessageView
  • BSErrorMessageView源代码文档
  • BSErrorMessageView源代码下载
  • Git URL:
    git://www.github.com/Beniamiiin/BSErrorMessageView.git
    Git Clone代码到本地:
    git clone http://www.github.com/Beniamiiin/BSErrorMessageView
    Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/Beniamiiin/BSErrorMessageView
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    
    BSErrorMessageView

    文本字段的错误消息视图

    Image

    安装

    pod 'BSErrorMessageView', :git => 'https://github.com/BenjaminSarkisyan/BSErrorMessageView.git'

    用法

    设置消息视图,带有默认设置

    
    [self.loginTextField bs_setupErrorMessageViewWithMessage:@"Minimum 3 characters"];
    
    
    [self.emailTextField bs_setupErrorMessageViewWithMessage:@"Incorrect email format"];
    
    
    
    

    或者,如果你想要设置消息视图,则

    
    BSErrorMessageView *errorMessageView = [BSErrorMessageView errorMessageViewWithMessage:@"Minimum 3 characters"];
    
    
    errorMessageView.mainTintColor = [UIColor greenColor];
    
    
    errorMessageView.textFont = [UIFont systemFontOfSize:16.f];
    
    
    
    [self.loginTextField bs_setupErrorMessageViewWithView:errorMessageView];
    
    
    
    

    显示/隐藏方法

    
    [self.loginTextField bs_showError];
    
    
    [self.emailTextField bs_hideError];
    
    
    
    

    文本  TEX  VIEW  Message  字段  
    相关文章