Created
June 8, 2011 23:08
-
-
Save rainhead/1015680 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
@implementation TTPostController | |
- (void)dismissAnimationDidStop { | |
if ([_delegate respondsToSelector:@selector(postController:didPostText:withResult:)]) { | |
// _result is a NewConversationController instance w/ retainCount of 2 | |
[_delegate postController:self didPostText:_textView.text withResult:_result]; | |
} | |
TT_RELEASE_SAFELY(_originView); | |
[self dismissPopupViewControllerAnimated:NO]; | |
} | |
... | |
@end | |
@implementation XXXAppDelegate | |
- (void)postController:(TTPostController *)postController didPostText:(NSString *)text withResult:(id)result { | |
// result == postController | |
if ([result isKindOfClass:[NewConversationModel class]]) { | |
TTNavigator *navigator = [TTNavigator navigator]; | |
NSString *convoURL = ((NewConversationModel *)result).URL; | |
NSString *streamURL = [NSString stringWithFormat:@"tt://feed/%d", FeedTypeStream]; | |
[navigator openURLAction:[[TTURLAction actionWithURLPath:convoURL] applyParentURLPath:streamURL]]; | |
} | |
} | |
.. | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment