As a Cocoa noob, I'm having a few issues with Interface Builder, UIViewController and friends.
I have a UIViewController subclass with a UIView defined in a xib, and with the controller's view outlet connected to the view. The xib's "file's owner" is set as my controller subclass.
In this one instance, the following code to load the co...
I have an class that inherits from UIViewController. There, I want to make some ivar initialization like this:
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)nibBundle { // Load the view nib
NSLog(@"Hello Earth!");
if (self = [super initWithNibName:nibName bundle:nibBundle]) {
self.visibleIndex = 0;
NSLog...
I have a View that has a UIWebView, and an OptionsPane (Custom UIViewController with Custom view).
I want when the view is shown, for the options pane (located on the top of the main view) to FLIP into place. I am using the code, and I am getting a strange result.
The FIRST time the view is shown, the options pane seems to already be v...
I'm having a problem setting a View Controller nib's default View Outlet in Interface Builder. Here's my setup:
I have a TabBar based application where I load a Navigation Controller as a modal view...
MyNavCtrlrSubClass *menu = [[MyNavCtrlrSubClass alloc]initWithNibName:@"MenuController" bundle:nil];
[tabBarController presentModalView...
I am trying to set up a Modal View Controller, that that lies below a fixed toolbar. therefore the toolbar is supposed to stay on top while the modal view rolls in.
the Safari-App does that for example, when hitting the bookmarks-button. the toolbar stays, the buttons change..
I tried a couple of things like pushing the toolbar to the ...
I have a button in a Nib based view which does not behave like a button (the target method is never called). I have tried to dynamically add the button but it doesnt help.
I will try to describe the app structure (as I suspect it might be causing this issue) and I may not be using the right design pattern.
View A is tied to Controlle...
Hi,
I have a certain UIViewController (ViewController1), which shows contents of a database.
And I want to show another view controller(ViewController2) if the database was not loaded before.
So when user enters ViewController1 and the database was not loaded before, I want to take him to ViewController2 instead of ViewController1.
So...
If anyone has used the iPhone's SMS app, there is a special animation with the compose view.
When you first press compose, a modal view controlelr is shown. However as soon as you press send, it shifts to your chat view controler. But here are a few weird behavior:
1) The keybaord stays intact. Usually when you pop and push new contro...
Hello together
I'm trying to add rotation support to our application which we are currently developing. Unfortunately its not working. So I created a small test project to test what the reason could be. And I found a strange behavior which I cannot explain.
In my test project I have two RotationTestViewController (extended from UINavi...
Does anyone have any idea how to remove the "Text Message" button for this controller? It automatically shows up when a number is set.
Thanks,
Fred
...
I am trying to develop an app which can have multiple views (up to 30). Each view will have have similar navigation but the content will be different. Do I have to create 30 view controllers or can I get around by creating a view controller for the data (content) alone. I am sure creating multiple view controllers is going to be ineffice...
In Navigation-based App, when i try to load another view which has got implemented UITableView using initWithNibName:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIViewController *detailsViewController = [[UIViewController alloc] initWithNibName:@"bloop2ViewController" bundle:nil];
...
Is there any performance, development drawbacks or advantages when designing Views using Interface Builder?
...
My main view controller is a UITabBarController, with 4 UINavigationControllers as the tab bar items. Each navigation bar is a couple of different views that get pushed onto it's stack.
I have a single view that I want autorotated, but I can't get willAnimateFirstHalfOfRotationToInterfaceOrientation to be called within that view contro...
I have a UIViewController (named VC) that inherits from UITableViewDelegate and UIScrollViewDelegate. The previous UIViewController loads VC like this:
[self.view addSubview:VC.view];
which means viewWillAppear doesn't fire. I can add that method just after the above line:
[VC viewWillAppear];
but then it will fire before cellForR...
I'm using a UITableViewController for a menu in a game. The table view opens a a view controller for my custom UIView that shows the game. When the game finishes the UIView is notified (which is kinda ruining the MVC principals) and from there I am kinda lost.
Questions:
Can a UIView communicate with its controller? How?
Can one contr...
Hi,
what are best pratices to reuse UIViewControllers? In many apps (including Apple's own examples: e.g. SQLiteBooks), UIViewControllers are allocated and initialized everytime, a UIViewController is pushed to the stack. This increases the use of memory with every new controller, because the objects stay in memory and aren't used again...
I'm building an app that begins by loading a 'downloading' view controller which fetches an array of data through an API call. Once the data is returned, the app then hides this view controller's view, and loads a tab bar controller, which houses two navigation controllers.
The first view pushed onto the first navigation controller is a...
Hi guys!
I have a problem and I will try to explain the issue:
I have one main UIViewController (Whole screen)
I have one secondary UIViewController (setbounds)
I added my secondary view to my mainview using this:
[mainController.view addSubview:secondaryController.view];
I created a third controller: modalController, i added it to m...
In a UIViewController's viewDidLoad method, I do this:
UIButton *b = [[UIButton buttonWithType:UIButtonTypeRoundedRect]
initWithFrame:CGRectMake(0, 0, 100, 100)];
[b setTitle:@"Testing" forState:UIControlStateNormal];
[b setTitleColor: [UIColor blackColor] forState: UIControlStateNormal];
[self.v...