Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-11-2011, 11:13 AM   #1 (permalink)
Awesome
 
Esko2300's Avatar
 
Join Date: Jun 2009
Location: New York, N.Y.
Posts: 389
Esko2300 is on a distinguished road
Default How do i tell what view is currently on the screen?

Does anyone know what method i should use to tell my program what view is currently on the screen?
Esko2300 is offline   Reply With Quote
Old 05-11-2011, 11:25 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

you have a view controller no? just see its view.
__________________
dany_dev is offline   Reply With Quote
Old 05-11-2011, 11:56 AM   #3 (permalink)
Awesome
 
Esko2300's Avatar
 
Join Date: Jun 2009
Location: New York, N.Y.
Posts: 389
Esko2300 is on a distinguished road
Default

Well i have a view controller with its own view.This is how my view controller is set up

1)the main view of the view controller which shows a bunch of images the user can click upon.

2)When the user clicks an image i create a new view(Called DetailView) within the same view controller and display its details upon the first view of the view controller.

3)Now on top of the Detail view i have a toolbar and if the user wants can show the Image in a full screen hidef format(Called FullScreenView). Which then overlays the fullscreen view on top the detail view.

Now i need to check wich one of the views is the one im currently looking at
Esko2300 is offline   Reply With Quote
Old 05-11-2011, 10:33 PM   #4 (permalink)
Registered Member
 
Join Date: Jan 2011
Location: South Florida, US
Posts: 357
lgehrig1 is on a distinguished road
Default

Quote:
Originally Posted by Esko2300 View Post
Now i need to check wich one of the views is the one im currently looking at
Your UIApplication object has a keyWindow property, which is a UIWindow. That, in turn, has a rootViewController, which has a view.

That may not be exactly what you need, though. The UIApplication object also has a windows property that's an NSArray of all your visible windows, ordered back to front. So the last entry there would be the topmost window, and then you can go from there.
lgehrig1 is offline   Reply With Quote
Old 05-13-2011, 09:18 AM   #5 (permalink)
Awesome
 
Esko2300's Avatar
 
Join Date: Jun 2009
Location: New York, N.Y.
Posts: 389
Esko2300 is on a distinguished road
Default

Quote:
Originally Posted by lgehrig1 View Post
Your UIApplication object has a keyWindow property, which is a UIWindow. That, in turn, has a rootViewController, which has a view.

That may not be exactly what you need, though. The UIApplication object also has a windows property that's an NSArray of all your visible windows, ordered back to front. So the last entry there would be the topmost window, and then you can go from there.
Thanks ill try it out.
Esko2300 is offline   Reply With Quote
Reply

Bookmarks

Tags
uiview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 354
7 members and 347 guests
doffing81, dre, iOS.Lover, Kirkout, MikaelBartlett, oztemel, PlutoPrime
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:02 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0