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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:50:14+00:00 2026-05-18T01:50:14+00:00

In my iPhone app, I have SPGameDesk : UIView class, creating it from other

  • 0

In my iPhone app, I have SPGameDesk : UIView class, creating it from other class like:

SPGameDesk* gameDesk = [[SPGameDesk alloc] init];
[gameDesk createWithLevel:5];
[appWindow addSubview:gameDesk];

In my SPGameDesk class, in one method, I create UIButtons:

holesRow = [[NSMutableArray alloc] init];
for (int i=0; i<3; i++) {
    [holesRow addObject:[[UIButton alloc] initWithFrame:CGRectMake((40*i)+5, 150, 30, 30)]];
    [[holesRow objectAtIndex:i] setBackgroundColor:[UIColor blueColor]];
    [[holesRow objectAtIndex:i] addTarget:self action:@selector(holeSelected:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview: [holesRow objectAtIndex:i]]; 
}

And lower in SPGameDesk class I have method:

- (void)holeSelected:(id)sender {
    NSLog(@"SELECTED");
}

But when I touch my button, nothing happens, like some other UIView covers my button (there is no other UIView), or like SPGameDesk has userInteraction disabled (I checked – it is not).

Where is my problem? What should I check?

  • 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-18T01:50:15+00:00Added an answer on May 18, 2026 at 1:50 am

    What is the frame for your gameDesk view? It looks like it could be 0,0,0,0. Try setting it to the bounds of the parent window. Use initwithframe instead of init.

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

Sidebar

Related Questions

I'm creating an iPhone app that will have a preloaded set of locations with
In my Iphone App I have created this query: SELECT * FROM visuel where
I'm working on a class for my iPhone app, and I'd like it to
I'm developing an iphone app and I have a JSON from web service as
I have app in which I'm downloading image from web to iphone app. This
I have iphone app in which i enter any number value like 10 2
In my iPhone app I have a UIView with a tiled background image created
I have built an iPhone app that needs to pull data from a server.
In an iPhone app I currently have code for downloading a file from the
I am creating dropdown in iphone app i have place the button on top

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.