我有 UICollectionView 和 Header。我有文本字段和图像。我确实尝试推送 segue 工作正常。但我需要调用 segue!任何帮助将不胜感激
头文件.h
@interface HeaderRV : UICollectionReusableView
@property (weak, nonatomic) IBOutlet UITextField *searchField;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
- (IBAction)backButton:(id)sender;
@end
头文件.m
@implementation HeaderRV
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}
- (IBAction)backButton:(id)sender {
if ([self.searchField isEditing]) {
[self.searchField resignFirstResponder];
}
else{
//segue need to be here
}
}
@end