uiviewcontroller

viewDidAppear: called twice on modal view controller presented during startup

Resolution: While trying to recreate this bug in a fresh project to submit to Apple, I discovered that it is specific to iPhone OS 2.1, and compiling for 2.2 fixes the problem. Stephen, thanks for your help; I'll be accepting your answer since it would have worked if the bug still existed or I wasn't willing to compile for 2.2. I hav...

iPhone how to create a full screen app?

Hi, I've been trying to create a full screen view. I plan on using core graphics for rendering. I am new to iPhone development so please forgive this basic question. Here's my setup code; - (void)loadView { CGRect rect = [[UIScreen mainScreen] bounds]; GameView *main_view; main_view = [[GameView alloc] initWithFrame:rect ...

Checking if a UIViewController is about to get Popped from a navigation stack?

Hey guys, I need to know when my view controller is about to get popped from a nav stack so I can perform an action. I can't use -viewWillDisappear, because that gets called when the view controller is moved off screen for ANY reason (like a new view controller being popped on top). I specifically need to know when the controller is a...

How do I override the "view" property in UIViewController?

I have a custom UIViewController and custom UIView. I'd like to override the viewcontroller.view property to return MyCustomUIView. Right now I have: @interface MyViewController : UIViewController { IBOutlet MyView* view; } @property (nonatomic, retain) IBOutlet MyView* view; This compiles but I get a warning: property 'vi...

UINavigationController with UITableView and UIView

I want to be able to switch between a UITableView and a standard UIView in a Parent View. Basically I have a UITableView that shows on load displaying a log of information. I want to have a segment control in the header of the Window that when the user taps, transitions to a Graph View which is a standard UIView. The UIViewController in...

iPhone UIImagePickerController didFinishPickingImage: UIImage transfer between view controllers?

Hello, In my app, I have a UIImagePickerController. When a image is selected, my view controller needs to get the image and pass it to another view controller, which is pushed onto self.navigationController. But I am always getting SEGFAULTS or nil arguments, and things like that. I would appreciate it if you could tell me what is wrong ...

Multiple View Controllers, am I screwed ?

When I first started this iPhone app, I was still a beginner so I was taking code from samples. I have 4 Views (UIView) with 4 View Controllers (UiViewContorllers). They all sit on the same level in Interface Builder. UiViewA is the main Menu, and it has buttons that when pressed loads ViewB,C,D via addSubView:ViewB(c/d/etc) . I am run...

self.tabBarItem.title not working?

Hello, In my iPhone application, I have a tab bar. This tab bar holds a UINavigationController. I have: In Interface Builder set the tab item title to 'Create New' In the UINavigation controller I have self.tabBarItem.title = 'Create New'; and self.title = 'Create New'; In the UIViewController pushed onto the controller: self.tabBarIte...

Interesting articles about UIViewController ?

Hello, Do you know some documentation about the UIViewController management ? I am thinking about : how release is done, what happens to subviews manually allocated, best way to release it, release when mempry warning, ... Thanks for all your help. I found this article : http://furbo.org/2008/08/27/dealing-with-memory-loss-the-cleanu...

How to programatically launch/dispose of views for the iPhone?

I am not using a tab bar or any other control -- I want to basically change the current view to a different view controller dynamically (i.e. via code). I'm not using Interface Builder at all... For example, let's say we create three view controllers: (this may not be the best example, but I'm trying to make it simplistic) View_Hello...

getting a view controller to disappear

I'm trying out a multiple view application, but I can't seem to get the first view controller to go away when I bring in the new view controller. I'm laying the second (coming) view controller at index 0, and it's just placing it in the background. I thought the [going.view removeFromSuperview] would remove the original viewcontroller...

iPhone landscape-only app view axis confusion

Using the information here: iPhone Landscape-Only Utility-Template Application I am able to launch, use and maintain my view as landscape only. However, I am confused about the axis. The absolute axis behaves as expected, meaning (0,0) is the top left, (240,0) is the top center, (0,320) is the bottom left corner, etc. However, when I ...

UIViewControllers and UIViews... how to architect a simple app

I'm a bit confused about how many controllers I need, and when I can load in UIViews into the same controller, versus having two controllers for two separate UIViews. Here's my current situation. I have a simple app that takes in information on the beginning screen, and then based on the info from the user (via a UIPicker and a text...

Accessing Views created in Interface Builder

I've created a ChildViewController class, and then a nib that uses that class. Then I created a BaseView, that includes some buttons, and some text that I'll be changing programmatically. Then I created two more views (Boy and Girl), that I want to be able to lay behind the baseview so that the background color is different along w...

tabBarController and navigationControllers in landscape mode, episode II

I have a UITabBarController, and each tab handles a different UIViewController that pushes on the stack new controllers as needed. In two of these tabs I need, when a specific controller is reached, the ability to rotate the iPhone and visualize a view in landscape mode. After struggling a lot I have found that it is mandatory subclassin...

subview running but not showing

From withing a UIViewController that is tied to a UIView (drawn in a nib file), i try to add another view, as a subview to the first view. In case you are confused: UIViewController -> UIView + GraphView (extends UIView) So i am saying: GraphView *myGraphView = [[GraphView alloc] init]; graphView = myGraphView; [self.view addSubview:g...

Locating the UIView that UITableView scrolls over

Hi all, I'm working on trying to obtain the UIView that UITableView scrolls over, if scrolling is enabled. Typically, the background is white, and if you push the UITableView out of its bounds, you'll see a background. I'm trying to set this background to a UIColor of blackColor. I can't seem to find the appropriate one to tag. I've tri...

iPhone - UIToolbar disappears in previous view on popping

Hi I am using a navbar and toolbar in my application. One of the screens uses transparent toolbar and navbar which show when the user taps the screen. Everything works great except when I do a popViewController from this view controller. The toolbar in my previous vc is no longer visible (I can see it if only for a second when the vc i...

iPhone SDK - navController pushViewController - not responding..

I have a view that has a navigationController with two buttons, START (essentially a login button) and SETTINGS. When I click SETTINGS, the settings view appears and dismisses as planned. I can click on settings and then click back many times without anything crashing. Good. Now, when a user clicks START, I call the SHOWLOGOFFBUTTONS me...

Loading a view controller & view hierarchy programatically in Cocoa Touch without xib

It seems like all of the Cocoa Touch templates are set up to load a nib. If I want to start a new project that's going to use a view controller, and load its view(hierarchy) programatically, not from a nib/xib, what are the steps to setting that up or adjusting a template. I though all I had to do was implement -loadView, but I have t...