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

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
	if(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) {
		[self switchToLandscapeOrientation];
	}
	if(toInterfaceOrientation == UIInterfaceOrientationPortrait) {
		[self switchToPortraitOrientation];
	}
	if(toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
		[self switchToPortraitOrientation];
	}
}
Posted by KraZYeom

댓글을 달아 주세요

    UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
    indicator.hidesWhenStopped = YES;
    [self.view addSubview:indicator];


    [indicator startAnimating];
    [indicator stopAnimating];


뺑글뺑글 돌아가는 indicator 사용방법


Posted by KraZYeom

댓글을 달아 주세요

[iPhone SDK] Screen Capture

iDev 2010. 4. 25. 15:08
    CGImageRef screen = UIGetScreenImage();
    UIImage* screenImage = [UIImage imageWithCGImage:screen];
    CGImageRelease(screen);
Posted by KraZYeom

댓글을 달아 주세요

iPhone
view.hidden = YES or NO;

android

view.setVisibility(0 or 4);

왜 레퍼런스엔 int 0, 1, 2로 나와 있을까. 이것때문에 하루죙일 삽질.

머리가 나쁘면 손발이 고생!

Posted by KraZYeom

댓글을 달아 주세요


http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.2024353965.02024599579


Posted by KraZYeom

댓글을 달아 주세요