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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:56:29+00:00 2026-06-04T04:56:29+00:00

I have an application with three buttons (actually UIView ‘s) laid out horizontally underneath

  • 0

I have an application with three buttons (actually UIView‘s) laid out horizontally underneath the navigation bar.

The three buttons are of substantial enough size (larger than the back button, for example), however they won’t respond to touches when the hit is in the top third part, roughly.

I’m aware that this area directly underneath the nav bar is sort of ‘reserved’ for the back button and other UINavigation items having a touch area that expands beyond the navigation bar (by quite a significant margin), however in some instance there isn’t even a navigation item nearby to steal the event, and my views still don’t respond.

The weird thing is that I am getting a call to the hitTest method in my UIView, just never a touchesBegan/Ended/etc.

The result is that it is very difficult to press the buttons and if one is anywhere near a UINavigationItem, the item will steal the event, even though in hitTest I am returning the correct UIView to the system.

Unfortunately I am the implementer and not the designer so a design change is a last resort.

Any ideas? 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-06-04T04:56:30+00:00Added an answer on June 4, 2026 at 4:56 am

    You have to subclass your UINavigationBar and in your CustomNavigationBar do this:

    -(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
    
        if ([self pointInside:point withEvent:event]) {
            self.userInteractionEnabled = YES;
        } else {
            self.userInteractionEnabled = NO;
        }
    
        return [super hitTest:point withEvent:event];
    }
    

    Info about how to subclass UINavigationBar you can find here.

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

Sidebar

Related Questions

I have an application that occasionally sends out an e-mail with three attachments. One
I have a UITabBar in my application with three tab bar items. At certain
In my application I have some link buttons there but when I right click
I have an application with three layers (Presentation, Business Logic, and Data Access). In
I have an application with three modules: default , disciplines and plans . In
I have a rails application that has three different types of users and I
I have an application which is using a set of three combo boxes. I
I am creating window c# desktop application I have three columns in my datagridview
We have a three tier application entirely developed in .NET 4.0 (C#). As the
Actually i m little bit confused in Intent. Suppose i have three activities. A,b,c

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.