viewcontroller

Problem with Touch-Events after pushing ViewController

All touch-events are recogniced perfectly before I push my programmatically created ViewController. I think there is no connection between the new ViewController and my code. That's my code where i push the ViewController: UIViewController *detail = [[UIViewController alloc] init]; CGRect frame = CGRectMake(0, -44, 320, 411); UIView *g...

Help! Adding image to UIViewController Transition! :S

Hey Guys, I currently have several view controllers and transitions set up throughout my app using: ViewController2 *controller2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil]; controller2.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:controller2 animated:YES]...

IPHONE How to access variables from other classes/viewcontrollers

I have a app that uses several view controllers. In one instance I need to uses an int (int lives) in a seperate view controller from where it is created. I have tried using it and it throws and error at build claiming "lives" undeclared. I am already importing the view controller where the int was declared. I am stuck on this one. I w...

view based application - viewcontroller retainCount after [window addSubview:viewController.view];

Hi, i have an view based application and when i checked if the dealloc method was workin, i saw that doesnt...debug and debug, then using retainCount, i discover that my viewcontroller retaincount gets crazy on the program start...its easy to reproduce.... just start a new view based application template, and in the didFinishLaunchingWi...

View controller calling a modal view

How can I reliably determine the name of the view controller that called a modal view from within that modal view? The app has a singleton so I was planning to add a view controller there and save the name of the calling view controller. .parentController gives me the name of the nav controller. EDIT I tried a sample project and it did...

UINavigationController crashing App when using setViewControllers

Hello everyone, I have a strange problem with the UINavigationController. I wrote an App to display data in three levels. (RootView: Select Data I, Second View: Select Data II, Third View: Display Data). This works great, no problems. The problem appears when a PushMessage arrives: In this case I'm trying to create a viewController St...

iPhone SDK: switching views navigationcontroller

Hi everyone, my first question here so be gentle :) I am trying to use a navigationController to switch views. I got the following down: I got a MainView controller which switches to different view controllers using this code: UIButton *buttonPressed = (UIButton *)sender; switch (buttonPressed.tag) { case 1: viewContro...

MainWindow.xib is just a black screen.

Hello, I'm trying to test the following code : http://github.com/mobilemelting/nvpolyline. When I run the app, all I get is a black screen. There are only two View Controllers, MainWindow.xib and NVMapViewController.xib. See my settings for MainWindow.xib in the attached image. What am I missing ? Regards, Stephen ...

Passing a float between multiple viewcontrollers

Hi Im using tabs to switch between two view controllers. How do I retrieve a float in the secondviewcontroller, thats been initiated in the firstviewcontroller? should i make some sort of global variable? Where and how do I do this? Thanks guys :) ...

How unload a ViewController class when switch to other view

Hi Everyone, How can i unload a viewController class when i switch to another view, so the class file won't run in the background anymore? Thanks for help! ...

iPhone / Objective C - Communication between ViewController / best way to implement?

Hi, I'm doing a iPhone app. I created my own SwitchViewController Class (linked to the App-Delegate) which actually just changes the various other Views / ViewControllers (e.g ViewA, ViewB) while the app is running. When I know recieve a tap-gesture in the ViewController-A I would like to trigger a method (eg. switchViews:(id)sender) ...

How to populate 3 text fields with 3 different ViewController?

Hi I have the following situation: 1) On the main ViewController, I have 3 UITextFields. The user can fill them with keyboard or choose values from 3 ViewsController, which have a Picker to choose from values; 2) Now, I can declare 3 NSString in the main View Controller (obviously with @property(retain, nonatomic) so that they are to ...

How to Unload a TabBar View when New TabBar view is loaded?

Hi, I am playing an audio file in a viewcontroller inside an UITabBar using AVAudioPlayer. So when user clicks a different tabbar item the music is not stopped. I tried adding stop method in viewwilldisappear. But it's not responding. How can I stop my audio when user clicks a new tab bar item. ente AVAudioPlayer *audioPlayer; This i...

UISearchBar is hidding in ipad where as in iphone it is working properly.

I have designed an application for iphone/ipad.My problem is that I am using single RootViewController for showing Category and Subcategory. //Pop me to RootViewController Category Section From SubCategory in iphone/ipad [self.navigationController popViewControllerAnimated: YES]; But in ipad my searchbar get hidden under the navigation...

fill color on imageview

Hello there.. I have taken a view and inserted scrollview on it using nib. Then I've added an image using imageview dynamically..Now what should I do to fill color on that image. ...

ViewController variable release

I added a timer in a VC and when I call the delegate to change the view to another VC I found that the timer is still counting which didnt released as expected - (void)goTitle { NSLog(@"go title"); IPAD03ViewController *vc = [[IPAD03ViewController alloc] initWithNibName:@"IPAD03ViewController" bundle:nil]; [viewController.view removeFr...

How to share data globally among multiple view controllers

Hi all.... can anybody help me out please... i have a huge object in a model. i made it as a single ton class and returning the object wn other calls.but the object is very big thats y the app is crasing. with out returning how to share the data globally and when to alloc the object and where to dealloc the object. i dont need all the...

Everytime Camera dismiss, Viewdidload got called

it happens only on the 3GS, 4 or 3G is OK. seems like viewcontroller got called everytime camera dismissed. any thoughts on that? It's Iphone, the system calls viewdidunload my view of viewcontroller when I did a [self presentModalViewController:picker1 animated:YES]; I don't want the system to dismiss my view. I did a [self.view...