uiviewcontroller

Removing multiple ViewControllers iPhone tabbar app

OK so having a real headache with this one and most of the day has been wasted! with little progress! The app: I have a tab bar application each tab has its own view controller and associated view. Say on tab 1 a user clicks on a button to go to a different view i have implemented the following: [self.view addsubView:view 2] I keep a...

How can I have alternate nib files for a given ViewController and change them on the fly?

I have a ViewController which controls a view that needs a different layout in landscape mode than in portrait mode. I made two .xib files that are semantically identical but have different layouts. I know there is a hack to display a second ViewController modally when in landscape mode, but I'd really rather just re-initialize the vi...

combining flipsideview and navigationview

when i am trying to combine flipsideview and navigation view i am getting following error "request for member 'delegate' is something not in a structure or union" on the line controller.delegate = self; ...

UIViewController won't respond to presentModalViewController...

Hey., I've had a UITableViewController-Class. I've changed the UITableViewController Class to UIVIewController and made and specified the connections in IB new. Everything works fine, except [self presentModalViewController:.....] The compiler says that self my not respond to "self" and the app crashes when rotating the view. thanks fo...

Using 'presentModalViewController' to load a view

This seems like a simple task but I can't figure out what's holding my small application back from actually doing what it's supposed to. I am attempting to load a temporary, slide-in, view from another view controller. My application's view controllers are structured: Application > Tab Bar Controller > TabBarItem > View Controller In t...

How to init UIViewController with UIInterfaceOrientationLandscapeLeft ?

Hi I have a WebViewController that inherits from UIViewController and also use shouldAutorotateToInterfaceOrientation. Well so good so far, but when I switch to the WebViewController, then is starts in Portrait mode. Only when I turn the iPhone, it starts rotating. Now any idea how to start in UIInterfaceOrientationLandscapeLeft ? ...

dismissModalViewControllerAnimated: will not dismiss the page?

I have read all the other user's accounts of problems, but they don't seem to conclude with a result that works for me or they end with 'I fixed it guys - thanks for the help', but then they neglected to share their solution. Here is my code to present and dismiss (all key objects are properties of my application delegate. I am trying ...

Shared or sub UIViewController concept in iPhone programming

I have (at least) two views which have the same table view but other stuff around, depending on how the user navigated in the app. Ideally, I would like to have a generic table view and controller which other views and controllers could, for lack of a better term, "include". This would then allow me to encapsulate all the table view and ...

Where to place drawRect?

I am just starting to learn drawing procedures for the IPhone, but something confuses me. If I start a new view-based application, and establish a new view class, associate that with the view that came with the application, then drawRect, placed in that new view class, seems to work. But why can't I just establish my drawing routines...

Why doesn't delegate/datasource show in IB?

I have a uiviewcontroller declared like this: @interface RootViewController : UIViewController<UITableViewDelegate, UITableViewDataSource> I've dragged a tableview onto the rootcontroller's view. When clicking the File's Owner, all I see is tableview. Where is the delegate and datasource, which need to be connected for the tableview...

Programatically resize a UIViewController based on its container

I have a simple UIViewController with just a UIWebView. The UIWebView should take all available space to show the content of an url. I would like to reuse this ViewController in various places. In some cases it will be pushed into a NavigationController, in some it will be shown as a ModalViewController. Sometimes it might be inside a T...

Action performed by UIViewController in UITabBar and Switched Back to Original View

In have a UITabBarController with 3 view controller subviews. The default subview for the app is viewOne (with viewControllerOne). The other two are viewTwo and viewThree with the ordering in the UITabBar as expected. My objective is to have an action be done when viewTwo is selected in the UITabBar while viewOne is active. The viewTwo...

pop more than one views when back button is pressed?

Hi, I am developing an application in which I am using a login form at first screen. If the user is new he is takne to the signup form and after that he is also taken to the home page as a normal user. Now my question is "If the new user presses back btn, how can I direct him back to the login page and not to the sign-up forms and all ...

Reloading Data in a UITableView when pressing a UITabBarItem

I have a UITabBarController as part of my app delegate and I want to trap when the user touches a specific tab (the favourites) and force the table within it to reload the data. What would be best practice in this instance? I have added the UITabBarDelegate protocol to my app delegate and implemented the didSelectViewController method....

Setting UITableViewCell crashes simulator

In my UIView nib file, I've got a UITableView which takes up about half the screen. The correpsponding .h and .m files are: // helloViewController.h #import <UIKit/UIKit.h> @interface helloViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { NSArray *locationArray; } @property (nonatomic, retain) NSArray ...

What works to pass touches through to (and display all) subviews?

I have the following subview chain: UIViewController.view -+ |-> UIView (subclass) -+ | +-> UIToolbar | +------------------------> UIWebView In the subclass, I override its -touchesEnded:forEvent: method in order to hide a...

resize uinavigationbar push/pop viewcontroller size issue

hi there, i need to shrink the height of a UINavigationBar (attached to the UINavigationController) i've done this via the UINavigationControllerDelegate's navigationController:didShowViewController method, and it's working fine. the problem is the visible viewcontroller that's in the main view. it wasn't resizing itself to reflec...

iPhone: Multiple View (Screen) Management?

I'm curious what the best method is for managing the traversal through several views without burning screen space using a navigation bar. As an example, assume I have four UIView's with associated UIViewController's: 1: Top level menu (invokes A or B.1) 1.A: Menu selection A (return to 1) 1.B.1: Menu selection B, part 1 (invokes B....

iPhone UIViewController goes under status bar

I have UIView and UIController view. My is standard 320x460 view. In applicationDidFinishLaunching I do [window addSubview:[controller view]]; What is weird, UIView goes under the status bar (like there's missing outlet). However, if I rotate iPhone to the side and then back, it shows up ok. Is this an expected behavior (I bet I can ...

How to use a touch in both the view and the viewcontroller?

I have a simple UIView with touchesBegan... implemented, and I process the touches in the view, but I want the viewcontroller to know when a touch occurs. No specific information about the touch is necessary for the viewcontroller. Is there an easy way to do this, and if not, what's the hard way? Thanks in advance for any help. John ...