2011-01-20 4 views

답변

0

그냥 파일을 추가) http://www.4shared.com/dir/-PGqZEXR/zoominzoomout.html 이러한 기능을 통해 프로젝트를 호출하십시오. 여기

im2가있는 UIView이고, I는 그 다음 이런 viewDidLoad 통해 전달에 이미지를 붙여 지금

- (void)viewDidLoad { 
    [self loadFlowersInView:im2]; 
    [self.view addSubview:im2]; 
} 

이런 기능이 부착

,

- (void) loadFlowersInView: (UIView *) backdrop 
{ 
    NSString *create_button = nil; 
    // Add the flowers to random points on the screen 
    for (int i = 0; i < 1; i++) 
    { 
      MagPicAppDelegate *appdelegate = (MagPicAppDelegate *)[[UIApplication sharedApplication] delegate]; 

      NSString *whichFlower = appdelegate.imageName; 
      UIImage *stemp = [UIImage imageNamed:@"approve.png"]; 
      DragView *dragger = [[DragView alloc] initWithImage:stemp]; 
      dragger.userInteractionEnabled = YES; 
      dragger.center = CGPointMake(160.0f, 140.0f); 
      [im2 addSubview:dragger]; 
      [dragger release]; 
     } 
    } 
    [self.view addSubview:im2]; 
    [im2 release]; 
} 
1

당신은 당신이 사용자의 확대/축소 할 수 있도록하려면 얼마나 많은 정의 1.0 이상의 뭔가에 UIScrollViewmaximumZoomScale 및/또는 minimumZoomScale 속성을 설정해야합니다;