Skip to content

Instantly share code, notes, and snippets.

@kenshin03
Created May 1, 2013 08:25
Show Gist options
  • Save kenshin03/5494312 to your computer and use it in GitHub Desktop.
Save kenshin03/5494312 to your computer and use it in GitHub Desktop.
comments view controller
-(IBAction)commentButtonTapped:(id)sender {
if (self.commentsPostingView.hidden == YES){
if (self.commentsViewController != nil){
self.commentsViewController = nil;
[self.commentsViewController.view removeFromSuperview];
[self.commentsViewController removeFromParentViewController];
}
self.commentsViewController = [[PSHCommentsViewController alloc] init];
self.commentsViewController.delegate = self;
self.commentsViewController.feedItemGraphID = self.feedItemGraphID;
[self addChildViewController:self.commentsViewController];
[self.commentsPostingView addSubview:self.commentsViewController.view];
[self animateShowCommentsPostingView];
}else{
[self animateHideCommentsPostingView];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment