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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:42:11+00:00 2026-06-06T23:42:11+00:00

my screen has a few views like such __________________ | _____ | | |

  • 0

my screen has a few views like such

__________________
|          _____  |
|          |    | | //viewX is a video screen
|          |    | | 
| viewX    | vY | | //viewY is a custom uiview i created.
|          |____| | //it contains a method which i would like to call that toggles
|_________________| //the hidden property of this view. and when it hides, a little
|                 | //button is replaced no the top right corner on top of viewX
| viewZ           | //the video layer
|                 |
|_________________| //viewZ is a view containing many square views - thumbnails.

my question is, i dont know how to register for touch events so that it recognises any touch event on no matter which view the user touches the screen.. atm im handling the touch events for each view inside it. so all works well…

however what im trying to do is that when the user taps anywhere else on the screen but on viewY, viewY should dissapear by calling that method in the viewY class.

this viewY class is instantiated and has no xib file attached to it. the uiview is created progammatically in the viewY class. this whole class for viewY behviour is instantiated in viewX – the video view.

my boss says add delegates.. although i have now clue how to do that… any help?

is there anyway i can just make it really simple and be able to say REMOVE VIEW no matter which class im calling from?

Also ive seen other people achieve this by using these funky arrows -> … <- etc.. although im not sure if thats what i need or how to implement such a thing.

ah i think ive made my question quite complicated but i really mean it to be a simple one, and know it can be done in an easy way!

  • 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-06T23:42:13+00:00Added an answer on June 6, 2026 at 11:42 pm

    Would not calling

    [viewY hideThisViewAndShowLittleButton];
    

    do the right job? If you want to remove viewY then you can call:

    [viewY removeFromSuperview];
    

    In order to access viewY from viewZ, provided that viewZ has access to viewX, you could define a method in viewX that returns to you viewY. Something like (in your implementation file for viewX:

    - (UIView*)viewY {
       return <viewX_knows_which_value_to_return>;
    }
    

    As to viewX_knows_which_value_to_return, provided that viewY is the only subview, you could do:

    [self.view.subviews lastObject];
    

    (NB: I am assuming here that actually viewX is a view controller, not a UIView).

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

Sidebar

Related Questions

Has anyone created a custom Silverlight Splash screen to replace the blue balls circular
I have a small app that from the home screen has a few buttons,
Working in a ViewController that has a few views which were added to it
I have a screen that has a few images and one of them has
I am creating a web application which has a few management screens, where a
When my iPhone app starts up, the main screen has a keyboard. Currently the
In my application I have several activities, the main screen has 4 buttons that
I have search screen which has 10 fields and involves around 5 to 6
I have a home-screen widget that has an icon that starts/so pose to bring
So my iPhone application currently has a tabviewcontroller that populates the entire screen. The

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.