uiviewcontroller

releasing View Controller which are in Dictionary - in objective c

Hello ! Every on here. I was just confusing a little bit for the following issue. I have coding in my project as follow. I am adding view controllers' view to the each cell of table view. let me explain how... An array, like these NSMutableArray *arrTbl=[[NSMutableArray alloc] init]; NSMutableDictionary *dOne=[[NSMutableDictionary a...

Subclass of UIViewController initialising itself from a .xib can't use UINavigationItem?

Hi all, I've finally had to give up the relentless search for an answer to this question, as I just can't find anyone that's asked it before! So hope someone can provide some insight. I'll start by explaining what I can do, then compare that with what I can't figure out how to do. Suppose I have a custom VC called RootViewController. I...

All the app in iphone appear in a "grid icon" layout, how can I achieve that layout?

when u first open up iphone, all the app are layout in a "grid icon" type. And if u have too many app, the user swipe to the right, and the new view come out, with again all the app appear in a "grid icon" layout. Can u guys point me to where I can achieve such a design. Code would be very appreciated !!! I did try something and here is ...

iPhone UIPickerView in UIViewController

I have a xib in which I have added a UIViewController named delta. The view under delta is controlled by the delta viewcontroller, not the file owner. On the delta view, I have a UIViewPicker. My issue is that I am programming in the UIPickerView in the deltaviewcontroller and I'm issuing deltaviewcontroller as the delegate and data sour...

Accessing parentViewController's variables

I want to allow a pushed to set parentViewController's instance variables. For instance, VC1 (the parent) has a bunch of textfields and what not which are filled from VC2 (the child). VC2 is pushed onto the stack by VC1. I've tried doing like parentViewController.myString = "foo"; however since parentViewController is a UIViewController,...

How many UINavigationController objects in a single iPhone application?

I think one of my design problems is that I keep creating navigation objects when I should only have one UINavigationController and a delegate. Is that correct? I not as concerned from a style-preference, but the answer I am looking for is more about the a technical perspective and managing the navigation among several view controllers...

Draggable UIView

I have 4 UIViews inside of a main view controller view. All I need to be able to do is drag the views around the "screen". Is UIScrollView the best option for this, or is there a simpler way? ...

UIViewController created with initWithNibName: bundle: or via an IBOutlet behave differently

I found a strange behavior, and would like to be explained what assertion I am making that is wrong. In an AppDelegate class of a freshly created WindowBased project, I am adding a UIViewController to the window. I can do it two different ways: - with an IBOutlet. In IB, I simply instanced an UIViewController, set its class to TestView...

Properly sizing view in -loadView

I'm having a problem getting my view to be sized properly when created via -loadView. It seems that my view frame is always (0, 0, 320, 460), even when the view/controller is nested inside a UINavigationController and/or UITabBarController. Is there a way to detect programmatically when my view controller is nested within these items, ...

HTML-like layout in iPhone application

How do I make a resolution-independent iPhone view controller that can stack it's subviews like the browser stacks HTML elements? Here's an example. One UILabel at the top that could contain 1-6 lines of text; two UIButtons in a row right below the label; the left button could have a short or long title. I want the buttons to appear at...

How to reference a subview without outlet

Just beginning with iPhone development i seem to miss something fundamental. In a View based application i'm adding programaticaly a UIView subclass in the ViewController implementation file and can set a value: - (void)viewDidLoad { [super viewDidLoad]; CGRect myRect = CGRectMake(20, 50, 250, 320); GraphView *graphView = [[Gr...

iPhone: Attempt to Switch Views Produces EXC_BAD_ACCESS on the Third Switch Only

Hello users, I have implemented an app that shows a map with a lot of pins on it. If you push one pin you get on a second view that shows the data behind the pin. A button takes you back to the map. My problem is that by the third touch on a pin the program crashes with a EXC_BAD_ACCESS in this method: - (void) switchViews { if...

AppDelegate: Get value from ViewController?

I would like to get at - (void)applicationWillTerminate:(UIApplication *)application a variable from a view controller class. I have build an tabbar application and only added the tabbar controller to the appdelegate. [window addSubview:tabBarController.view]; How can i get an variable from the TestViewController: #import <UIKit/...

popToRootViewController crashing

Hi I am a relatively new iPhone app developer so my knowledge is a little sketchy, so please forgive me if this is a bit of a trivial question. I have a navigation app which drills between table views by calling pushViewController on the navigationController object I have one particular section which pushes new view controllers sequen...

Make UISearchBar first responder when View Loads

I have a simple UIViewController and a UISearchBar, when the view loads I want to have the search bar become the first responder right away so that the keyboard is showing and they can start typing their query right away. I tried doing it in viewWillAppear like below without any luck: - (void)viewWillAppear:(BOOL)animated { [product...

UINavigationController right usage

I've implemented UINavigationController in my iphone application as main navigation interface. When I need to add some new xib to my UINavigationController stack I have to write new method like this (example for ContactsView.xib): - (void) switchToContactsView { // lazy load if (self.contactsViewController == nil) { Con...

UIView, UIScrollView and UITextFields problem calling Method

I have a view with several embedded UITextFields, this UIView is subordinated to a UIScrollView in IB. Each text field is supposed to invoke a method called updateText defined in the viewcontroller implementation file when the user is done editing the field. For some reason, the method updateText never gets invoked. Anyone have any id...

How to create layer that floats above the tabbarcontroller on the iphone.

'lo all. I am in the ending portion of my app for the iPhone and found that I am in a section of the app where I want to give feedback about the status of some background process running (location manager accuracy) and want to place it in the lower left of the screen. This can tell a user how "sure" we are about the given search resu...

How do I add a UINavigationController to a view in code?

view1 = [[View1 alloc] init]; //Create the first view UINavigationController *navigationController1 = [[UINavigationController alloc] initWithRootViewController:view1]; navigationController1.navigationBar.tintColor =[UIColor blackColor]; View1 is inherit from UIViewController. So I create a *view1, then I create a UINavigationControl...

Having problem with pushViewController!! Help

tabBarController = [[UITabBarController alloc] init]; //Create a tab bar view1 = [[View1 alloc] init]; //Create the first view UINavigationController *navigationController1 = [[UINavigationController alloc] initWithRootViewController:view1]; navigationController1.navigationBar.tintColor =[UIColor blackColor]; view2 = [[View2 alloc]...