Tuesday 7 June 2011

Screenshots & Code - final iPad high fidelity prototype

Costume dolls:



















Costume doll + wardrobe: 




Next costume doll: 


The code: 

//
//  iPadCDollViewController.h
//  iPadCDoll
//
//  Created by Monika Denk on 24.05.11.
//  Copyright __MyCompanyName__ 2011. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface iPadCDollViewController : UIViewController {
UIPageControl *pageControl;
UIScrollView *scroller;
UIPageControl *pageControl1;
UIScrollView *scroller1;
IBOutlet UIView *costumedoll1;
IBOutlet UIView *costumedoll2;
IBOutlet UIView *costumedoll1W;
IBOutlet UIView *costumedoll1Wadd1;
IBOutlet UIView *costumedollchange1;
IBOutlet UIView *costumedollchange2;
IBOutlet UIScrollView *scrollerW1;
IBOutlet UIScrollView *scrollerW1a;
IBOutlet UIScrollView *scrollerW1korb;
IBOutlet UIScrollView *scrollerW1akorb;
IBOutlet UIScrollView *scrollerW1change1;
IBOutlet UIScrollView *scrollerW1achange1;
IBOutlet UIScrollView *scrollerW1change2;
IBOutlet UIScrollView *scrollerW1achange2;

}

-(IBAction) showwardrobe1;
-(IBAction) addbasket; 
-(IBAction) change1; 
-(IBAction) change2;
-(IBAction) close;

@property (nonatomic, retain) IBOutlet UIPageControl *pageControl;
@property (nonatomic, retain) IBOutlet UIScrollView *scroller; 
@property (nonatomic, retain) IBOutlet UIPageControl *pageControl1;
@property (nonatomic, retain) IBOutlet UIScrollView *scroller1; 
@property (nonatomic, retain) IBOutlet UIScrollView *scrollerW1; 
@property (nonatomic, retain) IBOutlet UIScrollView *scrollerW1a; 
@property (nonatomic, retain) IBOutlet UIScrollView *scrollerW1korb; 
@property (nonatomic, retain) IBOutlet UIScrollView *scrollerW1akorb; 
@property (nonatomic, retain) IBOutlet UIScrollView *scrollerW1change1; 
@property (nonatomic, retain) IBOutlet UIScrollView *scrollerW1achange1; 
@property (nonatomic, retain) IBOutlet UIScrollView *scrollerW1change2; 
@property (nonatomic, retain) IBOutlet UIScrollView *scrollerW1achange2; 

@end

//
//  iPadCDollViewController.m
//  iPadCDoll
//
//  Created by Monika Denk on 24.05.11.
//  Copyright __MyCompanyName__ 2011. All rights reserved.
//

#import "iPadCDollViewController.h"

@implementation iPadCDollViewController

@synthesize pageControl, scroller;
@synthesize pageControl1, scroller1;
@synthesize scrollerW1;
@synthesize scrollerW1a;
@synthesize scrollerW1korb;
@synthesize scrollerW1akorb;
@synthesize scrollerW1change1;
@synthesize scrollerW1achange1;
@synthesize scrollerW1change2;
@synthesize scrollerW1achange2;


-(void) scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
int page = scrollView.contentOffset.x / scrollView.frame.size.width
pageControl.currentPage = page;
pageControl1.currentPage = page;
}

-(IBAction) showwardrobe1; {
[costumedoll1 addSubview:costumedoll1W];
}

-(IBAction) addbasket; {
[costumedoll1W addSubview:costumedoll1Wadd1];
}

-(IBAction) change1;  {
[costumedoll1Wadd1 addSubview:costumedollchange1];
}

-(IBAction) change2;  {
[costumedollchange1 addSubview:costumedollchange2];
}

-(IBAction) close;  {
[costumedollchange2 addSubview:costumedoll2];
}
/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/



// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
for (int i = 2; i < 4; i++) {
UIImageView *imagen = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[NSString stringWithFormat:@"%d.jpg",i]]];  
UIImageView *imagen1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[NSString stringWithFormat:@"%d.jpg",i]]];  
imagen.frame = CGRectMake((i-1)* 1024, 0, 1024, 704);
imagen1.frame = CGRectMake((i-1)* 1024, 0, 1024, 704);
[scroller addSubview: imagen]; 
[scroller1 addSubview: imagen1]; 
[imagen release]; 
}
scroller.delegate= self;
scroller.contentSize = CGSizeMake(1024*3, 704);
scroller.pagingEnabled = YES;
scroller.showsHorizontalScrollIndicator = NO;
pageControl.numberOfPages=3;
pageControl.currentPage=0
scroller1.delegate= self;
scroller1.contentSize = CGSizeMake(1024*3, 704);
scroller1.pagingEnabled = YES;
scroller1.showsHorizontalScrollIndicator = NO;
pageControl1.numberOfPages=3;
pageControl1.currentPage=0
scrollerW1.contentSize = CGSizeMake(710, 103);
scrollerW1.showsHorizontalScrollIndicator = NO
scrollerW1a.contentSize = CGSizeMake(710, 103);
scrollerW1a.showsHorizontalScrollIndicator = NO
scrollerW1korb.contentSize = CGSizeMake(710, 103);
scrollerW1korb.showsHorizontalScrollIndicator = NO;
scrollerW1akorb.contentSize = CGSizeMake(710, 103);
scrollerW1akorb.showsHorizontalScrollIndicator = NO
scrollerW1change1.contentSize = CGSizeMake(400, 103);
scrollerW1change1.showsHorizontalScrollIndicator = NO;
scrollerW1achange1.contentSize = CGSizeMake(710, 103);
scrollerW1achange1.showsHorizontalScrollIndicator = NO
scrollerW1change2.contentSize = CGSizeMake(400, 103);
scrollerW1change2.showsHorizontalScrollIndicator = NO;
scrollerW1achange2.contentSize = CGSizeMake(400, 103);
scrollerW1achange2.showsHorizontalScrollIndicator = NO
}





/*Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}*/

//Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

- (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.
}

- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
[scrollerW1 release];
[scrollerW1a release];
[scrollerW1korb release];
[scrollerW1akorb release];
[scrollerW1change1 release];
[scrollerW1achange1 release];
[scrollerW1change2 release];
[scrollerW1achange2 release];
}

@end

Picture material for the App from Cos. Available at:  http://www.cosstores.com  [ Accessed 7 June 2011].

No comments:

Post a Comment