uiviewcontroller

How can I handle custom events in iOS development?

We're working on a project using some custom views. We have the following hierarchy: UIViewController -> UIScrollView (custom subclass) -> UIView (custom subclass) We are presenting a grid of buttons that are dynamically generated. When a user taps one of the UIViews that belong to the custom scroll view we fire a method that looks lik...

iphone opengl backing becomes w=0 h=0 after MFMessageComposeViewController

I have an opengl game for iPhone/iPad (universal). I added the ability to send an SMS message using MFMessageComposeViewController. Testing in a real iPhone. The SMS composer sheet animates up over my view, I can send the message or not, didFinishWithResult gets called, and when I [self dismissModalViewControllerAnimated:YES] it goes aw...

Views, View Controllers, Windows.. Huh?

Starting from the base OpenGL ES iPhone project in XCode, I am creating an app which is nearly completed. What I don't understand is the use of views, view controllers, and windows which I apparently need to implement to use iAds (for the iPhone) and AdMob (for the iPad). I was able to follow the AdMob tutorial using the Interface Buil...

reloadData for a Table View in a View Controller

Hello I have a view controller that loads from an xib i created. It has two toolbars and a table view in that. I add this too the header file in the ViewController @interface FilterViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { When I do [self.tableView reloadData] It does throws up an error ...

Can a UIViewController conform to a UIScrollViewDelegate and then lead to the next view where there are pages to be scrolled ?

Hello all, I am trying to develop a program wherein which the first screen contains a button and after the click of the button, it should take me to a scroll view and a page control. I have successfully developed these two modules separately. But I am facing problems in integrating them. The first module lets me click and takes me to my...

EXC_BAD_ACCESS in [window addSubview:viewcontroller.view]

Hi I have two universal applications... one is giving me an EXC_BAD_ACCESS error when i do this in the app delegate: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. ScrollViewController *vc = [[ScrollViewCon...

Rotation of NIBs

I've been digging at this for a few days and can't seem to figure it out. My app launches in landscape and supports only landscape orientations. Works fine. My app delegate instantiates a root view controller, view is built from an XIB and populated with an image in viewDidLoad. The underlying image is landscape size (1024x768). Looks ...

iPad page sheet rendered with no background (bug?)

Hi, In my iPad app, I am presenting a modal view controller with the UIModalPresentationPageSheet style. Today, randomly, when I presented the modal view controller, the page sheet was rendered without the white background, leaving just the shadow: I have not made any changes to the view controller that is being presented, or the vie...

viewWillAppear in viewcontrollers of a tabbar

Hi guys, In my tab-bar I have four viewcontrollers, and what happens in one can affect the view of the other, so I may need to reload some elements in the viewcontroller when it becomes visible. Normally I'd fix that by implementing viewWillAppear, but when I switch between the tabs, viewWillAppear does not seem to get called. How can I...

Proper way to Add a TableView to an iOS project's view Hierarchy?

We have a simple view based application we're building for the iPad. We're doing a custom UI so everything is being done programmatically. At the moment our view heirarchy looks something like this: UIViewController -> UITableViewController -> TableView We want to transition to the UITableViewController's TableView when an event fires....

NavigationBar is not appearing on my ViewController

I have a UIViewController that is presented modally. The UIViewController is inside of a UINavigationController. // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" ...

iPhone Application - combination of UINavigationController and UITabBarController

Hi I want to make the login app with the complicated views. Requirement flows as below: Login Page --> Menu Page --> Detail Page with Tab Control. --> Navigation Page Here the 'Detail Page' is again a combination of two views. Navigation View and Tab View. i.e. 'Detail Page' will have a Navigation Control (Navigation Bar) on top ...

UISplitViewController strange behavior

Hi i have a splitViewController mapViewController = [[MapViewController alloc] initWithManagedObjectContext:managedObjectContext startingRegion:startingRegion]; distanceViewController = [[DistanceTableViewController alloc] initWithManagedObjectContext:managedObjectContext]; distanceViewController.mapViewController = mapViewCont...

another question about rotation in ipad

so i have a view based ipad app. which i set the "supported interface orientations" and "initial interface orientation" properly. no problem here. all my view are load from nib and all my view in nib are set to be landscape. i load my first view in xxxAppDelegate.h, perfectly fine here. the view load correctly. and the problem come. wh...

How to build UITableView sectionHeader views in Interface Builder for iPhone?

Hi, I have a UITableView in grouped style in my iPhone app. Now I want to customize the section headers with an Image, a label and an activity indicator. To do this I created a new UIViewController subclass and a XIB file. I added the UIImageView, UILabel and UIActivityIndicatorView as IBOutlet properties to the ViewController and wire...

iPhone/UIViewController: when navigating away from a view, what is the best way to handle data entries

I should know this by now, but I am still a bit confused. When my app navigates from one view controller to the next (via the navigation controller) I want to "finalize" the data for the current VC before going to the next VC. The only way I see to intercept the "page swap" is in the [old view viewWillDisappear] -> [newView viewWillAppea...

iPad custom size of modal view controller

I have a couple of modal view controllers of certain size. I'm trying to avoid the use of custom views (creating full screen black translucent overlay over current view, add the modal view over that view, do the animations, etc) to present it because there is no modalPresentationStyle that fits the size of my controllers. Now I'm using ...

UIScrollView crashes app when touched

Hi, I am running into a very annoying problem: I am creating an UIScrollView that containes an UIView that contains some buttons. The UIView with buttons work fine. But the UIScrollView, no matter what I do with it, when touched, crashes. It doesn't make any difference it's empty or not. It keeps crashing. I am very lost and don't know...

Custom UIView and UIViewController best practices?

I currently have a simple iPhone app that loads a custom subclass of UIView. There's only one controller at the moment for the whole application, although there are several UIViews for separating the program logically. My current structure looks something like this: mainView : UIScrollView \__ has one subView : myCustomUIView : UIV...

iPad, UIViews, and View Controllers? Something isn't working...

So I think I have my Views all messed up, and how these work. Actually, I know I do, cause I am getting this: http://www.designmenace.com/downloads/landscapeWhatWhat.png . The iPad is turned landscape and so is the view but it's not rotated properly within the window. But the top bar is rotated properly! And this only happens about 70...