uiviewcontroller

When to release detailsViewController

Hi everyone, I have RootViewController and DetailsViewController in my iPhone application. I use Allocations tool to monitor my memory consumption, and I have a question. When my app starts it takes around 4Mb memory, when I select item in RootViewController it loads UIWebView in DetailsViewController and memory rise up to 10Mb, after...

RemoveFromSuperview sending unrecognized selector to view controller

I have a view controller called GobanVC. It's adding a subview to do a magnification effect. That works fine, but when I call removeSuperview to get rid of it, I get an unrecognized selector error: 2010-08-26 10:10:04.014 GoGrinder[4257:207] -[GobanVC _invalidateSubviewCache]: unrecognized selector sent to instance 0x5a2f540 2010-08-2...

How to reach UIViewcontrols method from subview?

Hi all, i have 3 viewcontrollers in each tab. i want to add a subview on top of each viewcontroller. there is a button in subview (i made an UIView with a button) when i press the button in subview, how to call a method in ViewController? here is the layout: ViewController1 has method1 ViewController2 has method2 ViewController3 has m...

UIKit and Cocos2d in one application

hi, i've a huge problem.. I want to use both cocos2d and UIkit frameworks in one application, here is the scenario: user log in, via UIkit, then play a game written in cocos2d, and after that the actual uikit ordinary application starts. the problem is that, after starting cocos game, i'm unable to return to uikit view-based application....

viewDidLoad is called only the first time

hello. someone could tell me please why when launch my app in the second time (after pressing the home button) the method viewDidLoad is not being called. thanx. ...

UIWebView in UIView need links to open up in browser

So i have an app that is not so much a webapp but more uses UIViewControllers and UIViews for most screens. On one particular controller i have a UIWebView control that only occupies a small portion of the UIViewController screen real estate that i load html from a web service as a string. [self.webView loadHTMLString:marketingBlurb ...

Can a UIWebView raise events to the containing view controller?

I have a UIWebController embedded in a UIViewController. I write the HTML code for the UIViewcontroller so I have complete control over the HTML page. When the user clicks a button in the HTML page - can the containing UIViewController be notified about it? Can the UIWebView send/raise an event to the UIViewControler? ...

Why is UISwitch only visible if I rename the class?

Hello everyone, I had a class called OptionsTableViewController which inherited UITableViewController. I changed the superclass to UIViewController implementing the UITableViewDelegate and UITableViewDataSource protocols, because I needed the tableView to be in a specific position. Now some table cells have a UISwitch as accessoryView....

[iphone] set "default" UIViewController background image?

Hi there. Basically I've got the same background image throughout my entire iphone application. I don't use XIBs (nasty things :p). So I was wondering if there was any way to add a "default" background image to all of my UIViewControllers? I tried subclassing UIViewController and created the class UIViewControllerWithDefaultBackgroun...

How to organize Objective-C UIViewControllers for UINavigationController in code

I have a project with the following: navigationController: usersViewController (UITableViewController) [rootViewController] photoViewController (UIViewController) chatViewController (UIViewController) (It has a tableView as a subview) I'm also using the ZTWebSocket code to make a webSocket connection. I'm choosing to define & connec...

When/why/how to use the UINavigationControllerDelegate Protocol Instance Methods?

When/why/how would you use these methods? - navigationController:willShowViewController:animated: – navigationController:didShowViewController:animated: Can't you just use these UIViewController Instance Methods instead? – viewWillAppear: – viewDidAppear: – viewWillDisappear: – viewDidDisappear: ...

ipad setting a uiview controller

I have this code arrangeListViewController = [[[ArrangeListViewController alloc] init] autorelease]; arrangeList = [[UITableView alloc] initWithFrame:CGRectMake(attributesPadding, y, popoverWidth - 2* attributesPadding, popoverHeight - y - attributesPadding) style:UITableViewStylePlain]; arrangeList.layer.cornerRadius = 15; So i add ...

how do i connect a uitableview to a uitableviewcontroller programmatically?

So i have a: arrangeList = [[UITableView alloc] initWithFrame:CGRectMake(attributesPadding, y, popoverWidth - 2* attributesPadding, popoverHeight - y - attributesPadding) style:UITableViewStylePlain]; That is the tableview that i want to connect to a controller, and i also have added this tableview to a uiview that i have animate onto...

Handling touch event logic in Subview or ViewController

I have a series of UIView subclasses that are added as subviews. Each subview can be dragged and dropped. When they are dropped (touchesEnded), I need to run a method in the viewController to do some work. I currently have the touchEvents handled in each subview class. Should I be handling these touch events in the viewController or shou...

iPhone: error in UIViewController interface declaration (expected '=', ',', ';', 'asm' or '__attribute__' before 'interface')

I have been working on this iPhone app for quite a while and everything has been working fine, but now all of the sudden, I am getting this error in a file I don't remember editing (nor do I remember editing anything relating to it, but it's possible.): /Users/on_fire/BWOC 0.5/Classes/../BrowserViewController.h:29: error: expected '=', ...

UIView and UITableView, reloadData weird latency

I have something weird with the repaint of my view controller. The view controller contains an UITableView and a spinner. I have an updateFeed function (fired by an IBOutlet) who brings the spinner in front of my view controller and puts a doUpdate function into an NSOperationQueue. - (void)updateFeed { [self showMuar]; Resourc...

Changing tintColor of UISearchBar inside ABPeoplePickerNavigationController

Hi everyone, I am tyring to customize the colors a bit in a ABPeoplePickerNavigationController below is my complete code: ABPeoplePickerNavigationController *objPeoplePicker = [[ABPeoplePickerNavigationController alloc] init]; [objPeoplePicker setPeoplePickerDelegate:self]; objPeoplePicker.topViewController.navigationController.navigat...

Issue with UIViewController in iPad Universal App

I recently upgraded my iPhone app to a universal binary. I have 2 view controllers and nibs, one for the iPhone and one iPad. I scaled up the iPad UI and created the exact same connections in IB. However, I get this error: -[UIViewController _loadViewFromNibNamed:bundle:] loaded the "HomeScreen_iPad" nib but the view outlet was not se...

UIViewController subclass not receiving touchesBegan iphone ipad

Hey all, So I subclassed UIViewController and in the nib I have a UIView, and in it a tableview. It is my understanding that both UIViewController and UIView are subclasses of UIResponder, so they should receive the - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event method. However, this is not the case, and my view contr...

Why isn't my modal view being displayed in my iOS app?

Hello. I have a tabbar-based iOS app with two tabs. When I tab into the second view, I want it to immediately present a modal view to the user. Here's my simple code for this... - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; MyViewController_iPhone *myVC = [[MyViewController_iPhone alloc] initWithNibName:@"...