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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:21:48+00:00 2026-06-14T11:21:48+00:00

I have a UIView that I call second inside another UIView called one. At

  • 0

I have a UIView that I call “second” inside another UIView called “one”.
At “second” I assign a class (class “Home.h” ) in the Inspector identity (Custom class).
The class work fine on “second” view and I have not problem.

My dubt now is how to access at element of Home by external class. If inside Home I set some variables (with properthy and synthesyze) I can’t control them from another class because it say me that class Home it’s not allocated…how can I solve this situation?

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-14T11:21:50+00:00Added an answer on June 14, 2026 at 11:21 am

    I am also pretty new to Objective-C and Xcode, but I believe all you have to do is import the header file of the “Home” class (Home.h) to the external class that you want to use it in. In this external class you would have to instantiate an object of the home class. Something that may look like this:

    /* File: "ExternalClass.h"
    * This is the Super-View class of the "Home" class
    */
    
    /* An example using Cocoa rather than Cocoa Touch */
    #import <Cocoa/Cocoa.h>
    
    // Imports a quick reference to the class without loading the classes methods
    @class Home;
    
    @interface ExternalClass : NSView {
    
    /* This creates an object of class "Home" in which a pointer for the "Home" class can be stored
     * From here all you would have to do is import the 'Home.h' file to the 'ExternalClass.m' file
     * and instantiate home objects and call methods of the 'home' class within the 'ExternalClass.m' files methods
     */
    Home *homeObject;
    
    }
    

    This declares memory for the an object of the “Home” class to be used within the ExternalClass.m… You would then have to assign the homeObject instance variable the class ‘aloc’ method for the Home class like this:

    homeObject = [[alloc Home] initWithSomeProperties:var1 andMoreProperties:varEtc];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIView container that has two UIImageView s inside it, one partially
I have a custom UIView class that I want to spin, shrink and move
I have a UIView -- call it HomeView that contains a UITableView and a
I have a UIView subclass that draws itself when -drawRect: is called. It only
I have defined a class that does a lengthy task and I call it
I have a custom UIView subclass that i'm trying to use as a header
I have GraphicView class that inherits from UIView. Its initWithFrame method is: @implementation GraphicsView
I have a UIView that contains a CALayer (layerPlot_) When y call the following
I'm drawing a custom UIView that is sitting inside a xib whose ViewController is
I have a UIView in which I added a UITapGestureRecognizer . Inside that view

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.