Created
January 23, 2014 14:21
-
-
Save haldun/8579213 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender | |
{ | |
if ([identifier isEqualToString:@"NewPhotoAdded"]) { | |
if ([self.titleTextField.text length] == 0) { | |
[self alert:@"Title'i doldur haci"]; | |
return NO; | |
} | |
if ([self.remoteIDTextField.text length] == 0) { | |
[self alert:@"remote id'yi doldur haci"]; | |
return NO; | |
} | |
return YES; | |
} | |
return [super shouldPerformSegueWithIdentifier:identifier sender:sender]; | |
} | |
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | |
{ | |
[self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; | |
if ([segue.identifier isEqualToString:@"NewPhotoAdded"]) { | |
self.photo = [[FZMPhoto alloc] init]; | |
self.photo.title = self.titleTextField.text; | |
self.photo.remoteIdentifier = self.remoteIDTextField.text; | |
self.photo.remoteURL = self.remoteURLTextField.text; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment