使用textField inout更改标签的数据

时间:2016-08-08 07:39:02

标签: uilabel

我想使用textField数据(嵌入在tableViewCell外部)更改标签的文本(嵌入在tableViewCell中)。 任何人都可以使用objective-C共享代码。

这是我的TableViewCell.h文件。

#import <UIKit/UIKit.h>

@interface TableViewCell : UITableViewCell
@property (strong, nonatomic) IBOutlet UILabel *label1;
@property (strong, nonatomic) IBOutlet UILabel *label2;

@end

这是我的故事板控制器文件

#import <UIKit/UIKit.h>
@interface ViewController:UIViewController<UITableViewDelegate,UITableViewDataSource>
{
NSMutableArray *contacts;
}

- (IBAction)leftBtn:(id)sender;
- (IBAction)rightBtn:(id)sender;
- (IBAction)nextBtn:(id)sender;

- (IBAction)SendBtn:(id)sender;
@property (strong, nonatomic) IBOutlet UITableView *tabV1;

@property (strong, nonatomic) IBOutlet UITextField *txtField;
@end

这里我有按钮动作连接,我应该编写实际代码以使用文本字段更改标签的数据。

- (IBAction)leftBtn:(id)sender {


}

0 个答案:

没有答案
相关问题