Objective C ScrollView Resim Üzerinde Gezinme


#import <UIKit/UIKit.h>

@interface ViewController : UIViewController
    UIScrollView *myScrollView;



    myScrollView = [[UIScrollView alloc]initWithFrame:
    CGRectMake(20, 20, 280, 420)];
    myScrollView.accessibilityActivationPoint = CGPointMake(100, 100);
    imgView = [[UIImageView alloc]initWithImage:
    [UIImage imageNamed:@"Resim.jpg"]];
    [myScrollView addSubview:imgView];
    myScrollView.minimumZoomScale = 0.5;
    myScrollView.maximumZoomScale = 3;
    myScrollView.contentSize = CGSizeMake(imgView.frame.size.width,
    myScrollView.delegate = self;
    [self.view addSubview:myScrollView];

-(UIView *)viewForZoomingInScrollView😦 UIScrollView *)scrollView{
    return imgView;
-(void)scrollViewDidEndDecelerating😦 UIScrollView *)scrollView{
    NSLog(@"Did end decelerating");
-(void)scrollViewDidScroll😦 UIScrollView *)scrollView{
//    NSLog(@"Did scroll");
-(void)scrollViewDidEndDragging😦 UIScrollView *)scrollView 
    NSLog(@"Did end dragging");
-(void)scrollViewWillBeginDecelerating😦 UIScrollView *)scrollView{
    NSLog(@"Did begin decelerating");
-(void)scrollViewWillBeginDragging😦 UIScrollView *)scrollView{
    NSLog(@"Did begin dragging");

   [super viewDidLoad];
   [self addScrollView];



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: