Sample:
I've created a minimal set of files that highlight the issue here: http://uploads.omega.org.uk/Foo3.zip
If viewDidLoad/viewInitWithNibName are called, a message box is displayed. The message box is not displayed, therefore, the methods are not being called.
Details:
I have an application that is attempting to use a UITabBarCon...
6 times out of 10 my very simple iPhone app is getting a corrupted display on launch or crashes randomly. But it behaves fine in the simulator. The display corruption looks like mis-colored fonts, out of place font text, wrong background colors, etc.
I've found a strange work-around.. when my thread delays by 2 seconds before calling ...
Hi. I have an app that reads in a plist file from the resources folder. I have looked for about 5 hours for a solution to hosting my plist file on my freewebs acount and have the application update the plist file on launch. Can anyone help me please.
I will post my code if you ask. I am just not sure what you need to see now.
...
I read somewhere that in a programmatically created view in a UIViewController, not using Interface Builder, -viewDidLoad and -viewDidUnload should not be used. Is this right? Why? Where would I release subviews that I have retaining properties of? Or should I just not use properties for them?
EDIT: Read my comments on Rob Napier's answ...
hi,
when i load my viewController i used "viewDidLoad"method to init my view ,but this take much time to make the view appeared .So i had the idea to use "viewDidAppear" method to accelerate the appearance of my view but the load of the informations about my view are now loaded to the memory every time that i push my view (which is norma...
Hi,
I have a custom button, subclassed from UIButton that is initialised as below (obviously all the button does is use a custom font).
@implementation HWButton
- (id)initWithCoder:(NSCoder *)decoder {
if (self = [super initWithCoder: decoder]) {
[self.titleLabel setFont:[UIFont fontWithName: @"eraserdust" size: self.titleLabe...
Does viewDidLoad get called when you're popping back to a UIView?
...
Application Specific Information:
com.oneorangetree.iphoneexample failed to launch in time
elapsed total CPU time (seconds): 3.500 (user 1.680, system 1.820), 17% CPU
elapsed application CPU time (seconds): 0.920, 5% CPU
When the app loads, it does ALOT of stuff in viewDidLoad
It takes about 30 seconds to complete. How can I put thi...
Under iOS 4, when my app installs from xcode it crashes on the first launch but not on subsiquent launches.
After commenting out some addSubView methods the debugger is finally giving me one piece of info
It crashes on [super viewDidLoad]. The debugger states:
Unable to access variable "button1"
- (void)viewDidLoad {
[super ...
I have a favorites plist file when I try to load it like this
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
NSString *path = [[NSBundle mainBundle] pathForResource:@"favorites" ofType:@"plist"];
NSMutableArray *array = [[NSMutableArray alloc] initWithContentsOfFile:path];
self.allFavorites = array;
[array r...
I have an iPhone app, with a tab bar controller. Before the tab bar is loaded, I present a modal view for registration. Once registration is completed this view is dismissed, and the tabs appear, with the "News" tab selected. For some reason, even though the News view is displaying, the viewDidLoad method of the News class is not being c...
Hello,
I am working on an application with a LoginViewController and a TabBarViewcontroller.
When the application is ran, I add the LoginViewController as a subView of window in the delegate.
Once the login is ok, I remove the LoginViewController (removeFromSuperView) and add the TabBarViewController instead as a subview of windows.
T...
Hi.. i am new to iPhone Programming. In my app i have HomeViewController and ContentViewController. i am saving the values in ContentViewController by using NSUserDefaults
and based on saved values i will load the ContentView instead of HomeView when the app is restarted. if there r no values in the NSUserDefautls it displays the HomeVie...
I have to set an initial scroll position of my UITableView to a row other than the first one (for example, the first row of the second section).
In my view controller's viewDidLoad I write:
- (void)viewDidLoad
{
// self.view is a container view, not UITableView
[super viewDidLoad];
[table scrollToRowAtIndexPath:[NSIndexPath...
After upgrading my SDK version I noticed that cellForRowAtIndexPath is always called prior to viewWillAppear. Previously the order of execution was opposite: viewWillAppear would always be called prior to cellForRowAtIndexPath. Because my application logic often used viewWillAppear to initialize objects that are subsequently used in cell...
I am pushing a new view controller called SecondViewController from my FirstViewController.
I have a method called build2ndView which I call on my view SecondViewController and it adds a bunch of items to a UIScrollView.
When should I call this build2ndView method? In the SecondViewController's viewdidLoad method?
The reason I'm aski...
Hi,
I'm having problems getting my iPad app to detect its interfaceOrientation in the first UIViewController I initialize (in code). In fact, if I trace for application.statusBarOrientation, that too returns 1 (UIInterfaceOrientationPortrait) even if I launched in landscape.
If I trace self.interfaceOrientation in my first UIViewContro...
Hi, everyone,
I want to ask a question about the iPhone application.
In my program, I create the UITabBarController with 4 tabs. The 4 tabs display different information and have some connection. When I do something in the tab 4, it will update some data which display in tab 1. However, the page is the same if I add the element in th...
I am allocating an NSArray in viewDidLoad (firstly is that alright to do, like is it good pratice?) but where do I release it? In ViewDidUnload, dealloc or didRecieveMemoryWarning?
(also should I message it to release, or set it to nil, or empty the array or a combination?)
...
Does Android have an equivalent to Cocoa's viewDidLoad and viewDidAppear functions?
If not, then how would I go about performing an action when a View appears? My app is a tabbed application, in which one of the tabs is a list of forum topics. I would like the topic list to be refreshed every time the view appears. Is such a thing poss...