AddSightingViewControler.h
@property (weak, nonatomic) IBOutlet UITextField *estrenoInput;
AddSightingViewControler.m
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"ReturnInput"]) {
if ([self.movieTitleInput.text length] || [self.generoInput.text length] || [self.directorInput.text length]|| [self.estrenoInput.text length] )
{
MovieSighting *sighting;
NSUInteger *valor = (NSUInteger *)[[self.estrenoInput text] integerValue];
sighting = [[MovieSighting alloc] initWithName:self.movieTitleInput.text anyo:valor genero:self.generoInput.text director:self.directorInput.text];
self.movieSighting = sighting;
}
}
}
I use this: NSUInteger *valor = (NSUInteger *)[[self.estrenoInput text] integerValue];
to convert it but the when I click on Done, the app exit.
Anyone did a different converter?
This:
should be: