/

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.

  • (void)viewDidLoad {

scroll.contentSize = CGSizeMake(320, 1000);
[super viewDidLoad];
}


/*
// Override to allow orientations other than the default portrait orientation.

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

/

  • (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 {

[scroll release];
[super dealloc];
}

@end

/

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.

  • (void)viewDidLoad {

scroll.contentSize = CGSizeMake(320, 1000);
[super viewDidLoad];
}


/*
// Override to allow orientations other than the default portrait orientation.

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

UIscrollView

アイフォンアプリを作る。
ユーチューブから拾った。一枚絵のソフトでは画面が足りない。
しかしtableviewではtextfieldを貼り付けることが出来ない。
そんな時のUIscrollview。画面サイズを320*1000とか自由に設定できる。設定がわからない人は
こんな書き込みを見るよりもyoutubeでUIscrollviewで検索して見たほうが早い。
ブログで開発してるので動かないページが2つくらいあった。
ダメね。ブログ。

head file
#import

@interface scrollviewViewController : UIViewController {
IBOutlet UIScrollView *scroll;

}
@property(nonatomic,retain)UIScrollView *scroll;
@end


main file
//
// scrollviewViewController.m
// scrollview
//
// Created by KIKU0 on 11/06/12.
// Copyright __MyCompanyName__ 2011. All rights reserved.
//

#import "scrollviewViewController.h"

@implementation scrollviewViewController
@synthesize scroll;


/*
// The designated initializer. Override to perform setup that is required before the view is loaded.

  • (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {

if *1 {
// Custom initialization
}
return self;
}

*1:self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]