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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:33:43+00:00 2026-05-20T09:33:43+00:00

I have added a UIBUtton in a UITableView header and it doesn’t seem to

  • 0

I have added a UIBUtton in a UITableView header and it doesn’t seem to be working. It’s clickable, but when attaching a IBAction to it, it fails and does nothing.

I have read online and saw to put it in your File’s Owner, but I can’t do that. When I put the action in, it only shows up in my First Responder.

I have also tried to put it in a different file, but when doing do it won’t let me drag it to the other file.

FILES:

RootViewController.h
RootViewController.m
TableViewAppDelegate.h
TableViewAppDelegate.m
DetailViewController.h
DetailViewController.m

RootViewController.h

@interface RootViewController : UITableViewController {
    NSMutableArray *listOfItems;
    Sqlite *database;
    NSTimer *myTimer;
    UITextView *myTextField;
}

- (IBAction)addAlbum;

RootViewController.m

#import "RootViewController.h"
#import "TableViewAppDelegate.h"
#import "DetailViewController.h"

@implementation RootViewController

// If a user adds a photo album
- (IBAction)addAlbum {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Add Gallery" message:@"this gets covered" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:@"Ok", nil];
myTextField = [[UITextField alloc] initWithFrame:CGRectMake(12, 45, 260, 25)];
CGAffineTransform myTransform = CGAffineTransformMakeTranslation(0, -80);
[alert setTransform:myTransform];
[myTextField setBackgroundColor:[UIColor whiteColor]];
[alert addSubview:myTextField];
[alert show];
[alert release];
[alert setTag:1];
}

Any help is appreciated!
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-05-20T09:33:43+00:00Added an answer on May 20, 2026 at 9:33 am

    If you’re loading the table header view from .xib, make “File’s Owner” of the .xib your ViewController subclass presenting the UITableView, and connect the desired event in the button to the desired IBAction in File’s Owner. If you’re creating the button programmatically in a tableView:viewForHeaderInSection: method, you must wire up the action yourself on the button using this method on the button object:

    - (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents
    

    EDIT: you should post your tableView:viewForHeaderInSection: code so we can give more specific advice.

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

Sidebar

Related Questions

I have added the required assemblies and registered the NVelocityViewFactory in global.asax.cs page but
I'm working in Visual Studio 2005 and have added a text file that needs
I have added UIButton and UITextView as subviews to my view programmatically. notesDescriptionView =
I am trying to add the UIButton to UIScrollView . I have added the
So I have made a custom UIButton and added it to the code and
I have added some code which compiles cleanly and have just received this Windows
If I have added/removed/modified a large number of files in my local ClearCase view,
I have a gridview that I have added a checkbox column using a templatefield
EDIT: I have added Slug column to address performance issues on specific record selection.
I have a program with two TForm classes and have added a TMainMenu to

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.