Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "RevistaPortraitViewController.h"
- #import "AppDelegate.h"
- @interface RevistaPortraitViewController ()
- @end
- @implementation RevistaPortraitViewController
- #define NUM_PAGES 128
- - (void)dealloc
- {
- [scroll release];
- [super dealloc];
- }
- - (void)didReceiveMemoryWarning
- {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
- // Release any cached data, images, etc that aren't in use.
- }
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
- }
- //-(void)carregarListaDeImagens {
- // [listaImagens removeAllObjects];
- // [listaImagens addObject:@"w29_capa_p.jpg"];
- // for (int iCnt = 2; iCnt < NUM_PAGES-1; iCnt++) {
- // if(iCnt > 10)
- // [listaImagens addObject:[NSString stringWithFormat:@"w29_%i_p.jpg",iCnt]];
- // else
- // [listaImagens addObject:[NSString stringWithFormat:@"w29_%0i_.jpgp",iCnt]];
- // }
- //}
- - (void)viewDidLoad
- {
- //myImageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 10, 320, 350)];
- // [self.view addSubview:myImageView];
- [scroll setDelegate:self];
- [scroll setContentSize:CGSizeMake(scroll.frame.size.width * NUM_PAGES, scroll.frame.size.height)];
- [scroll scrollRectToVisible:CGRectMake(scroll.frame.size.width * (_paginaAtual), scroll.frame.origin.y, scroll.frame.size.width, scroll.frame.size.height) animated:NO];
- //load the first and second page.
- [super viewDidLoad];
- // Do any additional setup after loading the view from its nib.
- }
- - (void)scrollViewDidScroll:(UIScrollView *)scrollView
- {
- CGPoint scrollOffset=scrollView.contentOffset;
- ///at any time, it will have only 3 pages loaded- previous, current and next
- if(pageOnScrollView < ((int)scrollOffset.x/scroll.frame.size.width))
- {
- //unload
- if(pageOnScrollView>1)[self unloadPreviousPage:pageOnScrollView-1];
- //load the next page
- [self loadNextPage:((int)scrollOffset.x/scroll.frame.size.width)+1];
- }
- else if(pageOnScrollView > ((int)scrollOffset.x/scroll.frame.size.width))
- {
- //unload
- if(pageOnScrollView<(NUM_PAGES-2))[self unloadPreviousPage:pageOnScrollView+2];
- //load back the previous page
- [self loadNextPage:((int)scrollOffset.x/scroll.frame.size.width)-1];
- }
- pageOnScrollView=scrollOffset.x/scroll.frame.size.width;
- }
- -(void)unloadPreviousPage:(int)index
- {
- for(int i=index*1;i<(index+1)*1;i++)
- {
- [[scroll viewWithTag:i+1] removeFromSuperview];
- }
- }
- -(void)loadNextPage:(int)index
- {
- int countFlag=0;
- for(int i=index*1;i<(index+1)*1;i++)
- {
- //create the UIImageViews and stick them on the scrollview
- UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake((scroll.frame.size.width*index)+countFlag*(scroll.frame.size.height - 10)+ 2, 0, scroll.frame.size.width, scroll.frame.size.height)];
- imageView.tag=i+1;
- // [imageView addTarget:self action:@selector(imageViewClicked:) forControlEvents:UIControlEventTouchUpInside];
- // [imageView.layer setBorderColor:[UIColor lightGrayColor].CGColor];
- //[imageView.layer setBorderWidth:1.0f];
- int indice = (index+1)%128;
- UIImage *img = nil;
- NSString *path = @"";
- switch (indice) {
- case 0:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 1:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 2:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 3:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 4:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 5:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 6:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 7:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 8:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 9:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 10:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 11:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 12:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 13:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 14:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 15:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 16:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 17:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 18:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 19:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 20:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 21:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 22:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 23:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 24:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 25:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 26:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 27:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 28:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 29:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 30:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 31:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 32:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 33:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 34:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 35:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 36:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 37:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 38:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 39:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 40:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 41:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 42:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 43:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 44:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 45:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 46:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 47:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 48:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 49:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 50:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 51:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 52:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 53:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 54:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 55:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 56:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 57:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 58:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 59:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 60:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 61:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 62:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 63:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 64:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 65:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 66:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 67:
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- break;
- case 68:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 69:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 70:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 71:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 72:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 73:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 74:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 75:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 76:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 77:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 78:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 79:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 80:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 81:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 82:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 83:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 84:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 85:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 86:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 87:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 88:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 89:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 90:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 91:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"w29_02_p.jpg" ofType:@"jpeg"]];
- [imageView setImage:img];
- [img release];
- case 92:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 93:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 94:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 95:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 96:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 97:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 98:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 99:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 100:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 101:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 102:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 103:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 104:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 105:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 106:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 107:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 108:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 109:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 110:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 111:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 112:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 113:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 114:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 115:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 116:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 117:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 118:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 119:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 120:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 121:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 122:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 123:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 124:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 125:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 126:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- case 127:
- path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"w29_capa_p.jpg"];
- img = [[UIImage alloc] initWithContentsOfFile:path];
- [imageView setImage:img];
- [img release];
- break;
- }
- [scroll addSubview:imageView];
- [imageView release];
- countFlag++;
- }
- }
- -(void) viewWillAppear:(BOOL)animated {
- listaImagens = [[NSMutableArray alloc]init];
- //[self carregarListaDeImagens];
- [self loadNextPage:0];
- [self loadNextPage:1];
- // [scroll setMinimumZoomScale:1];
- // [scroll setMaximumZoomScale:3];
- //[scroll setZoomScale:0.5];
- }
- -(void) viewWillDisappear:(BOOL)animated {
- if (listaImagens)
- [listaImagens release];
- }
- -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
- AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication]delegate];
- if(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
- [appDelegate irRevistaLandscape:self comPagina:_paginaAtual];
- return YES;
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement