4

あるビューで線を描く必要があり、それが自動的に他のビューに表示されるアプリを実行しています。どんな助けでも大歓迎です..

私はこれを試しました..

- (void)viewDidLoad
{
[super viewDidLoad];
slv = [[SmoothLineView alloc] initWithFrame:CGRectMake(DrawingView.bounds.origin.x, DrawingView.bounds.origin.y + 42, DrawingView.bounds.size.width, DrawingView.bounds.size.height - 42)];
slv.delegate = self;
[DrawingView addSubview:slv];
}


-(IBAction)btnAnotherView:(UIButton *)sender
{
[zoomingTypingView setUserInteractionEnabled:YES];
if(sender.tag == 123)
{
    [self.view setBackgroundColor:[UIColor colorWithWhite:0.500 alpha:1.000]];
    [UIView animateWithDuration:0.5
                          delay:0.1
                        options:UIViewAnimationTransitionCurlUp
                     animations:^{
                         //animation code
                         zoomingTypingView.frame = CGRectMake(0, 549, 768, 451);

                     } completion:^(BOOL finished) {


                     }];       
    CGRect imageFrame = CGRectMake(50, 50, 220, 120);
    ResizableView = [[SPUserResizableView alloc] initWithFrame:imageFrame];
    CGRect gripFrame = CGRectMake(50,50, 220,120);
    UIView *zoom = [[UIView alloc]initWithFrame:gripFrame];
    UIScrollView *zoomscroll = [[UIScrollView alloc]initWithFrame:gripFrame];
    [zoomscroll setZoomScale:32.0];
    [zoomscroll setMaximumZoomScale:32.0];
    [zoom addSubview:zoomscroll];
    [ResizableView setContentView:zoom];
    ResizableView.delegate = self;
    [DrawingView addSubview:ResizableView];
    sender.tag = 246;
}
else
{
    [UIView animateWithDuration:0.5
                          delay:0.1
                        options:UIViewAnimationTransitionCurlUp
                     animations:^{
                         //animation code
                         zoomingTypingView.frame = CGRectMake(0, 999, 768, 451);

                     } completion:^(BOOL finished) {
                        [self.view setBackgroundColor:[UIColor whiteColor]];
                     }];
    [ResizableView removeFromSuperview];
    [DrawingView addSubview:slv1];
    sender.tag = 123;
}

}

ここに画像の説明を入力

上記の画像では、WhiteColored ビューが新しいビューであり、その whiteColoredView を描画すると、両方のビューに反映されるはずです。

NOTE TAKER HD アプリを見ると、より多くのアイデアを得ることができます。

http://www.youtube.com/watch?v=FdGDnUKZcMM

4

1 に答える 1