uiviewcontroller

How Can I Create a Nib with an asociated View Class that can be used by Multiple ViewControllers

I'm opening a new question to followup on my last one (http://stackoverflow.com/questions/2064513/superview-and-parentviewcontroller-nil-after-adding-a-subview). Basically I get that using subviews is a good idea, but that I shouldn't have a ViewController controlling a subview that lives inside another ViewController. Basically I'd like...

what is the difference between self.navigationController and Delegate.navigationController

i can use MyFirstAppDelegate * Delegate = (MyFirstAppDelegate *)[[UIApplication sharedApplication] delegate]; [Delegate.navigationController popViewControllerAnimated:YES]; or [self.navigationController popViewControllerAnimated:YES]; So what is the difference between both ? Please answer me ...... Thanks in advance.. ...

IBOutlet keyword strictly required?

Hello there, I am pretty new to iphone programming therefore I apologize if my question could result trivial or obscure. In many examples and tutorials I have seen that in the declaration of the outlets within Xcode (interface section of the view controller) the keyword "IBOutlet" is used or it is not, in conjunction with the class the...

How do I name a file differently everytime I allocate it?

The Code: // Inside my BoardsViewController.m - (void)createImage { imageCounter ++; board = [[Boards alloc] init]; [self.view addSubview:board]; [board release]; board is supposed to be changed everytime, and is instead of being named board: be named 1_board, 2_board, 3_board, everytime I call this method ...

How do I create UIViewController using Xib-file?

Sorry if this question has already been answered but I can't find an answer. I'm creating an app in which I have an UITableViewController and when the accessorybutton in the right side of a cell is selected a new instance of a UIViewController should be created containing the interface found in a .xib-file. The new UIViewController will...

iPhone: ViewController as a tab bar

Hey guys I need some help with this: I have two view controllers, let's say: FirstViewController (first) is inside a navigationviewcontroller SecondViewController (second) So in the first's viewDidLoad method I have this: SecondViewController *second = [[SecondViewController alloc] initWithNibName:...]; [self.addsubview:second.vie...

How to assign managedObjectContext to a dynamic viewController???

I have 4 buttons on main screen, each one sends me to a viewController. The third one, sends me to a view on which I wanna set the managedObjectContext. If I use the class name to create an instance, it's all right. But I'm looking for a way to use just one method that uses an array to retrieve the name of the Class for the needed viewCo...

Supress visible screen switching on iPhone

In the iPhone application I'm developing, I have a need to return the user to the previous screen they were using when, for instance, the application was interrupted by, say, a phone call. The application is driven by a navigation controller, and the user may be several layers deep into the application. As such, I think that I need to ...

iphone autorotation black background

I use OpenGLView to display content of my app but sometimes I have to display UIActionSheet. My application works on both - landscape and portrait mode - but since it's OpenGL view I handle rotation of the view by myself so to display UIActionSheet I use empty view and add actionsheet to it. the problem is that when I use shouldAutorotat...

XCode iPhone: hiding UIToolbar in parent UIViewController from child UIScrollView

I have a project similar to Apple's PageControl example. I have a UIViewController "PhotoViewController" which contains a UIScrollView and a UIToolbar. The UIScrollView loads another XIB and UIViewController "PhotoScrollViewController". In PhotoScrollViewController, I have a UIButton which displays an image. I have an IBAction on thi...

presentModalViewController and still view UITabbarcontroller

I have a UIViewController (aViewController) added to a UINavigationController which in turn is added to a UITabBarController. I then use [self.navigationController presentModalViewController:animated] within aViewController to present a new view controller (bViewController). However bViewController is always displayed full screen, thu...

ViewController has wrong orientation after Landscape-only has been popped

In a navigation-based app, LandscapeViewController only supports landscape mode (all others support both modes). I also have a "loading screen" that advises the user to rotate the phone before continuing. This way I can make sure that when my landscape view loads, that it's in landscape mode. The problem comes when i rotate the phone to...

Load a tabBarController from a UIButton in a subview

I am working on an app where i have a view controller that contains a view in that view i have a button that when pressed i would like it to load my tabViewController. I trying to get a splash screen to load before my app so i can do some downloading and parsing of data before i load my tabViewController because the data im putting the ...

iPhone presentModalViewController touch works on a small part of the view

Hi, I have a small imageview that is above my main view (it's 50 high)and when i touch it i use presentModalViewController to push a newView controller. The problem is that when the view controller is presented i can see the entire view, but touches works only on the same frame as the imageview. Wich means that when i tap on the naviga...

load animationImage from a table view Controller

I use a UITableViewController to display a list of items, and one of the items selection must lead to a photo gallery created with animationImages. I usually declare the controllers associated to the first level selection with something like : MyController *myController = [[MyController alloc] initWithStyle:UITableViewStylePlain]; m...

dismissModalViewControllerAnimated function not dismissing the view

Hello my code posted below is not dismissing my view no matter what i try. You can see my attempts to release the view in the hide splash function at the bottom. Please if anyone can help it would be greatly appreciated. Thanks in Advance -- Zen // // SplashViewController.m // Splash // #import "SplashViewController.h" @implementa...

How to add a UIViewController view on UIScrollView

Hi All. I have a small problem in loading the UIViewController on scroll view. In my application, I am using 4 tab buttons at the bottom. One of which contains a scroll view, as number of fields in that view are more. One of the field is for accepting the date from the user. When I am adding this Date Picker View(UIViewController) on ...

iphone reload table data

I am trying to update a list in a tableview controller. In viewWillAppear in that particular tableview controller, the tableView is setup with the code: [self.tableView reloadData]; I am trying to do this refresh from an other Class (DetailViewController), which refers to another view controller. In a method in DetailViewController I ...

toolbarItems not being pushed with view

I have a NavigationController based iPhone app that has a navigationBar and a toolbar. Here is basically how it works: The applicationDelegate pushes a "SplashScreen" onto the RootViewController as a modal view. While the splash screen is up, the application does some work and based on the user's location will either just dismiss the mo...

weird error when popToRootViewController

Hi, I have an Navigation-based app where i navigate trough some viewcontroller's. At this moment I have 2 viewcontrollers. In the second viewcontroller, i have a condition that if it's true i pop to the first viewcontroller with popToRooViewController. When I do this the app return's to the rootController but in debugger console appears ...