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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:31:53+00:00 2026-05-31T23:31:53+00:00

In an iPhone app for iOS5 I’m trying to create a controller object that

  • 0

In an iPhone app for iOS5 I’m trying to create a controller object that contains an image sub-view with multiple UIImageViews. I have a main view controller with its associated main view and within this main view I have an multi-image sub-view and this sub-view has a dozen or more UIImageViews as configured in Interface Builder. I have created a descendent of UIView and connected it as an IBOutlet connection for the ImageSubView in my ViewController. I want to create IBOutlets for the dozen UIImageViews within my subView class, but Interface Builder will only let me create IBOutlets in my main ViewController not in the ImageSubView class. That is when I control drag from one of the UIImageViews it only shows creation of an IBOutlet if I drag within the MainViewController @interface code but not to the ImageSubView @interface code. I want the details of controlling these dozen images to be hidden from the main ViewController. I want the main ViewController to communicate to the ImageSubView only and for the ImageSubView to know how to manipulate the dozen images within it. Do I need to create a sub-viewController? If so how do I create a sub-viewController within the current main view? Interface Builder wouldn’t let me drag another ViewController into the current main view. Can there be multiple viewControllers (a main one and sub-controllers) for a single screen?

The view hierarchy looks like this:

MainViewController
    MainView
       ImageViewFullBackground
       ImageSubView
          UIImageView1
          UIImageView2
          . . . 
          UIImageView12
       Button1
       Button2
       . . .
       Button10

In response to Allen here is my ImageSubView header. The class is actually called UILedNumericView

//
//  UINumericLabel.h
//  UILedNumericView
//
//  Created by Jon D. Newbill on 2/18/12.
//  Copyright (c) 2012 Bitworks Systems Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface UILedNumericView : UIView

@property (copy,nonatomic) NSString * text;

// This is the numeric value of the LED display as a double
@property (nonatomic) double value;

// Returns true if the numeric display contains a decimal point
@property (readonly,nonatomic) BOOL hasDecimalPoint;

// Returns true if numeric display contains an exponent
@property (readonly,nonatomic) BOOL hasExponent;

// Returns true if numeric display is equal to zero.
@property (readonly,nonatomic) BOOL isZero;

// Returns number of characters in entire display
@property (readonly,nonatomic) NSUInteger length;

// Returns zero based character index of the E in the display
@property (readonly,nonatomic) NSUInteger exponentIndex;

// Returns or sets mantissa portion of display.  This is everything
// preceding the "E" on the display or the entire display if it does
// not contain an "E";
@property (copy, nonatomic) NSString * mantissa;

// Returns or sets exponent portion of display.  This is everything
// following the "E" on the display.  If no E exists then an empty
// string is returned.  When set to a non-zero length string an E will
// be added to the display.
@property (copy, nonatomic) NSString * exponent;

// Returns maximum allowed characters in display
// This includes digits, sign, decimal point and exponent
+ (NSUInteger) maxLength;

@end
  • 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-05-31T23:31:54+00:00Added an answer on May 31, 2026 at 11:31 pm

    You can get the subviews from any view you have already gotten an IBOutlet from the interfacebuilder like this:

    NSArray *subViewsArray = self.view.subviews; //Change this to the name of your view
    UIView *view1 = [subViewsArray objectAtIndex:0]; //This selects view at position 0
    NSLog(@"View1: %@",view1); //You can see what view you extracted (the properties)
    

    There is no need for you to create a viewcontroller or something. However it is possible if you want but I don’t believe it is what you want.

    Edit: IBOutlets, as their name imply are used to tell the compiler to make a pointer to an item in the interface builder, so if you follow what I posted you are still creating those pointers programatically. If you want to have the “global” convenience of these as the IBOutlets have, just create a property for an UIView instead of declaring them locally like I did.

    Edit2: Forgot to mention that the order of the views is the same as the order in the interface builder from top to down. (unless you changed them programatically)

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

Sidebar

Related Questions

The iPhone app that I released is a wireless game controller, it translates touches
I am working on an iphone app in IOS5 that user storyboards. I have
The iPhone app that I am working on requires GET calls to a 3rd
My app is crashing using iOS5 and iOS4.3 iPhone simulators in Xcode 4.2, the
I have noticed since upgrading to iOS5 that an audio app I have been
I have a software-hardware related issue that I'm trying to troubleshoot. My app was
I am developing a iPhone app running on iOS5, and am unable to set
I am developing an app for iPhone using iOS5 and xcode 4.2. The scenario
I am currently designing an iOS 5 iPhone app that will use a .NET
I have an app for iPhone on app store that supports all versions from

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.