Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7895609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:41:04+00:00 2026-06-03T07:41:04+00:00

I found some answer that quite solve my questions, but seems that I’m missing

  • 0

I found some answer that quite solve my questions, but seems that I’m missing some steps. I’m just trying to intercept the “ViewDidBlablabla” events of a ScrollView, so I created a custom UIScrollView class.

MyScrollView.m

#import "MyScrollView.h"

@implementation MyScrollView

- (id)initWithFrame:(CGRect)frame{
    NSLog(@"initWithFrame");
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

-(void)scrollViewWillBeginDragging:(UIScrollView*)scrollView{
    NSLog(@"scrollViewWillBeginDragging");
    //scrollView.contentOffset
}

-(void)scrollViewDidScroll:(UIScrollView*)scrollView{
    NSLog(@"scrollViewDidScroll");
}

-(void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView{
    NSLog(@"scrollViewDidEndScrollingAnimation");
}

@end

MyScrollView.h

#import <UIKit/UIKit.h>

@interface MyScrollView : UIScrollView <UIScrollViewDelegate>

@end

When I alloc my custom Scroll View I do get the console message “initWithFrame”, but there’s no way to get to the other events. What am I missing?

If you need some other pieces of code feel free to ask, but since I get to my custom “initWithFrame” method, I suppose that the error should be here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:41:06+00:00Added an answer on June 3, 2026 at 7:41 am

    Try setting your view as the delegate of itself:

    if (self) {
        // Initialization code
        self.delegate = self;
    }
    

    Technically, you do not need to inherit UIScrollView to respond to scrolling events: it is sufficient to set the delegate to an implementation of <UIScrollViewDelegate>.

    Also, the scrollViewDidEndScrollingAnimation: method has been gone for about two years, so it is not going to be called on modern iOS installations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I searched (trust me!) but for some reason, haven't quite found the answer I'm
I've searched for an answer and found some c#-examples, but could not get this
Searched around on SO for an answer. Found some interesting stuff but I am
not for the first time, I guess that the answer is quite simple. But
I've done some searching and found lots of answers that don't quite give me
I've done some searching and haven't found a specific answer. Anyhow, I was wondering
Did some searches here & on the 'net and haven't found a good answer
I found some good answers for this question, but I can't really get them
I found some classes designed for debugging in package com.sun.jdi like VirtualMachine , but
I found some old Python code that was doing something like: if type(var) is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.