diff --git a/.gitignore b/.gitignore index 60d6791..aea2148 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ build Breakpoints.xcbkptlist Cascade.xcscheme CLCascade.xcscheme -xcschememanagement.plist \ No newline at end of file +xcschememanagement.plist +.svn diff --git a/src/Cascade/CLCascadeNavigationController/CLCascadeNavigationController.h b/src/Cascade/CLCascadeNavigationController/CLCascadeNavigationController.h index a4c1564..34cb05e 100644 --- a/src/Cascade/CLCascadeNavigationController/CLCascadeNavigationController.h +++ b/src/Cascade/CLCascadeNavigationController/CLCascadeNavigationController.h @@ -20,6 +20,8 @@ CLCascadeView* _cascadeView; } +@property (nonatomic, strong, readonly) CLCascadeView* cascadeView; + /* List of CLViewControllers on stock. */ @@ -45,6 +47,7 @@ * If sender is not last, then controller pop next controller and push new view from sender */ - (void) addViewController:(CLViewController*)viewController sender:(CLViewController*)sender animated:(BOOL)animated; +- (void) popPagesFromLastIndexTo:(NSInteger)toIndex; /* First in hierarchy CascadeViewController (opposite to lastCascadeViewController) diff --git a/src/Cascade/CLCascadeNavigationController/CLCascadeNavigationController.m b/src/Cascade/CLCascadeNavigationController/CLCascadeNavigationController.m index 6a713a1..2afcab2 100644 --- a/src/Cascade/CLCascadeNavigationController/CLCascadeNavigationController.m +++ b/src/Cascade/CLCascadeNavigationController/CLCascadeNavigationController.m @@ -11,6 +11,9 @@ #import "CLViewController.h" #import "CLSegmentedView.h" +//#define NSDebugLog( ... ) NSLog( __VA_ARGS__ ) +#define NSDebugLog( ... ) + @interface CLCascadeNavigationController (Private) - (void) addPagesRoundedCorners; - (void) addRoundedCorner:(UIRectCorner)rectCorner toPageAtIndex:(NSInteger)index; @@ -23,14 +26,6 @@ @implementation CLCascadeNavigationController @synthesize viewControllers = _viewControllers; @synthesize leftInset, widerLeftInset; -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - (void)dealloc { @@ -48,6 +43,11 @@ - (void)didReceiveMemoryWarning #pragma mark - View lifecycle +- (CLCascadeView*)cascadeView +{ + return _cascadeView; +} + - (void)viewDidLoad { [super viewDidLoad]; @@ -77,8 +77,48 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface return YES; } -- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration { - [_cascadeView updateContentLayoutToInterfaceOrientation:interfaceOrientation duration:duration]; +-(void)willRotateToInterfaceOrientation:( UIInterfaceOrientation )toInterfaceOrientation_ + duration:( NSTimeInterval )duration_ +{ + //dodikk - blocks are available since iOS4 + [ self.viewControllers enumerateObjectsUsingBlock: ^void(id obj_, NSUInteger idx_, BOOL *stop_) + { + UIViewController* controller_ = (UIViewController*)obj_; + [ controller_ willRotateToInterfaceOrientation: toInterfaceOrientation_ + duration: duration_ ]; + + *stop_ = NO; + } ]; +} + +-(void)didRotateFromInterfaceOrientation:( UIInterfaceOrientation )fromInterfaceOrientation_ +{ + //dodikk - blocks are available since iOS4 + [ self.viewControllers enumerateObjectsUsingBlock: ^void(id obj_, NSUInteger idx_, BOOL *stop_) + { + UIViewController* controller_ = (UIViewController*)obj_; + [ controller_ didRotateFromInterfaceOrientation: fromInterfaceOrientation_ ]; + + *stop_ = NO; + } ]; +} + +- (void)willAnimateRotationToInterfaceOrientation:( UIInterfaceOrientation )interfaceOrientation_ + duration:( NSTimeInterval )duration_ +{ + //dodikk - blocks are available since iOS4 + [ self.viewControllers enumerateObjectsUsingBlock: ^void(id obj_, NSUInteger idx_, BOOL *stop_) + { + UIViewController* controller_ = (UIViewController*)obj_; + [ controller_ willAnimateRotationToInterfaceOrientation: interfaceOrientation_ + duration: duration_ ]; + + *stop_ = NO; + } ]; + + + [_cascadeView updateContentLayoutToInterfaceOrientation: interfaceOrientation_ + duration: duration_ ]; } @@ -189,7 +229,7 @@ - (void) cascadeView:(CLCascadeView*)cascadeView pageDidDisappearAtIndex:(NSInte if (index > [_viewControllers count] - 1) return; UIViewController* controller = [_viewControllers objectAtIndex: index]; - if ([controller respondsToSelector:@selector(pageDidAppear)]) { + if ([controller respondsToSelector:@selector(pageDidDisappear)]) { [controller pageDidDisappear]; } @@ -244,39 +284,63 @@ - (void) setRootViewController:(CLViewController*)viewController animated:(BOOL) } /////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) addViewController:(CLViewController*)viewController sender:(CLViewController*)sender animated:(BOOL)animated { - - // if in not sent from categoirs view - if (sender) { - - // get index of sender - NSInteger indexOfSender = [_viewControllers indexOfObject:sender]; - - // if sender is not last view controller - if (indexOfSender != [_viewControllers count] - 1) { - - // pop views and remove from _viewControllers - [self popPagesFromLastIndexTo:indexOfSender]; - } - } - - // set cascade navigator to view controller - [viewController setCascadeNavigationController: self]; - // add controller to array - [self.viewControllers addObject: viewController]; - - #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 - [self addChildViewController:viewController]; - #endif - - // push view - [_cascadeView pushPage:[viewController view] - fromPage:[sender view] - animated:animated]; - - #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 - [viewController didMoveToParentViewController:self]; - #endif +-(void)addViewController:(CLViewController*)viewController + sender:(CLViewController*)sender + animated:(BOOL)animated +{ + // if in not sent from categoirs view + if (sender) + { + // get index of sender + NSInteger indexOfSender = [_viewControllers indexOfObject:sender]; + + // if sender is not last view controller + if (indexOfSender != [_viewControllers count] - 1) + { + // pop views and remove from _viewControllers + [self popPagesFromLastIndexTo:indexOfSender]; + } + } + + UIView* sender_view_ = [ sender view ]; + UIView* view_to_push_ = [ viewController view ]; + + NSDebugLog + ( + @"CLCascadeNavigationController->addViewController: %@" + @"\n \t\t\t " @"sender: %@" + @"\n \t\t\t " @"animated: %d" + @"\n" + @"\n \t\t\t " @"self->_cascadeView: %@" + @"\n \t\t\t " @"sender->view: %@" + @"\n \t\t\t " @"viewController->view: %@" + , viewController + , sender + , animated + , _cascadeView + , sender_view_ + , view_to_push_ + ); + + // set cascade navigator to view controller + [viewController setCascadeNavigationController: self]; + // add controller to array + [self.viewControllers addObject: viewController]; + + { +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 + [self addChildViewController:viewController]; +#endif + + // push view + [ _cascadeView pushPage: view_to_push_ + fromPage: sender_view_ + animated: animated ]; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 + [viewController didMoveToParentViewController:self]; +#endif + } } /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -350,16 +414,32 @@ - (void) addPagesRoundedCorners { /////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) popPagesFromLastIndexTo:(NSInteger)toIndex { - if (toIndex < 0) toIndex = 0; +-(void)popPagesFromLastIndexTo:(NSInteger)toIndex +{ + NSUInteger view_controllers_count_ = [_viewControllers count]; + if ( 0 == view_controllers_count_ ) + { + return; + } + + if (toIndex < 0) + { + toIndex = 0; + } // index of last page - NSUInteger index = [_viewControllers count] - 1; + NSUInteger index = view_controllers_count_ - 1; // pop page from back NSEnumerator* enumerator = [_viewControllers reverseObjectEnumerator]; // enumarate pages - while ([enumerator nextObject] && _viewControllers.count > toIndex+1) { - + while ([enumerator nextObject] && _viewControllers.count > toIndex+1) + { + if ( ![ _cascadeView canPopPageAtIndex: index ] ) + { + //dodikk - maybe break fits better + continue; + } + #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 UIViewController* viewController = [_viewControllers objectAtIndex:index]; [viewController willMoveToParentViewController:nil]; diff --git a/src/Cascade/CLCascadeNavigationController/CLCascadeView.h b/src/Cascade/CLCascadeNavigationController/CLCascadeView.h index bb5acdf..fa91987 100644 --- a/src/Cascade/CLCascadeNavigationController/CLCascadeView.h +++ b/src/Cascade/CLCascadeNavigationController/CLCascadeView.h @@ -63,7 +63,9 @@ - (void) pushPage:(UIView*)newPage fromPage:(UIView*)fromPage animated:(BOOL)animated; -- (void) popPageAtIndex:(NSInteger)index animated:(BOOL)animated; +-(void)popPageAtIndex:(NSInteger)index animated:(BOOL)animated; +-(BOOL)canPopPageAtIndex:(NSInteger)index; + - (void) popAllPagesAnimated:(BOOL)animated; - (UIView*) loadPageAtIndex:(NSInteger)index; diff --git a/src/Cascade/CLCascadeNavigationController/CLCascadeView.m b/src/Cascade/CLCascadeNavigationController/CLCascadeView.m index a634eed..03fe926 100644 --- a/src/Cascade/CLCascadeNavigationController/CLCascadeView.m +++ b/src/Cascade/CLCascadeNavigationController/CLCascadeView.m @@ -1,4 +1,4 @@ -// + // // CLCascadeView.m // Cascade // @@ -39,7 +39,7 @@ - (CGPoint) calculateOriginOfPageAtIndex:(NSInteger)index; - (void) setProperContentSize; - (void) setProperEdgeInset:(BOOL)animated; - (void) setProperEdgeInset:(BOOL)animated forInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; -- (void) setProperSizesForLodedPages:(UIInterfaceOrientation)interfaceOrientation; +- (void) setProperSizesForLoadedPages:(UIInterfaceOrientation)interfaceOrientation; - (void) unloadPage:(UIView*)page remove:(BOOL)remove; - (void) loadBoundaryPagesIfNeeded; @@ -191,29 +191,67 @@ - (void) pushPage:(UIView*)newPage fromPage:(UIView*)fromPage animated:(BOOL)ani /////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) popPageAtIndex:(NSInteger)index animated:(BOOL)animated { - // get item at index - __unsafe_unretained id item = [_pages objectAtIndex:index]; + +-(BOOL)canPopPageAtIndex:(NSInteger)index +{ + NSRange pages_range_ = { 0, [ _pages count ] }; + BOOL result_ = NSLocationInRange( index, pages_range_ ); + + return result_; +} + +-(NSInteger)normalizePageIndex:(NSInteger)index +{ + NSUInteger pages_count_ = [ _pages count ]; + + if ( index >= pages_count_ ) + { + index = pages_count_ - 1; + } + else if ( index < 0 ) + { + index = 0; + } + + return index; +} + +-(void)popPageAtIndex:(NSInteger)index + animated:(BOOL)animated +{ + NSUInteger pages_count_ = [ _pages count ]; + if ( 0 == pages_count_ ) + { + return; + } + index = [ self normalizePageIndex: index ]; + __unsafe_unretained id item = [_pages objectAtIndex:index]; // check if page is unloaded - if (item != [NSNull null]) { + if (item != [NSNull null]) + { - if (animated) { + if (animated) + { // animate pop [UIView animateWithDuration:0.4f - animations:^ { - [item setAlpha: 0.0f]; - } - completion:^(BOOL finished) { - // unload and remove page - [self unloadPage:item remove:YES]; - // update edge inset - [self setProperEdgeInset: NO]; - // send delegate message - [self didPopPageAtIndex: index]; - }]; + animations:^ + { + [item setAlpha: 0.0f]; + } + completion:^(BOOL finished) + { + // unload and remove page + [self unloadPage:item remove:YES]; + // update edge inset + [self setProperEdgeInset: NO]; + // send delegate message + [self didPopPageAtIndex: index]; + }]; - } else { + } + else + { // unload and remove page [self unloadPage:item remove:YES]; // update edge inset @@ -222,7 +260,8 @@ - (void) popPageAtIndex:(NSInteger)index animated:(BOOL)animated { [self didPopPageAtIndex: index]; } } - + + } @@ -247,6 +286,7 @@ - (void) popAllPagesAnimated:(BOOL)animated { - (UIView*) loadPageAtIndex:(NSInteger)index { // check if index exist if ([self pageExistAtIndex: index]) { + NSLog(@"[CLCascade view loadPageAtIndex] index: %d %d", index, [self pageExistAtIndex: index] ); id item = [_pages objectAtIndex:index]; // if item at index is null @@ -328,14 +368,43 @@ - (void) unloadInvisiblePages { } +-(void)layoutSubviews +{ + UIInterfaceOrientation interfaceOrientation = [ [ UIApplication sharedApplication ] statusBarOrientation ]; + + + // recalculate pages height and width + [ self setProperSizesForLoadedPages: interfaceOrientation ]; + + //dodikk - crash workaround + if ( [ self->_pages isEqual: [ NSNull null ] ] ) + { + return; + } + + [ self->_pages enumerateObjectsUsingBlock: ^void(id obj_, NSUInteger idx_, BOOL *stop_) + { + if (obj_ != [NSNull null]) + { + UIView* page_view_ = ( UIView* )obj_; + [ page_view_ setNeedsLayout ]; + } + + *stop_ = NO; + } ]; + +} + /////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) updateContentLayoutToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration { - // set proper content size +- (void)updateContentLayoutToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation + duration:(NSTimeInterval)duration +{ [self setProperContentSize]; - // set proper edge inset - [self setProperEdgeInset:YES forInterfaceOrientation:interfaceOrientation]; + [self setProperEdgeInset: YES + forInterfaceOrientation: interfaceOrientation ]; + // recalculate pages height and width - [self setProperSizesForLodedPages: interfaceOrientation]; + [ self setProperSizesForLoadedPages: interfaceOrientation ]; } @@ -564,16 +633,17 @@ - (void) setProperEdgeInset:(BOOL)animated forInterfaceOrientation:(UIInterfaceO /////////////////////////////////////////////////////////////////////////////////////////////////// - (UIEdgeInsets) calculateEdgeInset:(UIInterfaceOrientation)interfaceOrientation { - CGFloat leftInset = CATEGORIES_VIEW_WIDTH - _leftInset; - CGFloat rightInset = 0.0f; + CGFloat leftInset = CATEGORIES_VIEW_WIDTH - _leftInset; + CGFloat rightInset = 0.0f; //left inset depends on interface orientation - if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) { - rightInset = 2 * _pageWidth + _leftInset - self.bounds.size.width; - } + if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) + { + rightInset = 2 * _pageWidth + _leftInset - self.bounds.size.width; + } - // return edge inset - return UIEdgeInsetsMake(0.0f, leftInset, 0.0f, rightInset); + // return edge inset + return UIEdgeInsetsMake(0.0f, leftInset, 0.0f, rightInset); } @@ -642,17 +712,21 @@ - (CGSize) calculatePageSize:(UIView*)view { /////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) setProperSizesForLodedPages:(UIInterfaceOrientation)interfaceOrientation { - [_pages enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - if (obj != [NSNull null]) { - UIView* view = (UIView*)obj; - CGRect rect = view.frame; - CGPoint point = [self calculateOriginOfPageAtIndex: idx]; - CGSize size = [self calculatePageSize: obj]; - rect.size = size; - rect.origin = point; - [view setFrame:rect]; - } +-(void)setProperSizesForLoadedPages:(UIInterfaceOrientation)interfaceOrientation +{ + [ _pages enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) + { + if (obj != [NSNull null]) + { + UIView* view = (UIView*)obj; + CGRect rect = view.frame; + CGPoint point = [self calculateOriginOfPageAtIndex: idx]; + CGSize size = [self calculatePageSize: obj]; + rect.size = size; + rect.origin = point; + [ view setFrame: rect ]; + [ view setNeedsLayout ]; + } }]; } @@ -707,11 +781,14 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if ((firstVisiblePageIndex == 0) && (-_scrollView.contentOffset.x >= _scrollView.contentInset.left)) { // get page at index id item = [_pages objectAtIndex: firstVisiblePageIndex]; - UIView* view = (UIView*)item; + if( item != [ NSNull null ] ) + { + UIView* view = (UIView*)item; - CGRect rect = [view frame]; - rect.origin.x = 0; - [view setFrame: rect]; + CGRect rect = [view frame]; + rect.origin.x = 0; + [view setFrame: rect]; + } } [self loadBoundaryPagesIfNeeded]; @@ -723,7 +800,10 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if ([self pageExistAtIndex: i]) { // get page at index id item = [_pages objectAtIndex: i]; - + if( item == [ NSNull null ] ) + { + break; + } if (i == firstVisiblePageIndex) { // if (item == [NSNull null]) { @@ -735,18 +815,15 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if (((i == 0) && (contentOffset <= 0)) || ([_pages count] == 1)) { return; } - - UIView* view = (UIView*)item; + UIView* view = (UIView*)item; - CGRect rect = [view frame]; - rect.origin.x = contentOffset; - [view setFrame: rect]; + CGRect rect = [view frame]; + rect.origin.x = contentOffset; + [view setFrame: rect]; } else { - if (item != [NSNull null]) { [self unloadPage:item remove:NO]; - } - + } } } @@ -789,7 +866,8 @@ - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView { /////////////////////////////////////////////////////////////////////////////////////////////////// - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { if (_flags.isDetachPages) _flags.isDetachPages = NO; - [_scrollView setPagingEnabled: NO]; + //apuz - Freezing cascade view bug fix(I hope). + //[_scrollView setPagingEnabled: NO]; } @@ -929,11 +1007,17 @@ - (void) sendDetachDelegateMethodsIfNeeded { #pragma mark Setters /////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) setLeftInset:(CGFloat)newLeftInset { +- (void) setLeftInset:(CGFloat)newLeftInset +{ CGFloat width = [UIScreen mainScreen].bounds.size.height; _leftInset = newLeftInset; _pageWidth = (width - _leftInset) / 2.0f; + + if ( 0.f == _pageWidth ) + { + NSAssert( NO, @"CLCascadeView->_pageWidth == 0. Possible zero division crashes" ); + } _scrollView.frame = CGRectMake(_leftInset, 0.0, _pageWidth, self.frame.size.height); diff --git a/src/Cascade/CLCategories/CLCategoriesViewController.m b/src/Cascade/CLCategories/CLCategoriesViewController.m index ff163de..05c0c77 100644 --- a/src/Cascade/CLCategories/CLCategoriesViewController.m +++ b/src/Cascade/CLCategories/CLCategoriesViewController.m @@ -19,16 +19,6 @@ - (id) initWithNavigationController:(CLCascadeNavigationController*)viewControll return self; } -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - - - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. diff --git a/src/Cascade/CLCustomViewControllers/CLViewController.m b/src/Cascade/CLCustomViewControllers/CLViewController.m index 1f12f33..c462bb8 100644 --- a/src/Cascade/CLCustomViewControllers/CLViewController.m +++ b/src/Cascade/CLCustomViewControllers/CLViewController.m @@ -86,10 +86,17 @@ - (void) loadView { NSString *path = [bundle pathForResource:nib ofType:@"nib"]; - if(path) { - self.view = [[bundle loadNibNamed:nib owner:self options:nil] objectAtIndex: 0]; - return; - } + if(path) + { + UIView* view_ = [ [ bundle loadNibNamed: nib owner: self options: nil ] objectAtIndex: 0 ]; + if ( [ view_ isKindOfClass: [ CLSegmentedView class ] ] ) + { + [ (CLSegmentedView*)view_ setViewSize: self.viewSize ]; + } + + self.view = view_; + return; + } } CLSegmentedView* view_ = [[CLSegmentedView alloc] initWithSize: _viewSize]; diff --git a/src/Cascade/CLCustomViewControllers/CLWebViewController.h b/src/Cascade/CLCustomViewControllers/CLWebViewController.h index 43cb213..ac2385a 100644 --- a/src/Cascade/CLCustomViewControllers/CLWebViewController.h +++ b/src/Cascade/CLCustomViewControllers/CLWebViewController.h @@ -23,5 +23,7 @@ * This method fire loadRequest in webView. */ - (void) loadRequest; + +-(void)setTableSize; @end diff --git a/src/Cascade/CLCustomViewControllers/CLWebViewController.m b/src/Cascade/CLCustomViewControllers/CLWebViewController.m index 4a1e402..bca49b1 100644 --- a/src/Cascade/CLCustomViewControllers/CLWebViewController.m +++ b/src/Cascade/CLCustomViewControllers/CLWebViewController.m @@ -25,6 +25,11 @@ - (id) init { return self; } +-(void)setTableSize +{ + _viewSize = CLViewSizeNormal; +} + /////////////////////////////////////////////////////////////////////////////////////////////////// - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil @@ -79,7 +84,7 @@ - (void)viewDidLoad [self setWebView: webView_]; // load request - [self loadRequest]; + // [self loadRequest]; } diff --git a/src/Cascade/Cascade.xcodeproj/project.pbxproj b/src/Cascade/Cascade.xcodeproj/project.pbxproj index e376976..98a69e2 100644 --- a/src/Cascade/Cascade.xcodeproj/project.pbxproj +++ b/src/Cascade/Cascade.xcodeproj/project.pbxproj @@ -7,6 +7,36 @@ objects = { /* Begin PBXBuildFile section */ + 716E42FE14A1D19C0052AFFB /* CLCascadeNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CC21456D53200817157 /* CLCascadeNavigationController.m */; }; + 716E42FF14A1D19C0052AFFB /* CLCascadeView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CC41456D53200817157 /* CLCascadeView.m */; }; + 716E430014A1D19C0052AFFB /* CLCategoriesView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CC71456D53200817157 /* CLCategoriesView.m */; }; + 716E430114A1D19C0052AFFB /* CLCategoriesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CC91456D53200817157 /* CLCategoriesViewController.m */; }; + 716E430214A1D19C0052AFFB /* CLTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CCC1456D53200817157 /* CLTableViewController.m */; }; + 716E430314A1D19C0052AFFB /* CLViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CCE1456D53200817157 /* CLViewController.m */; }; + 716E430414A1D19C0052AFFB /* CLWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CD11456D53200817157 /* CLWebViewController.m */; }; + 716E430514A1D19C0052AFFB /* CLSplitCascadeView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CD41456D53200817157 /* CLSplitCascadeView.m */; }; + 716E430614A1D19C0052AFFB /* CLSplitCascadeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CD61456D53200817157 /* CLSplitCascadeViewController.m */; }; + 716E430714A1D19C0052AFFB /* CLBorderShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CDA1456D53200817157 /* CLBorderShadowView.m */; }; + 716E430814A1D19C0052AFFB /* CLScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CDD1456D53200817157 /* CLScrollView.m */; }; + 716E430914A1D19C0052AFFB /* CLSegmentedView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CDF1456D53200817157 /* CLSegmentedView.m */; }; + 716E430A14A1D19C0052AFFB /* UIViewController+CLSegmentedView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EA8CE11456D53200817157 /* UIViewController+CLSegmentedView.m */; }; + 716E430C14A1D19C0052AFFB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6EA8CAF1456D25200817157 /* Foundation.framework */; }; + 716E430E14A1D19C0052AFFB /* Cascade.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CBE1456D2EC00817157 /* Cascade.h */; }; + 716E430F14A1D19C0052AFFB /* CLCascadeNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CC11456D53200817157 /* CLCascadeNavigationController.h */; }; + 716E431014A1D19C0052AFFB /* CLCascadeView.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CC31456D53200817157 /* CLCascadeView.h */; }; + 716E431114A1D19C0052AFFB /* CLCategoriesView.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CC61456D53200817157 /* CLCategoriesView.h */; }; + 716E431214A1D19C0052AFFB /* CLCategoriesViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CC81456D53200817157 /* CLCategoriesViewController.h */; }; + 716E431314A1D19C0052AFFB /* CLTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CCB1456D53200817157 /* CLTableViewController.h */; }; + 716E431414A1D19C0052AFFB /* CLViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CCD1456D53200817157 /* CLViewController.h */; }; + 716E431514A1D19C0052AFFB /* CLViewControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CCF1456D53200817157 /* CLViewControllerDelegate.h */; }; + 716E431614A1D19C0052AFFB /* CLWebViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CD01456D53200817157 /* CLWebViewController.h */; }; + 716E431714A1D19C0052AFFB /* CLSplitCascadeView.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CD31456D53200817157 /* CLSplitCascadeView.h */; }; + 716E431814A1D19C0052AFFB /* CLSplitCascadeViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CD51456D53200817157 /* CLSplitCascadeViewController.h */; }; + 716E431914A1D19C0052AFFB /* CLBorderShadowView.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CD91456D53200817157 /* CLBorderShadowView.h */; }; + 716E431A14A1D19C0052AFFB /* CLGlobal.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CDB1456D53200817157 /* CLGlobal.h */; }; + 716E431B14A1D19C0052AFFB /* CLScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CDC1456D53200817157 /* CLScrollView.h */; }; + 716E431C14A1D19C0052AFFB /* CLSegmentedView.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CDE1456D53200817157 /* CLSegmentedView.h */; }; + 716E431D14A1D19C0052AFFB /* UIViewController+CLSegmentedView.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CE01456D53200817157 /* UIViewController+CLSegmentedView.h */; }; B6EA8CB01456D25200817157 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6EA8CAF1456D25200817157 /* Foundation.framework */; }; B6EA8CBF1456D2EC00817157 /* Cascade.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CBE1456D2EC00817157 /* Cascade.h */; }; B6EA8CE21456D53200817157 /* CLCascadeNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EA8CC11456D53200817157 /* CLCascadeNavigationController.h */; }; @@ -40,6 +70,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 716E432114A1D19C0052AFFB /* libCascade-clang.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libCascade-clang.a"; sourceTree = BUILT_PRODUCTS_DIR; }; B6EA8CAC1456D25200817157 /* libCascade.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCascade.a; sourceTree = BUILT_PRODUCTS_DIR; }; B6EA8CAF1456D25200817157 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; B6EA8CB31456D25200817157 /* Cascade-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Cascade-Prefix.pch"; sourceTree = ""; }; @@ -76,6 +107,14 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 716E430B14A1D19C0052AFFB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 716E430C14A1D19C0052AFFB /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; B6EA8CA91456D25200817157 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -100,6 +139,7 @@ isa = PBXGroup; children = ( B6EA8CAC1456D25200817157 /* libCascade.a */, + 716E432114A1D19C0052AFFB /* libCascade-clang.a */, ); name = Products; sourceTree = ""; @@ -201,6 +241,29 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 716E430D14A1D19C0052AFFB /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 716E430E14A1D19C0052AFFB /* Cascade.h in Headers */, + 716E430F14A1D19C0052AFFB /* CLCascadeNavigationController.h in Headers */, + 716E431014A1D19C0052AFFB /* CLCascadeView.h in Headers */, + 716E431114A1D19C0052AFFB /* CLCategoriesView.h in Headers */, + 716E431214A1D19C0052AFFB /* CLCategoriesViewController.h in Headers */, + 716E431314A1D19C0052AFFB /* CLTableViewController.h in Headers */, + 716E431414A1D19C0052AFFB /* CLViewController.h in Headers */, + 716E431514A1D19C0052AFFB /* CLViewControllerDelegate.h in Headers */, + 716E431614A1D19C0052AFFB /* CLWebViewController.h in Headers */, + 716E431714A1D19C0052AFFB /* CLSplitCascadeView.h in Headers */, + 716E431814A1D19C0052AFFB /* CLSplitCascadeViewController.h in Headers */, + 716E431914A1D19C0052AFFB /* CLBorderShadowView.h in Headers */, + 716E431A14A1D19C0052AFFB /* CLGlobal.h in Headers */, + 716E431B14A1D19C0052AFFB /* CLScrollView.h in Headers */, + 716E431C14A1D19C0052AFFB /* CLSegmentedView.h in Headers */, + 716E431D14A1D19C0052AFFB /* UIViewController+CLSegmentedView.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; B6EA8CAA1456D25200817157 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -227,6 +290,23 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 716E42FC14A1D19C0052AFFB /* Cascade-clang */ = { + isa = PBXNativeTarget; + buildConfigurationList = 716E431E14A1D19C0052AFFB /* Build configuration list for PBXNativeTarget "Cascade-clang" */; + buildPhases = ( + 716E42FD14A1D19C0052AFFB /* Sources */, + 716E430B14A1D19C0052AFFB /* Frameworks */, + 716E430D14A1D19C0052AFFB /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Cascade-clang"; + productName = Cascade; + productReference = 716E432114A1D19C0052AFFB /* libCascade-clang.a */; + productType = "com.apple.product-type.library.static"; + }; B6EA8CAB1456D25200817157 /* Cascade */ = { isa = PBXNativeTarget; buildConfigurationList = B6EA8CB91456D25200817157 /* Build configuration list for PBXNativeTarget "Cascade" */; @@ -265,11 +345,32 @@ projectRoot = ""; targets = ( B6EA8CAB1456D25200817157 /* Cascade */, + 716E42FC14A1D19C0052AFFB /* Cascade-clang */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ + 716E42FD14A1D19C0052AFFB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 716E42FE14A1D19C0052AFFB /* CLCascadeNavigationController.m in Sources */, + 716E42FF14A1D19C0052AFFB /* CLCascadeView.m in Sources */, + 716E430014A1D19C0052AFFB /* CLCategoriesView.m in Sources */, + 716E430114A1D19C0052AFFB /* CLCategoriesViewController.m in Sources */, + 716E430214A1D19C0052AFFB /* CLTableViewController.m in Sources */, + 716E430314A1D19C0052AFFB /* CLViewController.m in Sources */, + 716E430414A1D19C0052AFFB /* CLWebViewController.m in Sources */, + 716E430514A1D19C0052AFFB /* CLSplitCascadeView.m in Sources */, + 716E430614A1D19C0052AFFB /* CLSplitCascadeViewController.m in Sources */, + 716E430714A1D19C0052AFFB /* CLBorderShadowView.m in Sources */, + 716E430814A1D19C0052AFFB /* CLScrollView.m in Sources */, + 716E430914A1D19C0052AFFB /* CLSegmentedView.m in Sources */, + 716E430A14A1D19C0052AFFB /* UIViewController+CLSegmentedView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; B6EA8CA81456D25200817157 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -293,6 +394,36 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + 716E431F14A1D19C0052AFFB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/Cascade.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Cascade/Cascade-Prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "Cascade-clang"; + RUN_CLANG_STATIC_ANALYZER = YES; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 2; + }; + name = Debug; + }; + 716E432014A1D19C0052AFFB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/Cascade.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Cascade/Cascade-Prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "Cascade-clang"; + RUN_CLANG_STATIC_ANALYZER = YES; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 2; + }; + name = Release; + }; B6EA8CB71456D25200817157 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -308,7 +439,7 @@ "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = ""; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -329,7 +460,7 @@ CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = ""; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -370,6 +501,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 716E431E14A1D19C0052AFFB /* Build configuration list for PBXNativeTarget "Cascade-clang" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 716E431F14A1D19C0052AFFB /* Debug */, + 716E432014A1D19C0052AFFB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; B6EA8CA61456D25200817157 /* Build configuration list for PBXProject "Cascade" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/src/Cascade/Other/CLSegmentedView.h b/src/Cascade/Other/CLSegmentedView.h index caea01c..9571445 100644 --- a/src/Cascade/Other/CLSegmentedView.h +++ b/src/Cascade/Other/CLSegmentedView.h @@ -64,7 +64,7 @@ /* * Size of view */ -@property (nonatomic, assign, readonly) CLViewSize viewSize; +@property (nonatomic, assign ) CLViewSize viewSize; - (id) initWithSize:(CLViewSize)size; diff --git a/src/Cascade/files.txt b/src/Cascade/files.txt deleted file mode 100644 index e45c467..0000000 --- a/src/Cascade/files.txt +++ /dev/null @@ -1,16 +0,0 @@ -./Cascade.h -./CLCascadeNavigationController/CLCascadeNavigationController.h -./CLCascadeNavigationController/CLCascadeView.h -./CLCategories/CLCategoriesView.h -./CLCategories/CLCategoriesViewController.h -./CLCustomViewControllers/CLTableViewController.h -./CLCustomViewControllers/CLViewController.h -./CLCustomViewControllers/CLViewControllerDelegate.h -./CLCustomViewControllers/CLWebViewController.h -./CLSplitViewController/CLSplitCascadeView.h -./CLSplitViewController/CLSplitCascadeViewController.h -./Other/CLBorderShadowView.h -./Other/CLGlobal.h -./Other/CLScrollView.h -./Other/CLSegmentedView.h -./Other/UIViewController+CLSegmentedView.h