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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:31:28+00:00 2026-05-14T03:31:28+00:00

For quickly mocking up UI, I’d like to be able to drag buttons onto

  • 0

For quickly mocking up UI, I’d like to be able to drag buttons onto a view in interface builder, then drag a connection from that button to the view that should appear when you click it.

A subclass of UIButton is a little inconvenient to use in IB, so I’d prefer to add the behavior to UIButton itself. Unfortunately, it seems like outlets created in a category aren’t visible in IB:

@interface UIButton (myextensions) {
    IBOutlet UIView *outletDestination;
}
@end

Can extra outlets be added this way?

  • 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-14T03:31:29+00:00Added an answer on May 14, 2026 at 3:31 am

    Can extra outlets be added this way?

    Nope. You can’t add instance variables by declaring them in a category.

    You can, however, add properties, and you can put IBOutlet on properties, so you can add outlets that way. With the modern runtime (the only one available on the iPhone), properties can add instance variables.

    I don’t think you can do this if you intend to make a custom accessor for the property (you must use @synthesize), but it doesn’t sound like this matters for your case: You’re just mocking up UI, so you’re not going to write custom accessors.

    Alternatively, you can create outlets in IB itself on the Classes tab of the Library panel. Select a class there, then the Outlets tab in the pane below, then add an outlet to the list.

    You’ll need to have a nib open for that other solution, or no classes will show up. That’s because it’s context-sensitive: A Mac nib will have AppKit classes (like NSButton), whereas an iPhone nib will have UIKit classes.

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

Sidebar

Related Questions

I would like to quickly send email from the command line. I realize there
i am required to quickly learn a mocking framework that allows mocking static methods
I want to be able to quickly deploy updates to a site that is
Sometimes I need to quickly extract some arbitrary data from XML files to put
Can anyone recommend a tool for quickly posting test messages onto a JMS queue?
I need to be able to quickly convert an image (inside a rails controller)
This is a bit of weird scenario. I had a class that was quickly
I'd like to get some community consensus on a good design to be able
I want rapid prototyping: Quickly define screens, links, buttons etc. I want to easily
Is it possible to move quickly from one place in code to another where

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.