uiviewcontroller

with "viewDidLoad" my viewController take much time to appear!

hi, when i load my viewController i used "viewDidLoad"method to init my view ,but this take much time to make the view appeared .So i had the idea to use "viewDidAppear" method to accelerate the appearance of my view but the load of the informations about my view are now loaded to the memory every time that i push my view (which is norma...

UIViewController with background image

Hi all! How can I insert into my UIViewController an image from the resources as background image? thanks in advance! ...

delegate method throws runtime "unrecognized selector" error when switching back from one UIViewController to the main View Controller

Ok, I've spend like half day on this and it's killing me. So I've got 3 view controllers transitioning from one another, something like this: I call the UploadDecisionViewController after destroying the previous View Controller: [self dismissModalViewControllerAnimated:YES]; [self performSelector:@selector(showUDModalView) withObject:...

MFMailComposeController crashing non-deterministically

Hello, I've been struggling with this issue for a few days. I am trying to use the MFMailComposeController to send emails. What's happening is that the program crashes (long stack-trace below) upon clicking the SEND button. However, this is non-deterministic - sometimes it works immediately, sometimes after a long delay, and most often, ...

Draw a line over UIViewController

Hi all, I have my app on iPhone with a UIViewController with some stuff inside.. image, textbox, etc... is there a way to draw a line or something like this using opengl directly inside the UIViewController? thanks in advance ...

Interface Builder: Resize View From NIB

I have a custom UIViewController and a corresponding view in a nib file. The view is added to the UIWindow directly. [window addSubview:customViewController.view]; Sizes of the window and the view are default (480x320 and 460x320 correspondingly). When I create CustomViewController inside the nib file and check "Resize View From NIB"...

UIViewController: where can I put custom initialization

Hello. I'm very new on iPhone development. I wondering where to put some custom initialization of an instance variables for my UIViewController. Can I use initWithNibName:bundle:? Thanks. ...

How to access data from one view to another view?

I have an UITabBarController with two tabs: UINavigationController OptionsViewController : UIViewController How can I reach data (ie. UILabel.text) set in OptionsViewController, in a new added modal View which has been invoked from UINavigationController? Edit1: Scenario: After launching app I select the second tab bar called "Opt...

TableView frame not resizing properly when pushing a new view controller and the keyboard is hiding

Hi, I must be missing something fundamental here. I have a UITableView inside of a NavigationViewController. When a table row is selected in the UITableView (using tableView:didSelectRowAtIndexPath:) I call pushViewController to display a different view controller. The new view controller appears correctly, but when I pop that view cont...

Why doesn't my UIViewController class keep track of an NSArray instance variable.

Hey, I am new to Objective-C 2.0 and Xcode, so forgive me if I am missing something elementary here. Anyways, I am trying to make my own UIViewController class called GameView to display a new view. To work the game I need to keep track of an NSArray that I want to load from a plist file. I have made a method 'loadGame' which I want to l...

Adding UIViewController.view to another view causes orientation problems

Short version: I'm alloc/init/retaining a new UIViewController in one UIViewControllers viewDidLoad method, adding the new View to self.view. This usually works, but it seems to mess up orientation change handling of my iPad app. Longer version: I'm building a fairly complex iPad application, involving a lot of views and viewcontrollers...

iPhone. How to get the rect of parent view?

Hi, My application creates two views: topView (CGRect = 0,0, 320,60) bottomView (CGRect = 0,60, 320,480) Bottom view creates UITabBarController with UIViewControllers: ListViewController etc... ListViewController has own views that are created in viewDidLoad method: background = [[UIImageView alloc] initWithFrame: rect ]; So...

Communicating between classes set up in nib, in code?

A beginner's question: If, in your nib, you have the File's Owner linked to the ViewController class, and you also have a NSObject-derived class, how do you communicate between the ViewController class and the NSObject class within code? For instance, suppose ScientificCalculatorView.xib looks like this File's Owner (class: Scientifi...

UIViewController remove subview

Hi all! I add a view as subview of my uiviewcontroller like this: // into my ViewController: UIImageView *imView =[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"img.jpg"]]; imView.frame = CGRectMake(2, 46, 1020, 720); [self.view addSubview:imView]; now, with another button I wish remove the imView from the subview chain.. ho...

Better ways to create various kind of View Controllers on iPhone?

The thing is this: when we program for an iPhone app, we can add some more classes for those view controllers and such. But honestly, debugging and compiling these kind of programs get old real fast. Sure, we have the iPhone simulator, but sometimes, you just have to change some tiny things and you have to compile again. This is tedious....

When do you need to use a view controller?

I'm diving into iPhone development and one of the core concepts im trying to get my head around is view controllers. If you look at the GLPaint example on the apple dev site, you'll see a project that has... An app delegate class A uiwindow subclass And a uiview subclass And the uiview subclass implements all the core graphics paint...

How to update my UIViewController to current orientation when use pushViewController?

i have use this code but it is Private API ,apple also reject! [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; if i rotate my device in Landscape then open my Application it will present as Portrait mode, i need to rotate my device to another orientation then it will update. how to update it to correct...

UITableView in a View controller by a UIViewController and not a UITableView

Hi all, I have a View with lots of things inside it including buttons, a scroll view and a tableView (ipad app). I am controller this view with a viewController subclass but I don't know how to manage my tableView. I don't know where put the methods : - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexP...

MKMapView Annotation Callout Button to DetailView?

Hi, I have annotations in a MKMapView with Callouts. In this Callouts there's a "Right-Arrow" Button. When clicking on it, I want to open a Detail View, an extra UIViewController with its own nib file etc. I use following code: In my MapViewController: - (void)showDetails:(id)sender { // the detail view does not want a toolbar so...

Passing NULL value

Hi. I use an instance of NSXMLParser. I store found chars in NSMutableStrings that are stored in an NSMutableDictionary and these Dicts are then added to an NSMutableArray. When I test this everything seems normal: I count 1 array, x dictionnaries and x strings. In a detailview controller file I want to show my parsed results. I call t...