This file contains 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
//static consts from static class | |
static const int kSection1 = 0; | |
static const int kSection2 = 1; | |
static const int kSection3 = 2; | |
static const int kSection4 = 3; | |
//call to below function | |
NSDictionary * pageData = [[dataModel sharedInstance] getPageDataFromArray:kSection1 atIndex:0]; | |
This file contains 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
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView | |
{ | |
if (currentPageNumber != 4) { | |
NSLog(@"scrollViewDidEndDecelerating"); | |
//find current page | |
currentPageNumber = (self.scrollView.contentOffset.x / 1024.0); | |
//set counter and load new view | |
counter = currentPageNumber; | |
NSDictionary *pageData = [self dataForPage:counter]; |
This file contains 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
reactorsView = [[SupplyChainReactors alloc] initWithFrame:CGRectMake(0.0, 0.0, 1024.0, 500.0)]; | |
[[self view] addSubview:reactorsView]; | |
[reactorsView release]; | |
reactorsView.alpha = 0; | |
[reactorsView fadeIn]; | |
currSection = reactorsView; | |
} | |
-(void)stopBtnAnimations | |
{ |
This file contains 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
-(void) loadView { | |
UINavigationController * nav = [[UINavigationController alloc] initWithNibName:nil bundle:nil]; | |
[self setNavController:nav]; | |
nav.navigationBar.tintColor = [UIColor grayColor];// colorWithRed:0.3176f green:0.3568f blue:0.3647f alpha:1.0f]; | |
CAGradientLayer *gradient = [CAGradientLayer layer]; | |
gradient.frame = CGRectMake(0.0, 0.0, 320.0, 44.0); | |
gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor whiteColor] CGColor], (id)[[UIColor colorWithRed:0.7843 green:0.7843 blue:0.7843 alpha:1.0] CGColor], nil]; | |
[[[nav navigationBar] layer] insertSublayer:gradient atIndex:0]; | |