扫码关注官方订阅号
我的UITableViewCell里面定义里一个UITextView控件,但是我需要把UITextView里面的数据拿出来上传到后台,好像有一个方法可以在cell类里面获取到controller的对象,希望大神们帮帮忙!谢谢!!!
欢迎选择我的课程,让我们一起见证您的进步~~
你可以使用自定义的cell,在cell里把UITextView outlet出来
使用这个这个方法能够拿到cell对象,cell里面的内容就能拿到了。
(UITableViewCell )tableView:(UITableView )tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
获取的方法有很多种。可以设置cell里面的 textview的delegate到tableview的superview中
把textView outlet到相应的cell,然后这个方法里(UITableViewCell )tableView:(UITableView )tableView cellForRowAtIndexPath:(NSIndexPath )indexPath用cell去获取那个textView就行了
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
你可以使用自定义的cell,在cell里把UITextView outlet出来
使用这个这个方法能够拿到cell对象,cell里面的内容就能拿到了。
(UITableViewCell )tableView:(UITableView )tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
获取的方法有很多种。可以设置cell里面的 textview的delegate到tableview的superview中
把textView outlet到相应的cell,然后这个方法里(UITableViewCell )tableView:(UITableView )tableView cellForRowAtIndexPath:(NSIndexPath )indexPath用cell去获取那个textView就行了