实现tableViewCell高度自适应(内嵌UITextVeiw)

iOS进度条圆形 水平 竖直带动画

- (void)textViewDidChange:(UITextView *)textView {
    
    CGRect bounds = textView.bounds;
    
    // 计算 text view 的高度
    CGSize maxSize = CGSizeMake(bounds.size.width, CGFLOAT_MAX);
    
    CGSize newSize = [textView sizeThatFits:maxSize];
    
    bounds.size = newSize;
    
    textView.bounds = bounds;
    
    UITableView *tableView = [self tableView];
    
    [tableView beginUpdates];
    
    [tableView endUpdates];
}


        _tableView.rowHeight = UITableViewAutomaticDimension;
        _tableView.estimatedRowHeight = 44;
    static func swiftSubString(formart: String...) -> String {
        var result = ""
        
        for params in formart {
            result += params
        }
        return result
    }
+ (NSString *)subString:(NSString *)formart, ... {
    va_list args;
    va_start(args, formart);
    NSString *subStr = [[NSString alloc] initWithFormat:formart arguments:args];
    va_end(args);
    NSLog(@"%@", subStr);
    return subStr;
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容