uiviewcontroller

Renaming Rootviewcontroller

Here's another very basic question. Is there an easy way to rename the rootviewcontroler? Say I decided that I needed to add a page before the current rootview (splash page, mini data snipits from the main app, ect.) How hard would it be to create another rootviewcontroller? I guess you would just take the current one and edit out lots o...

How to add a notification for pop view controller in iphone application?

I have seen the sample application of iPhone MP-movie player - controller. They have added a notification on the sample code. // Register to receive a notification that the movie is now in memory and ready to play [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePreloadDidFinish:) name:MPMovieP...

Creating a button on View1 from View2

Hi, I'm in a struggle. I have this app with two views. View1 empty. View2 with a textfield and an OK button. I want to accomplish the following: On View2 the user inserts the name for a button; its title. (the way user reaches view2 is not relevant. It could be with a button or a tabbar button on View1.) After pressing OK button, View...

iPhone Adding Views on Windows Practice

I'm learning how Objective-C on the iPhone layers views onto the main window. I've tried remaking a basic program to draw two different colored rectangular views onto the main UIView for an app, but it does not seem to work. My current output is a white screen. However, when I close the application, it briefly shows the two rectangles...

iPhone sdk pass messages between view controllers

Hi, I was wondering what is the best practice for an application flow in iPhone development. How do you pass messages between ViewControllers? Do you use singletons? pass it between views or do you have a main controller for the application that manage the flow? Thanks. ...

How to replace a viewController in the NavigationController Stack?

Hi I have a navigationController, I push a new viewController onto it's stack, I have been trying to figure out a way to switch this ViewController with another viewController from within the first ViewController. I have 3 almost identical views, depending on the user interaction I would like to be able to switch between these views wi...

Custom Wrapper Class for UIDatePickerView on iPhone

Hi I'll be using a datePicker several places in my app. I don't want to "clutter" up each and every viewController with the delegation methods for the UIPickerViewDelegate and UIPickerDatasource, plus I would be doing the same delegation methods over and over again. Every time the datePicker is in play it's sole purpose is to slide half...

Design view in Interface Builder to load lazily in UIViewController

I've managed to get my myself confused... I've got a fairly complex View Controller much of which is developed programatically. I'd like to pop up a "dialog" on top of the view controller at some point and I'd like to "design" that view in Interface Builder because it's fairly straightforward (background UIImageView, some UILabels and a ...

iPhone SDK: handling keybaord appearance

Hi, I need to move UI elements of my view controller when keyboard appears. I do this by registering for the keyboard notifications in my app delegate: [[NSNotificationCenter defaultCenter] addObserver:observer selector:@selector(keyboardWasShown:) name:UIKeyboardDidShowNotification object:nil]; [[NS...

Why isn't my UIButton responding to touches?

I'm sure I'm overlooking the obvious as I've got countless working buttons...but...for whatever reason this one is not cooperating... I've added a UIButton (Rounded Rect) to a UIView subclass (DialogView) which is a subview of my view controller's view. This subview is created almost entirely in IB. I've wired up the button to (IBAction...

Calling another view from within a view class

i may be making more out of this because of the late hour. i am confused. i have multiple views i call from a viewcontroller class. typically they are called with a uibutton object. say i have two views. main and child view. here is how i would call the child while the main view is visible. [self presentModalViewController:childVie...

adding a category for UIView animations

Hello, I would like to have a category for UIViewController containing few simple methods to move the view controller's view around, fading it etc... For example the method below fades in/out a the VC's view. I'm not using instance variables and the onTransitionIn: method is called, the problem is the view doesn't fade in/out. Can som...

How to use a UIPicker to open to a new UIView??

How can i do this I want to take a UPicker and when tapped it opens up a xib/UIView can somebody please help me out with this im going crazy here LOL ...

EXC_BAD_ACCESS on UITableView reloadData call

Hi all, I've come to the point of pulling my hair out over this one. I keep getting a EXC_BAD_ACCESS when I call the reloadData for the UITableView. I'll lay the groundwork for you here. MainViewController.h #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> @class iPROSAppDelegate; @interface MainViewController : UIViewCon...

Are viewDidUnload and dealloc always called when tearing down a UIViewController?

I have a query about the use of viewDidUnload and dealloc in a simple implementation of UITableViewController. Essentially I'd like to know more about weather or not both viewDidUnload and dealloc are always called in succession in the tear down process. Is it possible that dealloc could be called on the controller without viewDidUnloa...

Why does rotation of iPhone cause crash when _existingView message is sent to deallocated object?

I have two view controllers: MyParentViewController and MyChildViewController. The application starts with MyParent. I push the MyChild controller to the top of the navigation stack, so that the chain is like so: MyParent > MyChild I log the object ID of MyChild with NSLog(@"%p", self): 2009-11-20 05:08:29.305 MyApp[2213:207] MyChil...

Navigation & View Controller questions

I'm experimenting with ViewControllers & NavigationControllers in Interface Builder trying to get a better grasp of what's tied to what and why... I'm struggling with a scenario that has confused me. Hopefully someone can set me straight... Say I start with your typical iPhone template View-Based Application and I display a view which i...

UIViewContainer with UITableVIewContainer subView, UITableViewContainer.View leaves gap at top

I have a UIViewController with a UISegmentedControl that swaps out one of 3 UITableViewControllers depending up the pressed segment selected. Everything works great, except the UITableViewControllers do not fill the entire available screen, but leave a gap at the top . ...

iPhone - calling a method in parent view controller

Hi, have hunted around for an answer to this one, but can't seem to find a definitive solution - hoping someone can help here! I'm building a multiview app for the iPhone. I've created a UIViewController called "MainViewController", which loads in other views as required. There's quite a lot of navigation between screens, so what I'd ...

Lost my nib connection: how to get it back?

I am writing my very first genuine program for the IPhone. In the course of developing it, I decided to rename a subsidiary view controller (not RootViewController), so I renamed the .h and .m and .xib files. I had to modify a small amount of code, such as import statements, but the coding effort quickly recovered and all compiled and ...