---
title: "How do I tell if a UIView is visible and on screen?"  
description: "How do I tell if a UIView is visible and on screen?"  
author: "Anonymous User"  
published: 2015-08-17  
updated: 2015-08-17  
canonical: https://www.mindstick.com/forum/33418/how-do-i-tell-if-a-uiview-is-visible-and-on-screen  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# How do I tell if a UIView is visible and on screen?

If I have a UIView (or UIView subclass) that is visible, how can I tell if it's currently being shown on the [screen](https://www.mindstick.com/forum/33644/loading-screen-during-ajax-call) (as opposed to, for example, being in a [section](https://yourviews.mindstick.com/view/297/reservation-for-economically-weaker-section) of a scroll [view](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) that is currently off-screen)?

To maybe give you a better idea of what I [mean](https://yourviews.mindstick.com/view/80768/what-does-real-minority-mean), UITableView has a couple of [methods](https://www.mindstick.com/articles/13060/runny-nose-remedy-methods-that-work-best) for determining the set of currently visible cells. I'm looking for some [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) that can make a similar [determination](https://yourviews.mindstick.com/view/88547/trump-s-meet-with-aides-ends-without-final-determination) for any given UIView.

## Replies

### Reply by Tarun Kumar

I recently had to check whether my view was onscreen. This worked for me:

```
CGRect viewFrame = self.view.frame;CGRect appFrame = [[UIScreen mainScreen] applicationFrame]; // We may have received messages while this tableview is offscreenif(CGRectIntersectsRect(viewFrame, appFrame)) {    // Do work here}
```


---

Original Source: https://www.mindstick.com/forum/33418/how-do-i-tell-if-a-uiview-is-visible-and-on-screen

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
