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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:55:58+00:00 2026-05-23T15:55:58+00:00

I have trawled SO for an answer that makes sense to my question, so

  • 0

I have trawled SO for an answer that makes sense to my question, so don’t hate me if this is an easy one!

I am adding two views to the window:

self.appView = [[AppViewController alloc] initWithNibName:nil bundle:nil] ;
self.buttonBar = [[ButtonBar alloc] initWithNibName:nil bundle:nil];

[window insertSubview:[self.appView view] belowSubview:[self.launchScreen view]];
[window insertSubview:[self.buttonBar view] belowSubview:[self.launchScreen view]];

Before I remove the self.launchScreen.

When I add elements to the appView (it’s a uitableviewcontroller) they work as expected, but when I add a button to the buttonBar (either in the XIB or via code), click them causes EXC_BAD_ACCESS.

Here’s the init code from buttonBar (which is adding one button):

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {

        self.settingsButton = [[UIButton alloc] initWithFrame:CGRectMake(0,10,40,28)];
        [self.settingsButton addTarget:self action:@selector(settings:) forControlEvents:UIControlEventTouchUpInside];    

        UIImage *btnImage = [UIImage imageNamed:@"play.png"];
        [self.settingsButton setImage:btnImage forState:UIControlStateNormal];
        [btnImage release];

        [self.view addSubview:self.settingsButton];

    }
    return self;
}

My question is in two parts, 1) WHAT GIVES?! I’ve been at this way too long, and 2) How can I debug this stuff? I hate coming to SO to ask n00b questions when I’m sure XCODE’s debugging tools would help me track this stuff down…

  • 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-23T15:55:59+00:00Added an answer on May 23, 2026 at 3:55 pm

    Use @selector(settings) instead.

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

Sidebar

Related Questions

I've trawled the SO website thinking this is pretty obvious but alas I have
I know this question has been posted here before, and I've trawled through as
Have some dates in my local Oracle 11g database that are in this format:
Jquery wont load. I'm a noob, but have persisted, trawled this site & tried
I have trawled the web and the WebDriver API. I don't see a way
so I have trawled true all threads in here and any where else where
I have followed numerous screen casts as well as trawled the backbone docs extensively
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =
Have a matrix report now that has Position, Hours and Wages for a location

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.