Ich verwende eine Bibliothek, die eine xib Datei in Objective-c zu ViewcontrollerProgramatically segue aus xib-Datei erstellen in Storyboard
Ich habe meine Storyboard hat, dass ein zügiges Klasse
I segue von diesem xib erstellen müssen muss Datei in mein Storyboard und gebe einige Daten weiter.
dies ohne Glück versucht
XIB Datei
#import "IncomingMessageCell.h"
@implementation IncomingMessageCell
- (void)awakeFromNib {
UIImage * balloonImage = [UIImage imageNamed:@"bubble-left"];
balloonImage = [balloonImage resizableImageWithCapInsets:(UIEdgeInsets){36, 32, 18, 12}];
self.bubbleView.image = balloonImage;
self.avatarView.layer.cornerRadius = 25;
self.avatarView.clipsToBounds = YES;
self.avatarView.userInteractionEnabled = YES;
UITapGestureRecognizer *tapGesture1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGesture:)];
tapGesture1.numberOfTapsRequired = 1;
[tapGesture1 setDelegate:self];
[self.avatarView addGestureRecognizer:tapGesture1];
}
- (void) tapGesture: (id)sender
{
UIViewController *vc = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil] instantiateViewControllerWithIdentifier:@"yourVcIdentifier"];
[self.navigationController pushViewController:vc animated:YES];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
Wie ist das möglich?
wo versuchst du das? und was ist deine aktuelle VC? –
Ich habe meine Frage aktualisiert –
Also was passiert, wenn Sie tippen? –