2012-07-24 11:44:16 -07:00
|
|
|
//
|
|
|
|
// NBContainerViewController.m
|
|
|
|
// NewsBlur
|
|
|
|
//
|
|
|
|
// Created by Roy Yang on 7/24/12.
|
|
|
|
// Copyright (c) 2012 NewsBlur. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "NBContainerViewController.h"
|
|
|
|
#import "NewsBlurViewController.h"
|
|
|
|
#import "FeedDetailViewController.h"
|
|
|
|
#import "DashboardViewController.h"
|
|
|
|
#import "StoryDetailViewController.h"
|
|
|
|
#import "ShareViewController.h"
|
2012-07-25 17:29:29 -07:00
|
|
|
#import "UserProfileViewController.h"
|
2012-07-24 11:44:16 -07:00
|
|
|
|
|
|
|
#define NB_DEFAULT_MASTER_WIDTH 270
|
2012-07-26 19:15:25 -07:00
|
|
|
#define NB_DEFAULT_STORY_TITLE_HEIGHT 1024 - 640
|
2012-07-24 16:03:16 -07:00
|
|
|
#define NB_DEFAULT_SLIDER_INTERVAL 0.4
|
2012-07-25 20:38:44 -07:00
|
|
|
#define NB_DEFAULT_SHARE_HEIGHT 120
|
2012-07-26 18:07:29 -07:00
|
|
|
#define NB_DEFAULT_STORY_TITLE_SNAP_THRESHOLD 60
|
2012-07-24 11:44:16 -07:00
|
|
|
|
|
|
|
@interface NBContainerViewController ()
|
|
|
|
|
|
|
|
@property (nonatomic, strong) UINavigationController *masterNavigationController;
|
2012-07-24 23:21:28 -07:00
|
|
|
@property (nonatomic, strong) UINavigationController *storyNavigationController;
|
2012-07-24 11:44:16 -07:00
|
|
|
@property (nonatomic, strong) NewsBlurViewController *feedsViewController;
|
|
|
|
@property (nonatomic, strong) FeedDetailViewController *feedDetailViewController;
|
|
|
|
@property (nonatomic, strong) DashboardViewController *dashboardViewController;
|
|
|
|
@property (nonatomic, strong) StoryDetailViewController *storyDetailViewController;
|
|
|
|
@property (nonatomic, strong) ShareViewController *shareViewController;
|
2012-07-25 17:29:29 -07:00
|
|
|
@property (nonatomic, strong) UIView *storyTitlesStub;
|
|
|
|
@property (readwrite) BOOL storyTitlesOnLeft;
|
2012-07-26 18:07:29 -07:00
|
|
|
@property (readwrite) int storyTitlesYCoordinate;
|
|
|
|
|
2012-07-25 20:38:44 -07:00
|
|
|
@property (readwrite) BOOL isSharingStory;
|
2012-07-26 11:11:43 -07:00
|
|
|
@property (readwrite) BOOL isHidingStory;
|
2012-07-24 15:29:01 -07:00
|
|
|
@property (readwrite) BOOL feedDetailIsVisible;
|
|
|
|
|
2012-07-26 19:15:25 -07:00
|
|
|
@property (nonatomic, strong) UIPopoverController *popoverController;
|
|
|
|
|
2012-07-24 11:44:16 -07:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation NBContainerViewController
|
|
|
|
|
|
|
|
@synthesize appDelegate;
|
|
|
|
@synthesize masterNavigationController;
|
|
|
|
@synthesize feedsViewController;
|
|
|
|
@synthesize feedDetailViewController;
|
|
|
|
@synthesize dashboardViewController;
|
|
|
|
@synthesize storyDetailViewController;
|
|
|
|
@synthesize shareViewController;
|
2012-07-24 15:29:01 -07:00
|
|
|
@synthesize feedDetailIsVisible;
|
2012-07-24 23:21:28 -07:00
|
|
|
@synthesize storyNavigationController;
|
2012-07-25 10:50:52 -07:00
|
|
|
@synthesize storyTitlesYCoordinate;
|
2012-07-25 17:29:29 -07:00
|
|
|
@synthesize storyTitlesOnLeft;
|
|
|
|
@synthesize popoverController;
|
|
|
|
@synthesize storyTitlesStub;
|
2012-07-25 20:38:44 -07:00
|
|
|
@synthesize isSharingStory;
|
2012-07-26 11:11:43 -07:00
|
|
|
@synthesize isHidingStory;
|
2012-07-24 11:44:16 -07:00
|
|
|
|
|
|
|
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
|
|
|
{
|
|
|
|
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
|
|
|
if (self) {
|
|
|
|
// Custom initialization
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)viewDidLoad
|
|
|
|
{
|
2012-07-24 23:21:28 -07:00
|
|
|
|
2012-07-24 11:44:16 -07:00
|
|
|
[super viewDidLoad];
|
|
|
|
// Do any additional setup after loading the view.
|
2012-07-24 23:21:28 -07:00
|
|
|
|
2012-07-25 20:38:44 -07:00
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShowOrHide:) name:UIKeyboardWillShowNotification object:nil];
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShowOrHide:) name:UIKeyboardWillHideNotification object:nil];
|
2012-07-24 23:21:28 -07:00
|
|
|
|
2012-07-24 11:44:16 -07:00
|
|
|
self.view.backgroundColor = [UIColor blackColor];
|
|
|
|
|
|
|
|
self.masterNavigationController = appDelegate.navigationController;
|
|
|
|
self.feedsViewController = appDelegate.feedsViewController;
|
|
|
|
self.dashboardViewController = appDelegate.dashboardViewController;
|
2012-07-24 15:29:01 -07:00
|
|
|
self.feedDetailViewController = appDelegate.feedDetailViewController;
|
|
|
|
self.storyDetailViewController = appDelegate.storyDetailViewController;
|
2012-07-25 20:38:44 -07:00
|
|
|
self.shareViewController = appDelegate.shareViewController;
|
2012-07-24 11:44:16 -07:00
|
|
|
|
|
|
|
// adding dashboardViewController
|
|
|
|
[self addChildViewController:self.dashboardViewController];
|
|
|
|
[self.view addSubview:self.dashboardViewController.view];
|
|
|
|
[self.dashboardViewController didMoveToParentViewController:self];
|
2012-07-24 15:29:01 -07:00
|
|
|
|
|
|
|
// adding master navigation controller
|
|
|
|
[self addChildViewController:self.masterNavigationController];
|
|
|
|
[self.view addSubview:self.masterNavigationController.view];
|
|
|
|
[self.masterNavigationController didMoveToParentViewController:self];
|
2012-07-24 16:03:16 -07:00
|
|
|
|
2012-07-24 23:21:28 -07:00
|
|
|
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:self.storyDetailViewController];
|
|
|
|
self.storyNavigationController = nav;
|
|
|
|
|
2012-07-25 10:50:52 -07:00
|
|
|
// set default y coordinate for feedDetailY from saved preferences
|
|
|
|
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
|
|
|
|
NSInteger savedStoryTitlesYCoordinate = [userPreferences integerForKey:@"storyTitlesYCoordinate"];
|
2012-07-25 17:29:29 -07:00
|
|
|
if (savedStoryTitlesYCoordinate == 1004) {
|
2012-07-25 10:50:52 -07:00
|
|
|
self.storyTitlesYCoordinate = savedStoryTitlesYCoordinate;
|
2012-07-25 17:29:29 -07:00
|
|
|
self.storyTitlesOnLeft = YES;
|
|
|
|
} else if (savedStoryTitlesYCoordinate) {
|
|
|
|
self.storyTitlesYCoordinate = savedStoryTitlesYCoordinate;
|
|
|
|
self.storyTitlesOnLeft = NO;
|
2012-07-25 10:50:52 -07:00
|
|
|
} else {
|
2012-07-27 12:27:13 -07:00
|
|
|
self.storyTitlesYCoordinate = NB_DEFAULT_STORY_TITLE_HEIGHT;
|
|
|
|
self.storyTitlesOnLeft = NO;
|
2012-07-25 10:50:52 -07:00
|
|
|
}
|
2012-07-25 17:29:29 -07:00
|
|
|
|
|
|
|
// set up story titles stub
|
|
|
|
UIView * storyTitlesPlaceholder = [[UIView alloc] initWithFrame:CGRectZero];
|
|
|
|
storyTitlesPlaceholder.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;;
|
|
|
|
storyTitlesPlaceholder.autoresizesSubviews = YES;
|
|
|
|
storyTitlesPlaceholder.backgroundColor = [UIColor whiteColor];
|
|
|
|
|
|
|
|
self.storyTitlesStub = storyTitlesPlaceholder;
|
|
|
|
[self.view addSubview:self.storyTitlesStub];
|
2012-07-24 11:44:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)viewWillLayoutSubviews {
|
2012-07-24 15:29:01 -07:00
|
|
|
[self adjustDashboardScreen];
|
2012-07-24 11:44:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)viewDidUnload {
|
|
|
|
[super viewDidUnload];
|
|
|
|
// Release any retained subviews of the main view.
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)viewDidAppear:(BOOL)animated {
|
|
|
|
[super viewDidAppear:animated];
|
|
|
|
}
|
|
|
|
|
2012-07-25 20:38:44 -07:00
|
|
|
- (void)dealloc {
|
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
|
|
}
|
|
|
|
|
2012-07-24 11:44:16 -07:00
|
|
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
2012-07-24 15:29:01 -07:00
|
|
|
if (!self.feedDetailIsVisible) {
|
|
|
|
[self adjustDashboardScreen];
|
|
|
|
} else {
|
|
|
|
[self adjustFeedDetailScreen];
|
|
|
|
}
|
2012-07-24 11:44:16 -07:00
|
|
|
}
|
|
|
|
|
2012-07-25 17:29:29 -07:00
|
|
|
# pragma mark Modals and Popovers
|
|
|
|
|
|
|
|
- (void)showUserProfilePopover:(id)sender {
|
|
|
|
if (popoverController == nil) {
|
|
|
|
popoverController = [[UIPopoverController alloc]
|
|
|
|
initWithContentViewController:appDelegate.userProfileViewController];
|
|
|
|
|
|
|
|
popoverController.delegate = self;
|
|
|
|
} else {
|
|
|
|
if (popoverController.isPopoverVisible) {
|
|
|
|
[popoverController dismissPopoverAnimated:YES];
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
[popoverController setContentViewController:appDelegate.userProfileViewController];
|
|
|
|
}
|
|
|
|
|
|
|
|
[popoverController setPopoverContentSize:CGSizeMake(320, 416)];
|
|
|
|
[popoverController presentPopoverFromBarButtonItem:sender
|
|
|
|
permittedArrowDirections:UIPopoverArrowDirectionAny
|
|
|
|
animated:YES];
|
|
|
|
}
|
|
|
|
|
2012-07-24 11:44:16 -07:00
|
|
|
# pragma mark Screen Transitions and Layout
|
|
|
|
|
2012-07-24 15:29:01 -07:00
|
|
|
- (void)adjustDashboardScreen {
|
2012-07-24 11:44:16 -07:00
|
|
|
CGRect vb = [self.view bounds];
|
|
|
|
self.masterNavigationController.view.frame = CGRectMake(0, 0, NB_DEFAULT_MASTER_WIDTH, vb.size.height);
|
|
|
|
self.dashboardViewController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH + 1, 0, vb.size.width - NB_DEFAULT_MASTER_WIDTH - 1, vb.size.height);
|
|
|
|
}
|
|
|
|
|
2012-07-24 15:29:01 -07:00
|
|
|
- (void)adjustFeedDetailScreen {
|
|
|
|
CGRect vb = [self.view bounds];
|
|
|
|
|
|
|
|
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
2012-07-25 17:29:29 -07:00
|
|
|
if (UIInterfaceOrientationIsPortrait(orientation) && !self.storyTitlesOnLeft) {
|
2012-07-24 22:19:40 -07:00
|
|
|
// add the back button
|
2012-07-25 17:29:29 -07:00
|
|
|
self.storyDetailViewController.navigationItem.leftBarButtonItem = self.storyDetailViewController.buttonBack;
|
|
|
|
|
|
|
|
// set center title
|
|
|
|
UIView *titleLabel = [appDelegate makeFeedTitle:appDelegate.activeFeed];
|
|
|
|
self.storyDetailViewController.navigationItem.titleView = titleLabel;
|
2012-07-24 22:19:40 -07:00
|
|
|
|
2012-07-24 15:29:01 -07:00
|
|
|
if ([[self.masterNavigationController viewControllers] containsObject:self.feedDetailViewController]) {
|
|
|
|
[self.masterNavigationController popViewControllerAnimated:NO];
|
|
|
|
}
|
2012-07-25 10:50:52 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(0, 0, vb.size.width, self.storyTitlesYCoordinate);
|
|
|
|
self.feedDetailViewController.view.frame = CGRectMake(0, self.storyTitlesYCoordinate, vb.size.width, vb.size.height - self.storyTitlesYCoordinate);
|
2012-07-25 17:29:29 -07:00
|
|
|
[self.view insertSubview:self.feedDetailViewController.view atIndex:0];
|
2012-07-24 15:29:01 -07:00
|
|
|
[self.masterNavigationController.view removeFromSuperview];
|
|
|
|
} else {
|
2012-07-24 22:19:40 -07:00
|
|
|
// remove the back button
|
2012-07-25 17:29:29 -07:00
|
|
|
self.storyDetailViewController.navigationItem.leftBarButtonItem = nil;
|
|
|
|
|
|
|
|
// remove center title
|
|
|
|
self.storyDetailViewController.navigationItem.titleView = nil;
|
2012-07-24 22:19:40 -07:00
|
|
|
|
2012-07-24 15:29:01 -07:00
|
|
|
if (![[self.masterNavigationController viewControllers] containsObject:self.feedDetailViewController]) {
|
|
|
|
[self.masterNavigationController pushViewController:self.feedDetailViewController animated:NO];
|
|
|
|
}
|
|
|
|
[self.view addSubview:self.masterNavigationController.view];
|
|
|
|
self.masterNavigationController.view.frame = CGRectMake(0, 0, NB_DEFAULT_MASTER_WIDTH, vb.size.height);
|
2012-07-24 23:21:28 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH + 1, 0, vb.size.width - NB_DEFAULT_MASTER_WIDTH - 1, vb.size.height);
|
2012-07-24 15:29:01 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-25 17:29:29 -07:00
|
|
|
- (void)adjustFeedDetailScreenForStoryTitles {
|
|
|
|
CGRect vb = [self.view bounds];
|
2012-07-26 18:07:29 -07:00
|
|
|
if (!self.storyTitlesOnLeft) {
|
|
|
|
if (self.storyTitlesYCoordinate > 890) {
|
|
|
|
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
|
|
|
|
// save coordinate
|
|
|
|
[userPreferences setInteger:1004 forKey:@"storyTitlesYCoordinate"];
|
|
|
|
[userPreferences synchronize];
|
|
|
|
self.storyTitlesYCoordinate = 1004;
|
|
|
|
// slide to the left
|
|
|
|
|
|
|
|
self.storyTitlesOnLeft = YES;
|
|
|
|
|
|
|
|
// remove the back button
|
|
|
|
self.storyDetailViewController.navigationItem.leftBarButtonItem = nil;
|
|
|
|
|
|
|
|
// remove center title
|
|
|
|
self.storyDetailViewController.navigationItem.titleView = nil;
|
|
|
|
|
|
|
|
if (![[self.masterNavigationController viewControllers] containsObject:self.feedDetailViewController]) {
|
|
|
|
[self.masterNavigationController pushViewController:self.feedDetailViewController animated:NO];
|
|
|
|
}
|
|
|
|
|
|
|
|
[self.view addSubview:self.masterNavigationController.view];
|
|
|
|
self.masterNavigationController.view.frame = CGRectMake(-NB_DEFAULT_MASTER_WIDTH, 0, NB_DEFAULT_MASTER_WIDTH, vb.size.height);
|
|
|
|
[UIView animateWithDuration:NB_DEFAULT_SLIDER_INTERVAL delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
|
|
|
|
self.masterNavigationController.view.frame = CGRectMake(0, 0, NB_DEFAULT_MASTER_WIDTH, vb.size.height);
|
|
|
|
self.storyNavigationController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH + 1, 0, vb.size.width - NB_DEFAULT_MASTER_WIDTH - 1, vb.size.height);
|
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
[self.feedDetailViewController checkScroll];
|
|
|
|
[appDelegate adjustStoryDetailWebView];
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
} else if (self.storyTitlesOnLeft) {
|
|
|
|
if (self.storyTitlesYCoordinate == 1004) {
|
|
|
|
return;
|
|
|
|
} else if (self.storyTitlesYCoordinate > 890) {
|
|
|
|
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
|
|
|
|
// save coordinate
|
|
|
|
[userPreferences setInteger:890 forKey:@"storyTitlesYCoordinate"];
|
|
|
|
[userPreferences synchronize];
|
|
|
|
self.storyTitlesYCoordinate = 890;
|
2012-07-25 17:29:29 -07:00
|
|
|
}
|
|
|
|
self.storyTitlesOnLeft = NO;
|
|
|
|
|
|
|
|
// add the back button
|
|
|
|
self.storyDetailViewController.navigationItem.leftBarButtonItem = self.storyDetailViewController.buttonBack;
|
|
|
|
|
|
|
|
// set center title
|
|
|
|
UIView *titleLabel = [appDelegate makeFeedTitle:appDelegate.activeFeed];
|
|
|
|
self.storyDetailViewController.navigationItem.titleView = titleLabel;
|
|
|
|
|
|
|
|
[UIView animateWithDuration:NB_DEFAULT_SLIDER_INTERVAL delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
|
|
|
|
// self.masterNavigationController.view.frame = CGRectMake(-NB_DEFAULT_MASTER_WIDTH, 0, NB_DEFAULT_MASTER_WIDTH, vb.size.height);
|
|
|
|
|
|
|
|
[self.masterNavigationController.view removeFromSuperview];
|
|
|
|
self.storyNavigationController.view.frame = CGRectMake(0, 0, vb.size.width, storyTitlesYCoordinate);
|
|
|
|
|
|
|
|
self.storyTitlesStub.frame = CGRectMake(0, storyTitlesYCoordinate, vb.size.width, vb.size.height - storyTitlesYCoordinate);
|
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
if ([[self.masterNavigationController viewControllers] containsObject:self.feedDetailViewController]) {
|
|
|
|
[self.masterNavigationController popViewControllerAnimated:NO];
|
|
|
|
}
|
|
|
|
[self.view insertSubview:self.feedDetailViewController.view aboveSubview:self.storyTitlesStub];
|
|
|
|
self.feedDetailViewController.view.frame = CGRectMake(0, storyTitlesYCoordinate, vb.size.width, vb.size.height - storyTitlesYCoordinate);
|
|
|
|
self.storyTitlesStub.hidden = YES;
|
2012-07-27 19:42:19 -07:00
|
|
|
[self.feedDetailViewController checkScroll];
|
2012-07-25 17:29:29 -07:00
|
|
|
[appDelegate adjustStoryDetailWebView];
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-24 11:44:16 -07:00
|
|
|
- (void)transitionToFeedDetail {
|
2012-07-24 15:29:01 -07:00
|
|
|
self.feedDetailIsVisible = YES;
|
|
|
|
CGRect vb = [self.view bounds];
|
|
|
|
|
|
|
|
// adding feedDetailViewController
|
|
|
|
[self addChildViewController:self.feedDetailViewController];
|
|
|
|
[self.view addSubview:self.feedDetailViewController.view];
|
|
|
|
[self.feedDetailViewController didMoveToParentViewController:self];
|
|
|
|
|
|
|
|
// adding storyDetailViewController
|
2012-07-24 23:21:28 -07:00
|
|
|
[self addChildViewController:self.storyNavigationController];
|
|
|
|
[self.view addSubview:self.storyNavigationController.view];
|
|
|
|
[self.storyNavigationController didMoveToParentViewController:self];
|
2012-07-24 15:29:01 -07:00
|
|
|
|
2012-07-24 23:21:28 -07:00
|
|
|
// reset the storyDetailViewController components
|
2012-07-24 16:42:18 -07:00
|
|
|
self.storyDetailViewController.webView.hidden = YES;
|
|
|
|
self.storyDetailViewController.bottomPlaceholderToolbar.hidden = NO;
|
2012-07-26 20:13:03 -07:00
|
|
|
self.storyDetailViewController.progressViewContainer.hidden = YES;
|
2012-07-24 23:21:28 -07:00
|
|
|
self.storyDetailViewController.navigationItem.rightBarButtonItems = nil;
|
2012-07-25 10:50:52 -07:00
|
|
|
int unreadCount = appDelegate.unreadCount;
|
|
|
|
if (unreadCount == 0) {
|
|
|
|
self.storyDetailViewController.progressView.progress = 1;
|
|
|
|
} else {
|
|
|
|
self.storyDetailViewController.progressView.progress = 0;
|
|
|
|
}
|
2012-07-24 16:42:18 -07:00
|
|
|
|
2012-07-24 11:44:16 -07:00
|
|
|
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
2012-07-25 17:29:29 -07:00
|
|
|
if (UIInterfaceOrientationIsPortrait(orientation) && !self.storyTitlesOnLeft) {
|
2012-07-26 19:15:25 -07:00
|
|
|
// CASE: story titles on bottom
|
2012-07-25 17:29:29 -07:00
|
|
|
self.storyDetailViewController.navigationItem.leftBarButtonItem = self.storyDetailViewController.buttonBack;
|
|
|
|
|
2012-07-25 10:50:52 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(vb.size.width, 0, vb.size.width, storyTitlesYCoordinate);
|
2012-07-26 11:52:07 -07:00
|
|
|
self.feedDetailViewController.view.frame = CGRectMake(vb.size.width,
|
|
|
|
self.storyTitlesYCoordinate,
|
|
|
|
vb.size.width,
|
|
|
|
vb.size.height - storyTitlesYCoordinate);
|
2012-07-24 15:29:01 -07:00
|
|
|
float largeTimeInterval = NB_DEFAULT_SLIDER_INTERVAL * ( vb.size.width - NB_DEFAULT_MASTER_WIDTH) / vb.size.width;
|
|
|
|
float smallTimeInterval = NB_DEFAULT_SLIDER_INTERVAL * NB_DEFAULT_MASTER_WIDTH / vb.size.width;
|
|
|
|
|
|
|
|
[UIView animateWithDuration:largeTimeInterval delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
|
2012-07-25 10:50:52 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH + 1, 0, vb.size.width, self.storyTitlesYCoordinate);
|
2012-07-26 11:52:07 -07:00
|
|
|
self.feedDetailViewController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH + 1,
|
|
|
|
self.storyTitlesYCoordinate,
|
|
|
|
vb.size.width,
|
|
|
|
vb.size.height - storyTitlesYCoordinate);
|
2012-07-24 15:29:01 -07:00
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
|
|
|
|
[UIView animateWithDuration:smallTimeInterval delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
|
2012-07-25 10:50:52 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(0, 0, vb.size.width, self.storyTitlesYCoordinate);
|
|
|
|
self.feedDetailViewController.view.frame = CGRectMake(0, self.storyTitlesYCoordinate, vb.size.width, vb.size.height - storyTitlesYCoordinate);
|
2012-07-25 17:29:29 -07:00
|
|
|
self.masterNavigationController.view.frame = CGRectMake(-NB_DEFAULT_MASTER_WIDTH, 0, NB_DEFAULT_MASTER_WIDTH, vb.size.height);
|
2012-07-24 15:29:01 -07:00
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
[self.dashboardViewController.view removeFromSuperview];
|
|
|
|
[self.masterNavigationController.view removeFromSuperview];
|
|
|
|
}];
|
2012-07-25 17:29:29 -07:00
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
|
|
// set center title
|
|
|
|
UIView *titleLabel = [appDelegate makeFeedTitle:appDelegate.activeFeed];
|
|
|
|
self.storyDetailViewController.navigationItem.titleView = titleLabel;
|
|
|
|
|
|
|
|
// // set right avatar title image
|
|
|
|
// if (appDelegate.isSocialView) {
|
|
|
|
// UIButton *titleImageButton = [appDelegate makeRightFeedTitle:appDelegate.activeFeed];
|
|
|
|
// [titleImageButton addTarget:self action:@selector(showUserProfilePopover) forControlEvents:UIControlEventTouchUpInside];
|
|
|
|
// UIBarButtonItem *titleImageBarButton = [[UIBarButtonItem alloc]
|
|
|
|
// initWithCustomView:titleImageButton];
|
|
|
|
// self.storyDetailViewController.navigationItem.rightBarButtonItem = titleImageBarButton;
|
|
|
|
// } else {
|
|
|
|
// self.storyDetailViewController.navigationItem.rightBarButtonItem = nil;
|
|
|
|
// }
|
2012-07-24 11:44:16 -07:00
|
|
|
|
2012-07-24 15:29:01 -07:00
|
|
|
} else {
|
2012-07-26 19:15:25 -07:00
|
|
|
// CASE: story titles on left
|
2012-07-25 17:29:29 -07:00
|
|
|
self.storyDetailViewController.navigationItem.leftBarButtonItem = nil;
|
|
|
|
|
2012-07-24 15:29:01 -07:00
|
|
|
[self.masterNavigationController pushViewController:self.feedDetailViewController animated:YES];
|
2012-07-26 19:15:25 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(vb.size.width, 0, vb.size.width - NB_DEFAULT_MASTER_WIDTH - 1, vb.size.height);
|
2012-07-25 17:29:29 -07:00
|
|
|
|
2012-07-26 19:15:25 -07:00
|
|
|
|
|
|
|
// CASE: story titles on left
|
|
|
|
[UIView animateWithDuration:.35 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
|
|
|
|
self.storyNavigationController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH + 1,
|
|
|
|
0,
|
|
|
|
vb.size.width - NB_DEFAULT_MASTER_WIDTH - 1,
|
|
|
|
vb.size.height);
|
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
[self.dashboardViewController.view removeFromSuperview];
|
|
|
|
}];
|
|
|
|
|
2012-07-25 17:29:29 -07:00
|
|
|
// remove center title
|
|
|
|
self.storyDetailViewController.navigationItem.titleView = nil;
|
2012-07-24 11:44:16 -07:00
|
|
|
}
|
2012-07-24 15:29:01 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)transitionFromFeedDetail {
|
2012-07-26 19:15:25 -07:00
|
|
|
if (!self.feedDetailIsVisible) {
|
|
|
|
return;
|
|
|
|
}
|
2012-07-26 11:52:07 -07:00
|
|
|
if (self.isSharingStory) {
|
|
|
|
[self transitionFromShareView];
|
|
|
|
}
|
2012-07-26 19:15:25 -07:00
|
|
|
|
2012-07-24 15:29:01 -07:00
|
|
|
self.feedDetailIsVisible = NO;
|
|
|
|
CGRect vb = [self.view bounds];
|
|
|
|
|
|
|
|
// adding dashboardViewController and masterNavigationController
|
|
|
|
[self.view insertSubview:self.dashboardViewController.view atIndex:0];
|
|
|
|
[self.view addSubview:self.masterNavigationController.view];
|
2012-07-24 11:44:16 -07:00
|
|
|
|
2012-07-24 15:29:01 -07:00
|
|
|
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
2012-07-26 19:15:25 -07:00
|
|
|
if (UIInterfaceOrientationIsPortrait(orientation) && !self.storyTitlesOnLeft) {
|
|
|
|
// CASE: story titles on bottom
|
2012-07-24 15:29:01 -07:00
|
|
|
self.dashboardViewController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH + 1, 0, vb.size.width - NB_DEFAULT_MASTER_WIDTH - 1, vb.size.height);
|
|
|
|
self.masterNavigationController.view.frame = CGRectMake(-NB_DEFAULT_MASTER_WIDTH, 0, NB_DEFAULT_MASTER_WIDTH, vb.size.height);
|
|
|
|
|
|
|
|
float largeTimeInterval = NB_DEFAULT_SLIDER_INTERVAL * ( vb.size.width - NB_DEFAULT_MASTER_WIDTH) / vb.size.width;
|
|
|
|
float smallTimeInterval = NB_DEFAULT_SLIDER_INTERVAL * NB_DEFAULT_MASTER_WIDTH / vb.size.width;
|
|
|
|
|
|
|
|
[UIView animateWithDuration:largeTimeInterval delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
|
|
|
|
self.masterNavigationController.view.frame = CGRectMake(0, 0, NB_DEFAULT_MASTER_WIDTH, vb.size.height);
|
2012-07-26 11:52:07 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH,
|
|
|
|
0,
|
|
|
|
vb.size.width,
|
|
|
|
self.storyTitlesYCoordinate);
|
|
|
|
self.feedDetailViewController.view.frame = CGRectMake(NB_DEFAULT_MASTER_WIDTH,
|
|
|
|
self.storyTitlesYCoordinate,
|
|
|
|
vb.size.width,
|
|
|
|
vb.size.height - storyTitlesYCoordinate);
|
2012-07-24 15:29:01 -07:00
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
[UIView animateWithDuration:smallTimeInterval delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
|
2012-07-25 10:50:52 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(vb.size.width, 0, vb.size.width, self.storyTitlesYCoordinate);
|
2012-07-26 11:52:07 -07:00
|
|
|
self.feedDetailViewController.view.frame = CGRectMake(vb.size.width,
|
|
|
|
self.storyTitlesYCoordinate,
|
|
|
|
vb.size.width,
|
|
|
|
vb.size.height - storyTitlesYCoordinate);
|
2012-07-24 15:29:01 -07:00
|
|
|
} completion:^(BOOL finished) {
|
2012-07-24 23:21:28 -07:00
|
|
|
[self.storyNavigationController.view removeFromSuperview];
|
2012-07-24 15:29:01 -07:00
|
|
|
[self.feedDetailViewController.view removeFromSuperview];
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
} else {
|
2012-07-26 19:15:25 -07:00
|
|
|
// CASE: story titles on left
|
|
|
|
[UIView animateWithDuration:0.35 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
|
|
|
|
self.storyNavigationController.view.frame = CGRectMake(vb.size.width,
|
|
|
|
0,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
self.storyNavigationController.view.frame.size.height);
|
|
|
|
self.dashboardViewController.view.frame = CGRectMake(0,
|
|
|
|
0,
|
|
|
|
vb.size.width - NB_DEFAULT_MASTER_WIDTH - 1,
|
|
|
|
vb.size.height);
|
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
|
|
|
|
}];
|
2012-07-24 15:29:01 -07:00
|
|
|
}
|
2012-07-24 11:44:16 -07:00
|
|
|
}
|
|
|
|
|
2012-07-25 20:38:44 -07:00
|
|
|
- (void)transitionToShareView {
|
|
|
|
if (isSharingStory) {
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
CGRect vb = [self.view bounds];
|
|
|
|
self.isSharingStory = YES;
|
|
|
|
|
2012-07-26 11:11:43 -07:00
|
|
|
// adding shareViewController
|
2012-07-25 20:38:44 -07:00
|
|
|
[self addChildViewController:self.shareViewController];
|
2012-07-26 11:52:07 -07:00
|
|
|
[self.view insertSubview:self.shareViewController.view aboveSubview:self.storyNavigationController.view];
|
2012-07-25 20:38:44 -07:00
|
|
|
[self.shareViewController didMoveToParentViewController:self];
|
|
|
|
|
2012-07-26 11:52:07 -07:00
|
|
|
self.shareViewController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
vb.size.height,
|
|
|
|
self.storyDetailViewController.view.frame.size.width,
|
|
|
|
NB_DEFAULT_SHARE_HEIGHT);
|
2012-07-26 10:17:08 -07:00
|
|
|
[self.shareViewController.commentField becomeFirstResponder];
|
2012-07-25 20:38:44 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)transitionFromShareView {
|
|
|
|
if (!isSharingStory) {
|
|
|
|
return;
|
|
|
|
} else {
|
2012-07-26 11:52:07 -07:00
|
|
|
CGRect vb = [self.view bounds];
|
2012-07-25 20:38:44 -07:00
|
|
|
self.isSharingStory = NO;
|
2012-07-26 11:52:07 -07:00
|
|
|
|
|
|
|
if ([self.shareViewController.commentField isFirstResponder]) {
|
|
|
|
self.isHidingStory = YES; // the flag allows the keyboard animation to also slide down the share view
|
|
|
|
[self.shareViewController.commentField resignFirstResponder];
|
|
|
|
} else {
|
|
|
|
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
2012-07-27 13:21:42 -07:00
|
|
|
if (UIInterfaceOrientationIsPortrait(orientation) && !self.storyTitlesOnLeft) {
|
2012-07-26 11:52:07 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
0,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
storyTitlesYCoordinate);
|
|
|
|
} else {
|
|
|
|
self.storyNavigationController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
0,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
vb.size.height);
|
|
|
|
}
|
|
|
|
|
|
|
|
[UIView animateWithDuration:NB_DEFAULT_SLIDER_INTERVAL animations:^{
|
|
|
|
self.shareViewController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
vb.size.height,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
NB_DEFAULT_SHARE_HEIGHT);
|
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
[self.shareViewController.view removeFromSuperview];
|
|
|
|
}];
|
|
|
|
}
|
2012-07-25 20:38:44 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-25 10:50:52 -07:00
|
|
|
- (void)dragStoryToolbar:(int)yCoordinate {
|
2012-07-25 17:29:29 -07:00
|
|
|
|
|
|
|
CGRect vb = [self.view bounds];
|
2012-07-26 19:34:01 -07:00
|
|
|
// account for top toolbar and status bar
|
2012-07-25 17:29:29 -07:00
|
|
|
yCoordinate = yCoordinate + 44 + 20;
|
2012-07-25 10:50:52 -07:00
|
|
|
|
2012-07-25 17:29:29 -07:00
|
|
|
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
|
|
|
|
|
2012-07-26 18:07:29 -07:00
|
|
|
if (yCoordinate > 344 && yCoordinate <= (vb.size.height)) {
|
2012-07-25 10:50:52 -07:00
|
|
|
|
|
|
|
// save coordinate
|
|
|
|
self.storyTitlesYCoordinate = yCoordinate;
|
|
|
|
[userPreferences setInteger:yCoordinate forKey:@"storyTitlesYCoordinate"];
|
|
|
|
[userPreferences synchronize];
|
|
|
|
|
|
|
|
// change frames
|
|
|
|
|
2012-07-26 11:52:07 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
0,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
yCoordinate);
|
2012-07-25 17:29:29 -07:00
|
|
|
if (self.storyTitlesOnLeft) {
|
|
|
|
self.storyTitlesStub.hidden = NO;
|
2012-07-26 11:52:07 -07:00
|
|
|
self.storyTitlesStub.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
yCoordinate,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
vb.size.height - yCoordinate);
|
2012-07-25 17:29:29 -07:00
|
|
|
} else {
|
2012-07-26 11:52:07 -07:00
|
|
|
self.feedDetailViewController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
yCoordinate,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
vb.size.height - yCoordinate);
|
2012-07-25 17:29:29 -07:00
|
|
|
[self.feedDetailViewController checkScroll];
|
|
|
|
}
|
2012-07-26 18:07:29 -07:00
|
|
|
} else if (yCoordinate >= (vb.size.height)){
|
2012-07-25 17:29:29 -07:00
|
|
|
// save coordinate
|
|
|
|
[userPreferences setInteger:1004 forKey:@"storyTitlesYCoordinate"];
|
|
|
|
[userPreferences synchronize];
|
|
|
|
self.storyTitlesYCoordinate = 1004;
|
2012-07-26 11:52:07 -07:00
|
|
|
self.storyNavigationController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
0,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
vb.size.height);
|
|
|
|
if (self.storyTitlesOnLeft) {
|
2012-07-25 17:29:29 -07:00
|
|
|
self.storyTitlesStub.hidden = NO;
|
2012-07-26 11:52:07 -07:00
|
|
|
self.storyTitlesStub.frame = CGRectMake(self.feedDetailViewController.view.frame.origin.x,
|
|
|
|
0,
|
|
|
|
self.feedDetailViewController.view.frame.size.width,
|
|
|
|
0);
|
2012-07-25 17:29:29 -07:00
|
|
|
}
|
|
|
|
}
|
2012-07-25 10:50:52 -07:00
|
|
|
}
|
2012-07-25 20:38:44 -07:00
|
|
|
|
|
|
|
-(void)keyboardWillShowOrHide:(NSNotification*)notification {
|
|
|
|
NSDictionary *userInfo = notification.userInfo;
|
|
|
|
NSTimeInterval duration = [[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue];
|
|
|
|
UIViewAnimationCurve curve = [[userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] intValue];
|
|
|
|
|
|
|
|
CGRect vb = [self.view bounds];
|
|
|
|
CGRect keyboardFrame = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
2012-07-26 11:52:07 -07:00
|
|
|
self.shareViewController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
vb.size.height,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
NB_DEFAULT_SHARE_HEIGHT);
|
|
|
|
|
2012-07-26 11:11:43 -07:00
|
|
|
CGRect storyNavigationFrame = self.storyNavigationController.view.frame;
|
2012-07-26 11:52:07 -07:00
|
|
|
CGRect shareViewFrame = self.shareViewController.view.frame;
|
|
|
|
|
2012-07-25 20:38:44 -07:00
|
|
|
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
|
|
|
|
|
|
|
if ([notification.name isEqualToString:@"UIKeyboardWillShowNotification"]) {
|
|
|
|
if (UIInterfaceOrientationIsPortrait(orientation)) {
|
2012-07-27 13:21:42 -07:00
|
|
|
if (!self.storyTitlesOnLeft) {
|
|
|
|
int newStoryNavigationFrameHeight = vb.size.height - NB_DEFAULT_SHARE_HEIGHT - keyboardFrame.size.height + 44;
|
|
|
|
if (storyNavigationFrame.size.height < newStoryNavigationFrameHeight) {
|
|
|
|
storyNavigationFrame.size.height = newStoryNavigationFrameHeight;
|
|
|
|
}
|
2012-07-26 19:15:25 -07:00
|
|
|
}
|
2012-07-25 20:38:44 -07:00
|
|
|
shareViewFrame.origin.y = vb.size.height - NB_DEFAULT_SHARE_HEIGHT - keyboardFrame.size.height;
|
|
|
|
} else {
|
2012-07-26 11:11:43 -07:00
|
|
|
storyNavigationFrame.size.height = vb.size.height - NB_DEFAULT_SHARE_HEIGHT - keyboardFrame.size.width + 44;
|
2012-07-25 20:38:44 -07:00
|
|
|
shareViewFrame.origin.y = vb.size.height - NB_DEFAULT_SHARE_HEIGHT - keyboardFrame.size.width;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (UIInterfaceOrientationIsPortrait(orientation)) {
|
2012-07-26 11:11:43 -07:00
|
|
|
storyNavigationFrame.size.height = vb.size.height - NB_DEFAULT_SHARE_HEIGHT + 44;
|
|
|
|
shareViewFrame.origin.y = vb.size.height - NB_DEFAULT_SHARE_HEIGHT;
|
2012-07-25 20:38:44 -07:00
|
|
|
} else {
|
2012-07-26 11:11:43 -07:00
|
|
|
storyNavigationFrame.size.height = vb.size.height - NB_DEFAULT_SHARE_HEIGHT + 44;
|
2012-07-25 20:38:44 -07:00
|
|
|
shareViewFrame.origin.y = vb.size.height - NB_DEFAULT_SHARE_HEIGHT;
|
|
|
|
}
|
|
|
|
}
|
2012-07-26 11:52:07 -07:00
|
|
|
|
2012-07-27 13:21:42 -07:00
|
|
|
// CASE: when dismissing the keyboard but not dismissing the share view
|
2012-07-26 11:11:43 -07:00
|
|
|
if ([notification.name isEqualToString:@"UIKeyboardWillHideNotification"] && !self.isHidingStory) {
|
|
|
|
self.storyNavigationController.view.frame = storyNavigationFrame;
|
2012-07-27 13:21:42 -07:00
|
|
|
// CASE: when dismissing the keyboard AND dismissing the share view
|
2012-07-26 11:11:43 -07:00
|
|
|
} else if ([notification.name isEqualToString:@"UIKeyboardWillHideNotification"] && self.isHidingStory) {
|
|
|
|
self.storyNavigationController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
0,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
storyTitlesYCoordinate);
|
2012-07-25 20:38:44 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
[UIView animateWithDuration:duration
|
|
|
|
delay:0
|
|
|
|
options:UIViewAnimationOptionBeginFromCurrentState | curve
|
|
|
|
animations:^{
|
2012-07-26 11:11:43 -07:00
|
|
|
if (self.isHidingStory) {
|
|
|
|
self.shareViewController.view.frame = CGRectMake(self.storyNavigationController.view.frame.origin.x,
|
|
|
|
vb.size.height,
|
|
|
|
self.storyNavigationController.view.frame.size.width,
|
|
|
|
NB_DEFAULT_SHARE_HEIGHT);
|
|
|
|
} else {
|
2012-07-26 13:54:45 -07:00
|
|
|
self.shareViewController.view.frame = shareViewFrame;
|
|
|
|
self.storyNavigationController.view.frame = storyNavigationFrame;
|
2012-07-26 11:11:43 -07:00
|
|
|
}
|
2012-07-25 20:38:44 -07:00
|
|
|
|
|
|
|
} completion:^(BOOL finished) {
|
|
|
|
if ([notification.name isEqualToString:@"UIKeyboardWillShowNotification"]) {
|
2012-07-26 11:11:43 -07:00
|
|
|
self.storyNavigationController.view.frame = storyNavigationFrame;
|
2012-07-26 11:52:07 -07:00
|
|
|
// [self.storyDetailViewController scrolltoBottom];
|
2012-07-26 11:11:43 -07:00
|
|
|
} else {
|
2012-07-26 11:52:07 -07:00
|
|
|
// remove the shareViewController after keyboard slides down
|
2012-07-26 11:11:43 -07:00
|
|
|
if (self.isHidingStory) {
|
2012-07-26 11:52:07 -07:00
|
|
|
self.isHidingStory = NO;
|
|
|
|
[self.shareViewController.view removeFromSuperview];
|
2012-07-26 11:11:43 -07:00
|
|
|
}
|
2012-07-25 20:38:44 -07:00
|
|
|
}
|
|
|
|
}];
|
|
|
|
}
|
2012-07-25 17:29:29 -07:00
|
|
|
|
|
|
|
@end
|