This file contains hidden or 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
| # Both return Profile AR objects | |
| @selected = @cart.items | |
| @all = current_user.profile.friends | |
| @unselected = @all.reject{|record| r == @selected.each (not sure about this part)} |
This file contains hidden or 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)viewDidLoad | |
| { | |
| [self setupPage]; | |
| [super viewDidLoad]; | |
| } | |
| #pragma mark - | |
| #pragma mark The Guts | |
| - (void)setupPage |
This file contains hidden or 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
| // | |
| // WallrViewController.m | |
| // Wallr | |
| // | |
| // Created by Peter Nicholls on 30/06/11. | |
| // Copyright 2011 NA. All rights reserved. | |
| // | |
| #import "WallrViewController.h" | |
| #import <QuartzCore/QuartzCore.h> |
This file contains hidden or 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
| // | |
| // WallrViewController.m | |
| // Wallr | |
| // | |
| // Created by Peter Nicholls on 2/07/11. | |
| // Copyright 2011 NA. All rights reserved. | |
| // | |
| #import "WallrViewController.h" | |
| #import <QuartzCore/QuartzCore.h> |
This file contains hidden or 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
| - (id)init | |
| { | |
| self = [super init]; | |
| if (self != nil) | |
| { | |
| dataPages = [[NSArray alloc] initWithObjects: | |
| [NSDictionary dictionaryWithObjectsAndKeys: | |
| @"Page 1", @"pageName", | |
| @"Some text for page 1", @"pageText", | |
| nil], |
This file contains hidden or 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
| #import "DataSource.h" | |
| #import "SynthesizeSingleton.h" | |
| @implementation DataSource | |
| SYNTHESIZE_SINGLETON_FOR_CLASS(DataSource); | |
| // | |
| // init | |
| // |
This file contains hidden or 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
| dataPages = [[NSArray alloc] initWithObjects: | |
| [UIImage imageNamed:@"image1.png"], | |
| [UIImage imageNamed:@"image2.png"], | |
| nil]; |
This file contains hidden or 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
| #import "DataSource.h" | |
| #import "SynthesizeSingleton.h" | |
| @implementation DataSource | |
| SYNTHESIZE_SINGLETON_FOR_CLASS(DataSource); | |
| // | |
| // init | |
| // |
This file contains hidden or 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)setPageIndex:(NSInteger)newPageIndex | |
| { | |
| pageIndex = newPageIndex; | |
| if (pageIndex >= 0 && pageIndex < [[DataSource sharedDataSource] numDataPages]) | |
| { | |
| // NSArray *pageData = | |
| // [[DataSource sharedDataSource] dataForPage:pageIndex]; | |
| // | |
| // image_one.image = [pageData objectAtIndex:0]; |
This file contains hidden or 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)setPageIndex:(NSInteger)newPageIndex | |
| { | |
| pageIndex = newPageIndex; | |
| if (pageIndex >= 0 && pageIndex < [[DataSource sharedDataSource] numDataPages]) | |
| { | |
| // NSArray *pageData = | |
| // [[DataSource sharedDataSource] dataForPage:pageIndex]; | |
| // | |
| // image_one.image = [pageData objectAtIndex:0]; |
OlderNewer