Skip to content

zhang-yong-shuai/YSExtendTextView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

YSExtendTextView

YSExtendTextView是一款可以根据内容高度自动调整高度的输入框控件。主要应用场景:UITableViewCell里做输入框使用。 用法示例:

// contentView模拟UITableViewCell的contentView
UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(100, 200, 200, 100)];
    [self.view addSubview:contentView];
    contentView.backgroundColor = [UIColor lightGrayColor];
    
    YSExtendTextView *textView = [YSExtendTextView new];
    textView.frame = CGRectMake(15, 5, 170, 90);
    textView.extendDirection = YSTextViewExtendDirectionDownside;// 输入框延伸方向(默认是从中间向两边)
    textView.placeholder = @"请输入文字~";
    [contentView addSubview:textView];

About

An auto extend textView.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published