# WDGTextViewDemo **Repository Path**: SheldonAndHoney/WDGTextViewDemo ## Basic Information - **Project Name**: WDGTextViewDemo - **Description**: 带提示语和字数限制的UITextView - **Primary Language**: Objective-C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-03-17 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # WDGTextViewDemo 带提示语和字数限制的UITextView 1、初始化方法 self.textView = [[WDGTextView alloc] initWithFrame:CGRectMake(15, 100, self.view.frame.size.width - 30, 200) backgroundColor:[UIColor whiteColor] textColor:[UIColor redColor] fontSize:15 placeHolder:@"请输入文本" placeHolderTextColor:[UIColor lightGrayColor] maxTextLength:300 hiddenMaxText:NO]; 2、遵循代理 self.textView.textViewDelegate = self; 3、实现代理方法 //当需要显示字数显示的时候,必须实现这个代理方法,虽然在这里可以什么都不用操作 - (void)refreshTextLimit { } 具体使用详见Demo