Skip to content

Commit

Permalink
Added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
myell0w committed Feb 16, 2012
1 parent b7530a1 commit 867c314
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions NGVerticalTabBarController/NGVerticalTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ @interface NGVerticalTabBarController () <UITableViewDataSource, UITableViewDele

// re-defined as read/write
@property (nonatomic, strong, readwrite) NGVerticalTabBar *tabBar;

/** the (computed) frame of the sub-viewcontrollers */
@property (nonatomic, readonly) CGRect childViewControllerFrame;
@property (nonatomic, assign) NSUInteger oldSelectedIndex;

Expand Down Expand Up @@ -228,9 +228,9 @@ - (void)setViewControllers:(NSArray *)viewControllers {

viewControllers_ = [NSMutableArray arrayWithArray:viewControllers];

// add new child view controller
CGRect childViewControllerFrame = self.childViewControllerFrame;

// add new child view controller
for (UIViewController *viewController in viewControllers_) {
if (self.containmentAPISupported) {
[self addChildViewController:viewController];
Expand All @@ -240,8 +240,7 @@ - (void)setViewControllers:(NSArray *)viewControllers {
viewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
}


if (self.selectedIndex == NSNotFound) {
if (self.selectedIndex == NSNotFound && viewControllers_.count > 0) {
[self.view addSubview:[[viewControllers_ objectAtIndex:0] view]];
self.selectedIndex = 0;
} else {
Expand Down Expand Up @@ -375,6 +374,7 @@ - (CGRect)childViewControllerFrame {
}

- (BOOL)containmentAPISupported {
// containment API is supported on iOS 5 and up
static BOOL containmentAPISupported;

static dispatch_once_t onceToken;
Expand Down Expand Up @@ -411,7 +411,7 @@ - (void)callDelegateDidSelectViewController:(UIViewController *)viewController a
}

- (CGFloat)askDelegateForHeightOfTabBarCellAtIndex:(NSUInteger)index {
if(delegateFlags_.heightForTabBarCellAtIndex) {
if (delegateFlags_.heightForTabBarCellAtIndex) {
return [self.delegate heightForTabBarCell:self atIndex:index];
}

Expand Down

0 comments on commit 867c314

Please sign in to comment.