Hello, I have a question about UIViewController's subview, I created a UIView subclass MainView, which has the exact size of the screen, I wonder which is a better way of adding MainView, consider the following factors:
1 As MainView has same size as the whole screen, the MainView itself may have subviews, but there is no views at the s...
I have a UITableView and I have set up didSelectRowAtIndexPath, which gets called (I have verified it using NSLog) every time user clicks on a row.
However, I want to reload the same view and change a different data. For example, I am displaying content of a directory on a remote web server, and as soon as user clicks on the row, I want...
Hi there,
I'm writing a custom UITabBarController so I can fully control appearance of the tab bar. I've got it all working so I have an array of view controllers that it handles.
The controller has a main view which fills the screen, and inside it it has a UIView at the bottom for the tab bar. That tab bar view has a button for each v...
Whenever I add a new viewController my ObjectAlloc jumps up really high and never comes back down. Even after calling removeFromSuperview. Is this normal?
if((UIButton *) sender == gameArcadeBtn) {
GameArcade *gameArcadeController = [[GameArcade alloc]
initWithNibName:@"GameArcade" bundle:nil];
self.gam...
Is a view controller added to the stack of view controllers at the #import line of the root view controller? Is this where indexPath gets the info about the view controllers?
I've read documentation and seen tutorials, but this aspect still isn't clear to me. I'm been learning Xcode/Obj-C for 4 months now.
Thanks,
Steve
...
I have a view controller set up as follows:
UIViewController
In IB I have set set a UITableView to have the File's Owner (the UIViewController) be both its delegate and data source. When I Build & Go, I can trace the table view methods (for sections and rows) being called so the connections seem to be OK through the view loading.
But...
I have several buttons on my main UIViewController (main menu) that creates and adds a subview UIViewController on top of the main menu. When I remove the subview the memory from that controller is not released. How can I release that subviews memory instantly?
Does anyone have an example? This would solve all my problems! Thanks in...
My main UIViewController, (PMGameViewController.h), is the file which my apps delegate calls.
There are several buttons on my main UIViewController (PMGameViewController.m). When a button is pressed I do an insertSuvbiew and attach another UIViewController on top. When the mini game is over I simply do a removeFromSubview. This rem...
I have presented the viewController which contains a navigation controller whose view is loaded from another nib with the UITableView in it. I would like to dismiss that presented viewController from the UITableViewController. I have tried every combination of self.parentViewController and self.navigationController and self.navigationCon...
Hi, anyone knows why UIViewController wouldn't become first responder when I run this code:
[self becomeFirstResponder];
NSLog(@"is first resp: %i",[self isFirstResponder]);
In the console, I always see the line: "is first resp: 0"
I HAVE canBecomeFirstResponder method:
- (BOOL)canBecomeFirstResponder {
return YES;
}
I don't even ...
Hello
I have an iPhone application that loads succesive views in a framework based on the one explained in this link (basically a main ViewController that loads/removes additional views with a displayView method). In my application I am using NIBs (the example link uses coded views) though so each of my ViewControllers has its accompany...
I have a ViewController which controls many subviews. When I click one of the buttons I initialize another viewcontroller and show it's view as the subview of this view. However the subview exceeds the bounds of the frame for subview and infact fills the entire screen.
What could be wrong? I presume the problem is that UIViewController'...
Hi Everyone:
I am attempting to call presentModalViewController on a UIViewController in order to bring up a Address Book "view", however I am running into a bit of a problem. The UIViewController that "controls" the app simply draws a view to the screen and then lets the view do all of the handling of user interaction, etc. But now, ...
Hello all I was wondering if there was a way to create some sort of frame for the UIViewcontroller
for instance like so ( i know it doesn't work) :
UIViewController *example = [[UIViewController alloc]
initWithFrame:CGRectMake(0, 0, 320 , 55)];
a bit like the UIWebview
UIWebView *aWebView = [[UIWebView alloc]
initWithFrame:CG...
What is the simplest way to add UIToolBar to UITableViewController? I'm depending on edit functionality, so I can't change UITableViewController to UIViewController easily.
...
So, I'm capturing multiple touches and determining the number and where each of the touches occurred and I'm seeing different behavior between a UIView UIViewController.
Basically, the event handler is coded below: (in this case the touchesEnded, but it really doesn't matter). What happens in the View, is that I get the entire collect...
I have a UIViewController that I'm using to control a "pop-up" view for viewing images throughout my application. It supports autorotation, as it automatically sizes the image to fit properly regardless of orientation. This works perfectly, but only the first time I initialize and display the view controller. When it closes, I am remo...
I'm using a UIViewController containing a UIView and a UINavigationBar on which there is two buttons (Cancel on the left, Save on the right).
This UIViewController is presented on the screen like this on top of a Tabbar based application:
[self presentModalViewController:(UIViewController *)myUIViewController animated:YES];
This wor...
I don't use IB much for creating my views, so I usually do everything programatically. I'm bascially pushing a viewController to a navigation controller and it seems the top part of the viewController is under the navigation bar. I'm trying to make the view fit correctly.
Here is my code:
navigationController = [[UINavigationControlle...
I add a firstView in the AppDelegate :
#import "TestViewAppDelegate.h"
#import "MainViewController.h"
@implementation TestViewAppDelegate
@synthesize window;
@synthesize mainViewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
MainViewController *aController = [[MainViewController alloc] initWit...