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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:15:41+00:00 2026-05-16T12:15:41+00:00

I’m new to developing in iOS and successfully ran through a tutorial on how

  • 0

I’m new to developing in iOS and successfully ran through a tutorial on how to create and connect outlets in a Mac OSX Cocoa App. However, when I try to follow the same process for my iPhone app, I keep hitting walls… (Apologies for the lengthy example- please bear with)

Project A:

In xCode:

  1. Create new Mac OSX Cocoa Application
  2. Create a new class

    SimpleViewController : NSObject


#import <Cocoa/Cocoa.h>

@interface SimpleViewController : NSObject {
    IBOutlet NSTextField *aField;
    IBOutlet NSButton *aButton;
}

@end

In Interface Builder:

  1. File > Read class files
  2. Drag
    SimpleViewController from my library
    into the main.nib
  3. Ctl-drag from
    SimpleViewController to view
    elements to connect my outlets

Everything above works great.
Now for the same thing in an iPhone app:

Project B:

In XCode:

  1. Create new iPhone OS Window-Based Application
  2. Create a new class

    SimpleViewController : UIViewController


#import <UIKit/UIKit.h>
@class NSTextField;
@class NSButton;

@interface EmbedComplexViewController : UIViewController {
    IBOutlet NSTextField *aField;
    IBOutlet NSButton *aButton;
}

@end

(Notice my view controller is now an extension of UIViewController, not NSObject. Also, this time I need to use forward class declarations for my outlet classes. Not a problem, but is this necessary?)

In Interface Builder:

  1. File > Read class files
  2. Drag
    SimpleViewController from my library
    into the main.nib
  3. Ctl-drag from
    SimpleViewController to view
    elements – BUT now I can’t see any of my declared outlet member variables. Instead, the only outlet option I have is ‘view’

What more do I need to do to have my declared outlets show up?

Thanks- Yarin

  • 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-16T12:15:42+00:00Added an answer on May 16, 2026 at 12:15 pm

    In iOS development, we use UIButton and UITextField and etc, (see the iphone developer documentation).

    And no, you don’t need to forward declare those classes (it made you since they weren’t included in UIKit

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am writing an app with both english and french support. The app requests
I'm trying to create an if statement in PHP that prevents a single post
I am using Paperclip to handle profile photo uploads in my app. They upload
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.