uiviewcontroller

How to access UITableViewCell's UITextView from the UIViewController?

I have created my own UITableViewCell with XIB file. There's an UITextView inside. However, I don't know how to access its features and use its outlets with the UIViewController. What's the way to do it? ...

can a uiviewcontroller push a uitabbarcontroller?

if so, how do i setup my uitabbarcontroller in IB? all the examples ive seen create the uitabbarcontroller in the app delegate. ...

UIModalPresentationFormSheet on iPad in landscape mode

I created a UIViewController view from XIB with modalPresentationStyle set to UIModalPresentationFormSheet and everything works great in portrait mode. When I switch to landscape the view gets moved upperleft (it's not centered as it should be) and most part of it is clipped. Any ideas why this is happening and how to solve it? Thanks ...

If a View Controller tries to get rid of it's view, what happens with the superview?

Think of this: A view controller's view is added as subview to another view. Now the view controller tries to unload that due to low-memory warning. I believe that is impossible because it is retained by the superview. But what if the VC really unloads the view, and then loads it back again when it is needed? Who will add is as subview t...

What's the point of having to set the frame of a view of an UIViewController when it adjusts it anyways?

From the docs: Create a root view object that is sized to fit the screen. The root view acts as the container for all other views associated with your view controller. You typically define the frame for this view to match the size of the application window, which itself should fill the screen. However, the view contro...

Isn't it better to create the subview hierarchy in -viewDidLoad rather than in -loadView?

The docs say that the whole subview hierarchy can be created in -loadView. But there's also this -viewDidLoad method which sounds nice to ovewrite for actually building the hierarchy, when the view loaded. I guess it's a matter of taste only. But maybe doing so in -viewDidLoad hast the advantage that the view controller already adjusted ...

Two UIViews, one UIViewController (in one UINavigationController)

Given an iPhone app with a UITableViewController pushed onto a UINavigationController, I would like to add a right bar button item to toggle between the table view and an "alternate" view of the same data. Let's also say that this other view uses the same data but is not a UITableView. Now, I know variations on this question already exi...

UIVIewController wrong position before rotate

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 ...

Selectively push part of UIViewController

In the Twitter for iPhone application (the app formerly known as Tweetie) there is nifty effect when pushing from the tweet view controller to the account view controller. The name of the account, the profile image and the users name stay fixed in position while the navigation controller animates pushing a new controller on to the stac...

Notifying view controller when subview touch events occur.

I have a UIViewController whose view has a custom subview. This custom subview needs to track touch events and report swipe gestures. Currently I put touchesBegan, touchesMoved, touchesEnded and touchesCancelled in the subview class. With some extra logic I am able to get swipe gestures and call my handleRightSwipe and handleLeftSwi...

UIView remove itself from UIScrollView

Hi! Following Scenario: I have a = UIViewController A that contains a UIScrollView I have a second UIViewController "B" (amongst other things it contains a button) and add it to the ScrollView of A myView *mView = [[myView alloc] init]; [myScrollView addSubview:mView.view]; Is there a way that once the button is pressed that it(view...

View controller with a navigation controller

Can you point me a guide/tutorial/sample how to implement this correctly? I just want in the first view (it's a view controller) there's a button. Clicking the button will go to the 2nd view. The 2nd view will have a navigation controller and a table view (the table view will drill down to the 3rd view). Most tutorial I've found, they ...

only show half screen of controller using presentModalViewController

i have a UIViewController that is only about 260px tall(or at least the area i want viewable is 260 approx. height) and really just has a picker on it and a done button. I'm calling presentModalViewController to display it but its showing the whole view, when really i only want to show the picker and the done button bar above the picke...

UIView autoresizingMask problem

In iPad. I have a UIViewController with another UIview inside it, at the bottom. ____________ | | | | | UIView | | Controller | | | | | | X | ------------ The UIView is the X. I define for it an autoresizingMask like this, on the viewDidLoad of the UIViewController self.view...

Why won't this view controller init? (NEVER MIND)

In trying to debug why a view controller is initing empty, I've ended up a sort of weird place. Check this out: OffersSearchController *searchController = [[OffersSearchController alloc] initWithNibName:@"This is a completely bogus nib name." bundle:nil]; Not a single complaint. I've seen that sort of construct cr...

iPhone: how can I activate a text field programmatically (and not wait for the user to touch it)

I have a UIViewController that is a UITextFieldDelegate, and I would like the keyboard for its text field to appear as soon as the user navigates to this view, without having to actually touch the text field. It would also be nice to be able to "dismiss" the entire view when the keyboard is dismissed. I am loading the view from a xib fil...

UITableView with UIDatePicker ?

Hi, please I need some advice about design approaches in iPhone programming. I want to display a table view (with three cells that will never change) and a UIDatePicker. I don't use Interface Builder. I created a UIViewController subclass and tried to put all together in its viewDidLoad method: UITableView *myView = [[UITableView alloc...

loadView doesn't load my views properly after memory warning

I set all the subviews that I created in loadView to nil in viewDidUnload. I simulate a memory warning in simulator, and my offscreen views and their subviews get removed via viewDidUnload. However, when loadView gets called again as these offscreen views come into view, my subviews don't get recreated properly the second time. For exa...

How to create two sections of the same screen using a custom view controller

I was wondering if someone could tell me how to create a custom view controller which will split the screen into two sections and manage the sections seperately in the same manner that the iPad Zillow app does this? See http://www.zillow.com/ipad/ if you are unfamiliar with the app. Thanks. ...

How to change the value of a variable using back button in iphone

I need to change the value of a variable of the previous view when the default back button is selected. How can I develop this using viewControllers in an iphone application? I tried to do it by creating a custom back button and by set method. I call both these methods in viewWillDisappear method. -(void)viewWillDisappear:(BOOL)animate...