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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:39:29+00:00 2026-05-13T16:39:29+00:00

I am working on a landscape view iPhone application. I rotate the view, then

  • 0

I am working on a landscape view iPhone application. I rotate the view, then add another view inside it, which I call “horizontalView” in the code below. After adding this, I re-center it to the middle. This works fine to re-center correctly, but the trouble is that, my buttons in the mainView starts not working.

 // Add the horizontal controller
 HorizontalContainerViewController* c = [[HorizontalContainerViewController alloc]
                       initWithNibName:@"HorizontalContainerViewController"
           bundle:nil];
 self.horizontalView        = [c view];
 self.horizontalView.center = CGPointMake(160, 240); // <----  PROBLEM HERE
 [containerView addSubview:horizontalView];

 // Initially show the main view
 self.mainViewController = [MainViewController createFor: self];
    [self.horizontalView addSubView:self.mainViewController];

If I remove the line marked “PROBLEM HERE”, my buttons inside mainViewController.view work fine. If I add this one line, they start not responding to my touch. What might be going on here?

EDIT: By the way… I noticed that some buttons closer to the edge of the view don’t work, whereas some buttons in the middle of the view are working just fine.

Thanks,

-Steve

  • 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-13T16:39:30+00:00Added an answer on May 13, 2026 at 4:39 pm

    I figured this out. It seems that, on iPhone app, if the bottom-most view does not cover some portion of the window area, that area basically does not accept “touch” events.

    E.g you have 320x480 window area
        you add a view of 320x480 to the window, which originally covers the same area
        you rotate the view 90 degree left
        Now, you have a vertical view that only covers the middle portion of the window area.
        Something like:
    
        |--------|
        |        |
    ----+--------+----
    |   |        |   |<-- your window area
    | B |   A    | C |
    |   |        |   |
    ----+--------+----
        |        |<-- rotated view (your bottom-most view)
        |--------|
    

    Then, you add additional subviews to eventually cover the whole landscape area. (A + B + C)
    However, since your original view didn’t cover B and C areas, any controls that happen to get placed in areas B and C will not get the touch events.

    In my case, when I set center property, some existing buttons fell into an uncovered area like B or C in the picture above. That’s why some buttons that used to work started not working.

    Lessons learned:

    1) It’s not a good idea to rotate the bottom-most view that you added to the window

    2) (I didn’t try this but) It’d be helpful to set “clip subvies” on the bottom-most view so that you notice if some areas of your screen is likely to not process touch events.

    -Steve

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

Sidebar

Related Questions

Working on a project that parses a log of events, and then updates a
Working with python interactively, it's sometimes necessary to display a result which is some
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
I am working on an iPhone SDK project using Xcode 4 Preview. I am
I have done what this question said here: Landscape Mode ONLY for iPhone or
I am working on an iPad app (which will not be submitted to the
I have a tabBarController with 4 views. I wanted the second view to rotate,
Working with dates in ruby and rails on windows, I'm having problems with pre-epoch
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project at the moment and we have to implement soft deletion

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.