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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:10:19+00:00 2026-06-05T12:10:19+00:00

I had a custom view with subclassed touch responses that was working in iOS

  • 0

I had a custom view with subclassed touch responses that was working in iOS 4. On iOS 5, these touches would not respond at all when touched along the bottom edge of the view, if the view’s background color was set to clearColor.

I have not been able to track this down, but does anyone know if iOS 5 changed the way views respond to touches depending on a transparent background?

I can make no changes to the code other than set the background color to any opaque color like orangeColor and the view fully responds.

Note the issue does not affect touches elsewhere in the view; only along the bottom edge, anywhere below the last subview added to the view; presumably a clear background is treated as if the view does not exist for the sake of touches when looking at an area of the view that has no content. Change the color, the view has “content” and the touches work!

  • 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-05T12:10:20+00:00Added an answer on June 5, 2026 at 12:10 pm

    Instead of using [UIColor clearColor], try using this:

    [view setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0.1]];
    

    NOTE: A UIView does not respond to touch events when the alpha is anything below 0.1. [UIColor clearColor] sets an alpha to 0.0, so you won’t get the touch events. Following the above method, you can receive the touch events on a transparent view.

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

Sidebar

Related Questions

I'm trying to create a custom view (one that is not 100% listview, for
previously i had custom tableviewcell and was loading from Nib.in that i have specified
I'm using spring MVC, and I have a custom authentication/security system that I had
Had a page that was working fine. Only change I made was to add
I'm trying to make a custom Callout view for AnnotationView. I had seen this
I'm trying to make a custom Callout view for AnnotationView. I had seen this
I am using an AlertDialog that is very simple, just a custom view with
I'm trying to make my own custom view, currently all it does is draw
My goal is to write a custom camera view controller that: Can take photos
I have a custom view that contains several views in itself. I've made it

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.