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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:09:08+00:00 2026-05-24T10:09:08+00:00

Ok, so this has been driving me mad for a while, but it occasionally

  • 0

Ok, so this has been driving me mad for a while, but it occasionally self corrects so I’ve dealt with it, but it’s time to fix it!

Situation is as follows:

View created in Interface Builder for iOS. Contains a UIButton referenced as ‘banana015’

Method in my implementation .m as follows:

- (IBAction)draggedOut: (id)sender withEvent: (UIEvent *) event {

    if ([[NSUserDefaults standardUserDefaults] integerForKey:@"edittingmode"] == 3) {

    UIButton *selected = (UIButton *)sender;
    selected.center = [[[event allTouches] anyObject] locationInView:self.view];
        if ([[NSUserDefaults standardUserDefaults] integerForKey:@"changeskin"] == 1) {
            [self scifiTempSave];
        }
        else if ([[NSUserDefaults standardUserDefaults] integerForKey:@"changeskin"] == 2) {
            [self bananaTempSave];
        }
        else if ([[NSUserDefaults standardUserDefaults] integerForKey:@"changeskin"] == 3) {
            [self orangeTempSave];
        }
    }
    else{}

} 

And declared in my .h Header as

-(IBAction)draggedOut:(id)sender;

Now, when I connect the button to the ‘draggedOut:’ method in Interface Builder using the Touch Drag Inside event, I can drag the button around when I build and run the project (expected behaviour) however when I release the app crashes.

In the past I’ve been able to connect to a method that appears as “draggedout: withevent” which works beautifully. This evening I’ve connected some 50 items up to this ‘draggedout: withevent’ option and it works beautifully for each one – I have however got two UIButtons (identical in almost every way (different referencing outlets) that I have yet to connect to it, and I’ll be damned if it’ll let me.

Can anyone help? This has been infuriating for some time. The option disappears, yet all those that I previously connected to it still work perfectly, I just can’t hook anything new up to it…or the old ones if I disconnect them.

  • 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-24T10:09:09+00:00Added an answer on May 24, 2026 at 10:09 am

    The one problem I can see is that your method declaration in the header is not the same as your implementation. The header declaration should be the first line of the method in the implementation plus a semicolon:

    - (IBAction)draggedOut: (id)sender withEvent: (UIEvent *) event;
    

    To get more info on the crash, you should try setting NSZombieEnabled to true.

    To answer your question in the comment, I don’t know why you would get the option of a draggedout: method in addition to the one including withEvent if it’s not declared in your code.

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

Sidebar

Related Questions

This has been driving me nuts. I hope it's not been asked before but
This has been driving me mad someone help coz i don't seem to see
This problem has been driving me mad. Here's the general gist: I have two
This has been driving me mad for the past hour and a half. I
This has been driving be crazy, but I can't seem to find an answer.
This is something that has been driving me mad over the past few days.
this has been driving me nuts because i know theres a simple solution but
This has been driving me mad. I have three tables: items ID name type
This has been driving me mad for weeks.I have a variable data that I
This has been driving me crazy for a few days. Why doesn't the following

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.