uiviewcontroller

MFMailComposeViewController is not interactive

I'm using the following code in two view controllers; one, where it is triggered by pressing a button, and another, where it is triggered by tapping a table cell. In the first, it works fine. In the second, triggered by the table-cell tap, the mail composer appears, with the fields correctly filled out, but the cursor and keyboard do n...

Implementing a main menu for iPhone game - how to get back to the Main Menu ?

Hi all, Apologies for the long post and I hope it makes some sense to someone out there. I have written an iPhone game (in Quartz 2d) which uses the following structure : App delegate loads a view controller called gameviewcontroller and its associated view In the "View did load" method, the gameviewcontroller starts up and initiates...

UIView being retained

Hi, I'm having real problems tracking down why my UIView isn't deallocing. I have a UIViewController with several UIViews, all of which are IBOutlet properties that retain. I'm sure to release the UIView in the dealloc method of the UIViewController. However the dealloc of my UIView is never called. I have no idea what else has reta...

UIView to cover iPhone status/carrier bar

I am attempting to create a UIView (and associated UIViewController) which mimic the behaviour of UIAlertView. Given my requirements it seemed much neater to create my own implementation from scratch than attempt to subclass and modify UIAlertView. In order to do this I am getting a reference to the app delegate and then adding the UIVie...

MFMailViewController Not Working.

Hi, I have a View Based application and I have added a UITableView in the view with navigation bar and tab bar. But now when I try to add the MFMailViewController on the same view when there is no table or tab bar it does not work at all. I am using the following the code to add MFMailViewController MFMailComposeViewController *mai...

If I have a UIViewController in a UIScrollView how can I programmatically make the UIScrollview zoomToRect?

I have a scrollview that has a page control. The scrollview contains 3 views. Each view contains a view controller. In one of my view controllers I press a button and I want the scrollview to scroll to a specific location. But Im not sure how to accomplish that since the button is not in the UIScrollview but in one of the view controller...

using a viewController to open another instance of the same viewController

I have a MasterViewController.h.m.xib (UIViewController) that is opening a TestDummy.h.m.xib (UIViewController) in the following way: TestDummy *controller = [[TestDummy alloc] initWithNibName:@"TestDummy" bundle:nil]; [scrollView addSubview:controller.view]; I have two buttons in TestDummy: (Open), (Close) and one label: (windowDepth...

How to jump among UIViewControllers?

A upcoming iPhone app will comes with about 20 UIViewControllers which does not have any hierarchical relationship among them. Potentially any UIViewController can/will jump to another UIViewController. What is the best way to handle the switching among UIViewControllers for this app? Thanks! ...

UINavigationController Problem

In a view Controller I am adding a UINavigationController and it has around 20-30 pixels on top of it. It doesnt fit the navigationCOntroller properly. For soem reason it adds the subview 20-30 px below navController = [[UINavigationController alloc] init]; navController.navigationBar.tintColor = [UIColor grayColor]; UnitViewController ...

What is the best way to load a custom UIView?

In my iPhone app, I made a custom UIView that I use in several different view controllers to display some information. I'm familiar with making customer table cells for use in a table but I've never made a custom view again. My question is what is the best way to load this view? I've tried simply placing the view in the view controlle...

UINavigationController

I am very new to iPhone Programming, so this question may seem a little silly... I am developing an app which is a UIViewController Based application. so when you run the app a Main View will be shown which is a Full Screen View and is actually my Main Menu Window. i have a few menus inside. when i click any of these menus, i will load ...

Forcing a view to unload when another tabButton is hit. (iPhone)

My iPhone app has a tabBar at the bottom. The 5th tab is rarely used... but pretty memory-intensive... so I want to make it UNLOAD each time it is exited (by the user clicking on a different tab). But how? I thought I just needed to call "[self viewDidUnload]" but that doesn't seem to do it. Where is the "forceThisViewToUnloa...

How to add a NavigationViewController to a project created using the ViewController Template

I have created a new application using the View Based Application Template in xCode. My first view, which displays on loading the app, is a button based menu. One of the buttons (Make) should load a new navigation stack using a NavigationViewController. There are other buttons that when implemented will do other things outside of Navig...

How to implement a custom protocol

In this part of my code I get a warning message saying it doesn't implement the custom protocol I made. detailViewController.delegate = self; How do I implement the protocol? Then when I run the program it crashes saying '-[DetailViewController setDelegate:]: unrecognized selector sent to instance 0x6a1c450' ...

access methods and variables in first navigation controller from pushed view

Hi guys, I normally use UIViews to make my apps - but this one I am using a navigationcontroller. I am pushing a view to the top where I want to add items to an array. However, I cannot access the main navigation controller methods etc. Here's the set up 1) AppDelegate adds navigation controller [window addSubview:navigationController...

Subclass UIView or UIViewController

I want to make a "section" which has an image and some text below it. Should I be subclassing UIView or UIViewController? I'm thinking UIView as it won't know what image or what text to display, just that there will be both. Also if it is UIView, what method do I add the subviews (UIImageView and UILabel) in as subviews? Or should I dra...

Why do UIViewControllers have xib files and UIViews do not?

When I create a new UIViewController in xcode, it offers to make me an associated nib for the interface. However, when I create a UIView, it does not. If my understanding of MVC is correct, views should really be the parts that contain the interface elements (i.e. the nib) while view controllers are the parts that hook the functionality ...

Best Design Practices if there are more than one views in an Application

Hey champs, This question is for iPad apps designing. I searched a lot on this very useful site but i didn't find anything related to the question. Suppose my application needs to present multiple views to the user, then what is the best way to do that. The ways i think that are possible are 1) Use only one view controller and add all...

touchesBegan Event Stops Firing After a Lot of Scrolling

I have a series of UITableViews displayed in a horizontal ScrollView. Inside each tableview, each TableViewCell consists of 2 thumbnail tiles which represent a detail view. I am using touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event to catch when one of the tiles has been tapped. From there, I am pushing a detail view onto the Na...

Dismiss / Present Modal View Controller - Memory ?

Hi all, When you dismiss a modal view controller is that view controller object destroyed ? Also if you represent the same view controller again does it load from fresh - e.g is the "view did load" and "init" method called ? ...