uiviewcontroller

How to perform kCATransitionPush animation without any transparency / fade effects

I'm trying to duplicate the "slide up from the bottom" animation that [UIViewController presentModalViewController:animated:] performs but without calling it because I don't want a modal view. The below core animation code comes very close but appears to be changing transparency values of the views during it. At the start of the animati...

How do I create a UIViewController programmatically?

I am working in a app where i have data in UITableView. It is like a drill down application. User will click on a row and will go to next page showing more records in a UITableView. But problem in my case is that i dont know upto how many level user can drill. The number of levels are not fixed. So now i am thinking to create and add the...

How to change the view if I am not present in the viewController class?

I am doing an app with about 6-7 views and their corresponding controllers. I am in a view with a toolbar and button. When I click this button a popup view comes and my control is being moved to the popup view's Controller. But my view is still the same. From this popupview Controller's class, I want to change my original view. But sin...

Can a View Controller manage more than 1 nib based view?

I have a VC controlling a screen of content that has 2 modes; a normal mode and an edit mode. Can I create a single VC with 2 views, each from separate nibs? In many situations on the iphone, you have a VC which controls an associated view. Then on a button press or other event, a new VC is loaded and its view becomes the top level vie...

How can I know which viewController is being displayed(in view) currently by my appdelegate?

I am doing a normal viewBased application and have added another viewController(along with the xib). When the application starts, normally it will display its own view. I am doing an action and is going to another viewController class. From this class, I want to check which viewController is being displayed currently in the view. How c...

How switch UIViewController by flip from 3 controllers ?

Hello, all. I've got next problem: i've got 3 UIViewController and need to switch controllers by UIModalTransitionStyleFlipHorizontal. Next code working fine: testController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:testController animated:YES]; where testController - next control...

Is there a way to stop a UIViewController from being popped from a UINavigationController's stack when the backBarButtonItem is tapped?

I have a UINavigationController with a root view controller and then I push a UIViewController onto the navigation controller's stack. When the user taps the backBarButtonItem I'd like to be able to have an alert view pop up if there are certain conditions met and cancel the pop of the view controller. For example, the user can make ce...

Need to dealloc all views in navigation controller

Hello, I'm trying to set up an in app purchase and once the purchase has been made I need to reset the app to its initial launch state. I'm wondering if there is a way to dealloc all the view controllers inside of each navigation controller and reload the initial view that is displayed when the app launches. Thanks in advance! ...

point of UIViewController in IB

What exactly is the point of adding a UIViewController in IB? There is no way to add code like you can if you create a viewController in Xcode? And if you can what is the advantage of doing it in IB. And isn't the whole point of a MVC to seperate code into "modular" parts so why would add a ViewController in IB ...

How can the subView detect that the mainView is rotating?

I have a mainView. To this view, I am adding a view of the same size. When the mainView(the background) rotates, its being detected but the subview doesnt have any idea about being rotated. And its functions are not even being called. Even when the program launches too, if I am in landscape mode, its the same way. How can I make the sub...

iPhone: Modal View Controller Leaking Memory

Hi! I'm presenting a modalViewController. After I dismiss the modal view controller with: - (void)dismissModalViewControllerAnimated:(BOOL)animated .. the view is still in memory. How do I dismiss it such that it will use memory? Thanks. ...

Which pattern should be used for editing properties with modal view controller on iPhone?

I am looking for a good pattern for performing basic property editing via a modal view on the iPhone. Assume I am putting together an application that works like the Contacts application. The "detail" view controller displays all of the contact's properties in a UITableView. When the UITableView goes into edit mode a disclosure icon i...

UINavigationController reset inner UIViewControllers

Hi, I have very unique problem. My app has UINavigationCnotroller with a set of UIViewController's. Most of the time everything goes fine but at some point, when I press Back button, the UIViewController to which I return suddenly reloads. i.e. the loadView called second time and the interface becomes squashed.. Prior to this I had UITa...

iPhone - Get controller which pushed me

Hi everyone, When I pushed a controller, is there a way to get the controller which pushed it (without sending it)? Or the first one? Thanks ...

Showing login view controller before main tab bar controller

I'm creating an iPad app with a tab bar controller that requires login. So on launch, I want to show a LoginViewController and if login is successful, then show the tab bar controller. This is how I implemented an initial test version (left out some typical header stuff, etc)... AppDelegate.h: @interface AppDelegate_Pad : NSObject ...

Add a smaller subView with new origin

I can't get my head around this - I know it must be simple.. I'm starting to feel pretty stupid. I have two viewControllers. MainViewController.h/m and LevelsViewController.h/m I want to add a subView from the LevelsViewController class and a view that is built in IB called levelsView. I am calling this from the MainViewController.m fil...

iPhone - how to find a parent View

Hi there, I need some help to find a View inside a hierarchy. Here is how I build up the View stack. Inside my first UITableViewController I push an UIViewController that contains an UITabBarController: [[self navigationController] pushViewController:itemVC animated:YES]; Inside the UITabBarController I add an UITableViewController...

How do I have my UIViewController respond to a non-touch event?

Working with iPhone SDK 3.2 -- I have a complex custom UIControl that handles touches on the child controls. In certain cases, I want the parent UIControl to pass an event to the UIViewController, which will then take action outside the control. How do I do this cleanly? Thank you! ...

View controllers inside tab bar controller not auto-resizing on rotation

(Correction: the view controllers are not auto-resizing instead of not auto-rotating.) In an iPad app, I have five regular view controllers (not navigation controllers or anything like that) inside a tab bar controller. The tab bar controller is just a plain UITabBarController declared in the app delegate. All the view controllers ret...

Changing UIView on orientation change

Hey all. I have a fairly simple question. I am developing a "rich" iPad app, and I have two background images specifically designed for landscape and portrait. I'd like this ImageView to automatically change depending on the devices orientation. (like pretty much all of Apples iPad apps). Can anyone point me in the right direction? I'm...