views:

19

answers:

1

Hello,

I added the reachability.m and .h files. When theres no internet connection, i want to display a UIView which is semi transparent and and comes up at the bottem like a Toolbar saying No internet Connection Available

I've got the code etc.. but i need a way to display the UIView i created and to push it to the front of everything when im using NAvigationControllers to control my application.

Could someone assist? Just need a way to push the UIView to the front but keep the nav controller on its current view so it can still go back and forth, the UIView is just a little transparant at the bottem like a pop up warning of no internet connection.

Thanks

A: 

You want the view to float above all other views but not respond to user input. You could make a new UIWindow to put the UIView in. Set the windowLevel of the window high enough to order it above other windows. Or you could add the view to the superview or window of the navigation controller.

[theNavController.view.window addSubview:theMessageView];

You could add it directly to the navigation controller view, but I think that is discouraged.

drawnonward
If i use that, it adds it ontop of the current view? or to the "hierarchy" so its a new view being pushed and the back button then responds to going back to the original view, if that makes sense? i dont want that, i want the first part you described about, how would i call that new UIWindow so its high enough to be ontop?
The windowLevel of the main window is 1, so anything higher than that should work. A new window may be opaque by default.
drawnonward
Thanks, I can try using that, but once i displayed it, how do i undisplay it, or hide it if internet is available?Thanks
Also, I made a new UIWindow, with a new UIView and a label that says No Internet, and typed in[navigationController.view.window addSubview:NoInternet];But it doesnt bring it up