uiviewcontroller

modalviewcontroller animation too fast?

I'm displaying a modal uiviewcontroller in the normal fashion: [self.navigationController presentModalViewController:self.lvc animated:YES]; //do stuff and later on... [self.navigationController dismissModalViewControllerAnimated:FALSE]; The problem is that //do stuff is too fast, and the dismiss call happens before the presentatio...

Communication between view controllers

Given the section of an application which has a UINavigationController and 2 levels of UITableViews (i.e. a row is selected on the root controller which pushes the second controller onto the navigation stack) I have the following questions: 1) There is a User object which is required by both controllers. What is the best way to communic...

Multiple UIViews, dealloc and retain

I have a small application for displaying several UIImageViews in a UIScroller in a similar fashion to the Photo app. I have a TableView which, when i select an item, parses an XML document of photos (added to an array) and adds a UIViewController which displays the images. The problem is I have a tab bar controller which, upon clickin...

presentModalViewController in landscape after portrait viewController

Hi, I have a main viewController that is in portrait mode all the time. I want then to presentModalViewController, but it will come from the left (not from bottom of the screen) in landscape. Is it possible? tnx ...

Iphone SDK selector or abstract class

Hi, I am developing a special type of view controller for an iPhone component library. I have got the who view controller working well, but I need to change it so that it works in one of two ways: Either it is an abstract class which you must subclass and provider the implementation for a specific method which the controller will call...

iPhone UIKit prevents custom view controller hierarchies?

Can anyone explain why it's not possible to create your own view controller hierarchies using UIKit on the iPhone? Let me explain: when creating applications using a complex view hierarchy and navigation logic, it's a good idea to have certain views controlled by a dedicated view controller. These controllers can have their own subcontr...

how to call xcode view controller from other view controler

hi expert, i have CameraViewController and WebViewController with their .h, .m, and .xib, once app execute, CameraViewController invoked, and its has two button, 1st to snap picture from camera, and 2nd button to view the web, how can implement a code, so when i press the 2nd button called the UIWebView in WebViewController.xib in its -...

Web-like tabs for the iPhone

What is the best approach to implement tabs that look like web applications on the iPhone, like the screenshot below (notice the "Checkin-Info-Friends" tabs)? These are not part of the UIKit standard library, but seems to be very common lately. I've spent considerable time developing applications for the iPhone, but not developing contr...

Managing UIView layers and moving a view between view hierarchies

I'm gussying up a Cocoa-Touch UI composed of basically two view hierarchies. Users need to drag objects from one (hierarchyA) INTO the other (hierarchyB). The problem I'm having is with the layering of these views, especially as they're being dragged. I don't know of a way to allow parts of hierarchyB be layered below a UIView from hiera...

How to switch views programatically

Hi, I've found many tutorials on switching views on the iPhone but none that quite match my needs. I wonder if you can help. I'm looking to have an initial view, A and on a button press unload A and switch to view B. I've seen the following, but I have reasons why I don't want to do it that way: Using a navigation controller - Once v...

How do I switch between views like home screen

How do I switch between multiple UIView's using one UIViewController just like the iPhone home screen. If you need clarification please ask, don't thumbs down please. ...

Rotate to landscape for views added to the hierarchy manually (iPhone)

I have a simple UIViewController that uses a XIB for its interface. As such, the interface simply comprises a UIView, a UIActivityIndicator and a UILabel. I have the sizing constraints in Interface Builder set to keep the activity indicator and the label centred when the view rotates. The UIViewController is set to return YES for portr...

UITabBarController tagging Tabs?

I have an app that uses various view controllers as tabs. I'm in the process of saving the custom tab order when the app shuts down. I'm trying to find a generic identifier for my various view controllers without having to add an attribute to each controller (which my backup plan). I would think, similar to UILabels, that maybe view con...

How to use UIScrollView to switch between UIViews

How would I build multiple UIViews with multiple subviews and switch between them using a UIScrollView? I would appreciate anyone who can upload some code. I am a complete noob withe the iPhone. ...

why viewWillAppear is not getting called?

I have 2 nibs, when i am loading one view from the other, the viewWillAppear method of the nib which i am trying to load should get called as far as i know(both view did load and view will appear, view did load will be called only once when nib is loading but view will apper should get called whenever view is getting loaded). But in my p...

iPhone SDK: problem managing orientation with multiple view controllers.

I'm trying to build an iPhone application that has two subviews in the main window. Each view has its own UIViewController subclass associated with it. Also, within each controller's implementation, I've added the following method: -(BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { ret...

NSURLConnection NSURLRequest proxy for asynchronous web service calls

I have multiple views which make the same NSURLRequest/NSURLConnection request. Ideally, in order to get some code reuse, I'd like to have some sort of a "proxy" which does all the underlying work of creating/executing the (asynchronous) request/connection, setting up all the delegate methods, etc., so I don't have to copy all those NSUR...

setting view's background image in iphone

Can I set an image for the view's own background image? I don't want to use UIImageView control. It seems not to be possible using IB. Do I have to do it programatically? Thank you. ...

Is it necessary to do preloading when using UIViewAnimationTransition (Cocoa Touch)

Hi Im using some transitions(Flip) to switch to my "settings/about" view in my iPhone app. I initiate the transition like this: SettingsAboutViewController *settingsView = [[SettingsAboutViewController alloc] init]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationTransition:UIViewAn...

Getting the name of a Controller

Hello! I have an iPhone application with a TabBarController. I can access the current ViewController with [appDelegate.myTabBarController selectedViewController] But how can I get the name of this controller? For example the name of the selected ViewController is "TestViewController". How can I get this string/name? I want to check ...