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

  • Home
  • SEARCH
  • 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 8191083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:50:17+00:00 2026-06-07T03:50:17+00:00

I hope this is a simple question. I need to intercept didAddSubview , but

  • 0

I hope this is a simple question. I need to intercept didAddSubview, but will I need to subclass the UIView in order to override that method?

The UIView that I want to override is the UIViewController‘s view property, so I just want to know how to go about working with this.

Thanks!

  • 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-07T03:50:19+00:00Added an answer on June 7, 2026 at 3:50 am

    From Apple UIView documentation (see Methods to Override):

    When subclassing UIView, there are only a handful of methods you
    should override and many methods that you might override depending on
    your needs. Because UIView is a highly configurable class, there are
    also many ways to implement sophisticated view behaviors without
    overriding custom methods, which are discussed in the Alternatives to
    Subclassing section. In the meantime, the following list includes
    the methods you might consider overriding in your UIView subclasses
    :

    • …
    • didAddSubview:, willRemoveSubview: – Implement these methods as needed to track the additions and removals of subviews.
    • …

    So, create your UIView subclass and override the method. Then, say to your UIViewController that its view will be the one you have subclassed. To achieve this there are a couple of ways:

    • by Xib
    • implementing loadView method and set the view property to be your custom view
    • redifining the view property in viewDidLoad

    Hope that helps.

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

Sidebar

Related Questions

hope this will be a quick easy question, I've just tried my app on
I hope this question isn't too general. Well, the situation is that I am
This is a very simple, probably too simple question but I'm afraid my limited
This seems to me like a very simple question, but I can't seem to
This is probably a really simple question but I can't seem to get my
I have a quick and hopefully simple question that I hope someone can help
Unfortunately, the answer to this question isn't quite as simple as it sounds... but
I hope this is a very simple question, what is the Android equivalent to
This might be a simple question, but I moved one of my apps from
Simple question I hope. If I have a set of data like this: Classification

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.