Fixing 2 ios crashes: double-tapping instapaper button and a weird keyboard condition.

This commit is contained in:
Samuel Clay 2013-09-12 17:34:44 -07:00
parent f249bce61d
commit cf6b9b8cb1
2 changed files with 10 additions and 8 deletions

View file

@ -67,13 +67,12 @@
applicationActivities:appActivities];
[shareSheet setValue:[appDelegate.activeStory objectForKey:@"story_title"] forKey:@"subject"];
[shareSheet setCompletionHandler:^(NSString *activityType, BOOL completed) {
if (completed) {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidHide:)
name:UIKeyboardDidHideNotification
object:nil];
// [[NSNotificationCenter defaultCenter] addObserver:self
// selector:@selector(keyboardDidHide:)
// name:UIKeyboardDidHideNotification
// object:nil];
NSString *_completedString;
if ([activityType isEqualToString:UIActivityTypePostToTwitter]) {

View file

@ -111,11 +111,14 @@
self.connection = nil;
if ([responseString compare:RESPONSE_SUCCESS] == NSOrderedSame) {
[self.delegate instapaperAddRequestSucceded:self];
if ([self.delegate respondsToSelector:@selector(instapaperAddRequestSucceded:)])
[self.delegate instapaperAddRequestSucceded:self];
} else if ([responseString compare:RESPONSE_PASSWORD_INCORRECT] == NSOrderedSame) {
[self.delegate instapaperAddRequestIncorrectPassword:self];
if ([self.delegate respondsToSelector:@selector(instapaperAddRequestIncorrectPassword:)])
[self.delegate instapaperAddRequestIncorrectPassword:self];
} else {
[self.delegate instapaperAddRequestFailed:self];
if ([self.delegate respondsToSelector:@selector(instapaperAddRequestFailed:)])
[self.delegate instapaperAddRequestFailed:self];
}
}