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 7735847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:36:09+00:00 2026-06-01T07:36:09+00:00

I have an mainUIView within which there is a customised UIImageView (named myImageView). In

  • 0

I have an mainUIView within which there is a customised UIImageView (named myImageView).

In the myImageView.h file, I have declared:

@property (strong, nonatomic) mainViewController *viewController;

and in the myImageView.m file, I have the following codes:

        self.viewController = self.parent;

This lines raises an error indication:
Property ‘parent’ not found on object of type myImageView.

I thought putting the myImageView inside the mainUIView would make the default parent-and-sub relationship, but obviously it’s not so.

In the main storyboard, I tried to Ctrl-drag the myImageView to the mainViewController, but no options pops up for me to select delegate.

Can anyone give me explanation of these please? I’m feeling a bit confused… Many 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-01T07:36:10+00:00Added an answer on June 1, 2026 at 7:36 am

    As your myImageView is a UIView is has no parent. Is just has a superview which again is a UIView. Basically a view doesn’t know its controller. Although the controller can implement a view’s delegate to get informed about events. So your AppDelegate knows your ViewController and the controller knows your ImageView. The AppDelegates window knows the view of your controller which will most likely contain the whole view hierarchy (except AlertViews, HUDViews, modal views and simmilar…).

    I think what you want to do works best implementing the delegate pattern. (see Apple Docs)

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

Sidebar

Related Questions

I have one single MainViewController which has of course it's one main UIView. I
I have a XIB file in which I have a few UI elements. The
Have you ever seen any of there error messages? -- SQL Server 2000 Could
It is an iPad app based on SDK 3.2. I have a MainUIView, that
Hi I have a mainView window which has its dataContext set to it's own
I have two activities in which I need to pass an object array between
We have some XAML which may seem odd but apparently is needed for defining
imagine i have a main view, in which i have a call to the
I have a main window which hosts two views (user controls). One is UserControl1
Here is the situation: I have a class MainView (which is a UIViewController) and

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.