Note: This may be a duplicate of Subview Doesnt AutoSize When Added to Root View Controller
I have an iPad app that switches between different views in its main window. The view-switching code looks like this:
- (void)switchToViewController:(UIViewController*)viewController {
if (currentViewController != viewController) {
...
HI there,
I'm trying to use UIScreen to drive a separate screen with the VGA dongle on my iPad.
Here's what I've got in my root view controller's viewDidLoad:
//Code to detect if an external display is connected to the iPad.
NSLog(@"Number of screens: %d", [[UIScreen screens]count]);
//Now, if there's an external screen, we need to...
Hello experts!
Let's say I add a new view to my UIWindow
[windowRoot addSubview:MyNewView.view];
Is it possible to retrieve the name of that view later on if
I have reference to windowRoot?
Something like:
[windowRoot getCurrentViewName]
Thank You
...
Hello all.
i need help to get over my trobel, i a'm relly begninger to Apple iPhone App Dev. soe now i what to learn it.
First troble i have its how can i make my ToolBar UIBarButton to go to a ordre pages, its becures i need to load a ordre data into this plase.
i hove i can be help here. :)
...
I want to have a UIView take over the whole screen to display an image from time to time, but most of the time I'm using a UISplitViewController for the main app functionality. Is there a recommended/best practice way to do this? Right now, I have a pointer to the main window and am just adding the UIView as a sub view and bringing it to...
HI,
I have been trying to get the x/y coordinates from a touch on any iDevice.
When getting the touch locations, everything looks ok if the touch is in the middle of the screen. But if I drag my finger to the bottom of the screen, I can only get a y coordinate of 1015. It should be getting to 1023. Same thing for dragging my finger to ...
I have the starter point of my application this window (white background):
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
mainScreen = [[MainScreenController alloc] initWithNibName:@"MainScreenController" bundle:[NSBundle mainBundle]];
// add it to the main window
...
Hello
In appdidfinishlaunch I'm loading a tabbarcontroller as subview and after that im loading an other view
MySubView * mySubView = [[MySubView alloc] init];
[window addSubview:mySubView];
[mySubView release];
I want to close that toplayer with a buttonclick in the subview, so I set up an IBAction and tried diffrent things to force...
Hi, I want to get the origin of scrollView in the window coordinate system. For Example, presently, scollView origin is (0,51). But in window coordinate system it should be 51 + 44(navigation bar height)+20(status bar height) = 115. Means in window coordinate system the scrollView.frame.origin should be (0,115). I tried with convertPoint...
Hi,
I am trying to hide UIWindow from view controller ,
NSArray *windows = [[UIApplication sharedApplication] windows];
if ([windows count] > 1)
{
UIWindow *moviePlayerWindow = [[UIApplication sharedApplication] keyWindow];
[moviePlayerWindow addSubview:CustomButton];
}
But come back to view controller i am not able to h...
Starting from the base OpenGL ES iPhone project in XCode, I am creating an app which is nearly completed. What I don't understand is the use of views, view controllers, and windows which I apparently need to implement to use iAds (for the iPhone) and AdMob (for the iPad).
I was able to follow the AdMob tutorial using the Interface Buil...
Hello.
I've been able to incorporate all of Apple's code, delegation, etc related to iAds... in simple view based applications.
Tab bar type applications seem more difficult... perhaps I don't understand the overall architecture of those apps. It seems that say if there are 3 tabs and views corresponding to those tabs that the other t...
I needed to see touch events on my window, so I subclassed UIWindow to make my a MYWindow class. I am overriding the sentEvent function to receive the touch events on the window and all of that is working just fine. I did the following to achieve this:
self.window = [[MYWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[win...
Hey guys,
Whenever my app is rotated, only the viewController of which I've added his view as a subview to the mainwindow gets his interfaceOrientation property updated, the rest remains ignorant of the fact the device has been rotated.
Is it my responsibilty to notify other objects of the change, and if so, what's a nice way to do it?...
I need to be able to detect touch events on the keyboard. I have an app which shows a screen which occurs after a certain period of inactivity (i.e. no touch events) To solve this issue, I have subclassed my UIWindow and implemented the sendEvent function, which allows me to get touch events on the whole application by implementing the...
What I want is having my iPhone app aware of shaking gesture all the time except when any UITextfield or UITextview become firstResponder.
(I followed this: http://stackoverflow.com/questions/150446/how-do-i-detect-when-someone-shakes-an-iphone/1351486#1351486I)
I subclass UIWindow and implemented motionEnded:withEvent: method and it w...
My app uses 2 UIWindows.
The first shown has a TabBar controller with ViewControllers that only rotate to Portrait orientations. Up to here everything woks fine.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (UIInterfaceOrientationIsPortrait(interfaceOrientation));
}
On the othe...
hi,
when we create iphone project, one UIWindow is created automatically.In that UIwindow UIViewcontroller's view is added on that window.but i want to create one parent UIWindow
on which i have to add two sub window .In that sub windows i have add UIview controllers as normal...is it possible? any help please?
...
hi,
My UIWindow has twoviewcontroller in pad .(for example ,tableview and imageviewcontrller ) I have done flipanimation when user presses the tableview, i called the method which is in appdeleagte from didSelectRowAtIndexPath ..(LIKE SPLITVIEWCONTROLLER)
the method in t didSelectRowAtIndexPath
iPadButtonsAppDelegate *mainDelega...
i have four viewcontroller in my UIwindow.i want to interchange my viewcontroller's view among four through UItouch in UIWindow?is it possible to handle touchmoved in appdelegate.m file to change the frame origins of those viewcontrollers?
...