Questions tagged [viewdidunload]
62 questions
1
vote
2 answers
ViewDidUnload is not being called for viewControllers inside UIscrollView
I have this hierarchy:
MainViewController -> Sub View Controller -> UIScrollViewController -> Several (4) ViewControllers.
When I get out from the Sub View Controller I want that the ViewController inside the UIScrollView will call their…

shannoga
- 19,649
- 20
- 104
- 169
1
vote
2 answers
Proper use of viewDidUnload
I know that similar questions have been asked before. But I've been searching SO for some time now and things are still a bit confusing. So here goes...
I am not using ARC.
If you have a viewcontroller with an instance variable and a property like…

TompaLompa
- 949
- 6
- 17
0
votes
1 answer
ios UIViewController not calling viewDidUnload
When I simulate a memory warning, viewDidUnload should run on unused objects, right?
How do I go about figuring out WHY my UIView won't go away?
FYI I'm using ARC and every ivar is an IBOutlet and looks like:
@property (nonatomic, weak) IBOutlet…

Jacksonkr
- 31,583
- 39
- 180
- 284
0
votes
2 answers
Memory management in viewDidUnload - should I nil both array and objects inside?
I have a tableview to load news from internet. I and trying to nil all properties in viewDidUnload.
- (void)viewDidUnload
{
self.newsArray = nil;
self.newsTableView = nil;
self.indicatorView = nil;
// self.iconDownLoader = nil;
…

ThinkChris
- 1,169
- 2
- 15
- 38
0
votes
1 answer
How to make the view functions work in a scroll view
Please have a look at the following code
-(void)viewDidLoad{
self.viewControllers = [NSMutableArray arrayWithCapacity:0];
UIViewController* controller = nil;
controller = [[aViewController alloc]initWithNibName:@"aViewController"…

DaPo
- 113
- 1
- 8
0
votes
2 answers
How to prevent page from unloading when app is active
I have a few tabs in my app. I am currently facing an issue whereby my pages gets unloaded whenever the memory gets low (especially if I bring up the camera in my app).
Is there anyway to mitigate this and prevent unloading from happening? Or is…

Zhen
- 12,361
- 38
- 122
- 199
0
votes
1 answer
Which UIViewController properties should I set in -initWithNibName:bundle: vs. -viewDidLoad?
I understand that I should set self.title in -initWithNibName:bundle:.
What about self.navigationItem.titleView?
Since self.navigationItem.titleView seems only to be used when self.view is loaded, I'm thinking I should, to save memory, set…

ma11hew28
- 121,420
- 116
- 450
- 651
0
votes
1 answer
Best practice in viewDidUnload?
What is the best practice in viewDidUnload? To set to nil IBOutlets only or each instance variable too (release before)?
Thanks in advance.

Samui
- 1,384
- 3
- 14
- 28
0
votes
1 answer
In iPad DetailView situation, viewDidUnload not being called
I set up a detail view, do I have several Nib files that get loaded depending on what item is selected in the root view controller's table.
What I've discovered is that for the Nibs' classes, viewDidUnload is never called, whereas viewWillDisappear…

XibXib
- 1
0
votes
4 answers
iOS memory management - viewDidUnload
I have a navigation based app. The screen List has a UITableView with a list of books. The list of books is in a property NSArray that was built dynamically by executing an HTTP request. When one clicks in one of the rows in the List, one'll…

Adriana
- 806
- 11
- 36
0
votes
1 answer
viewDidUnload called after dealloc?
When I'm debugging my iPad app, I found because of low memory, some view controllers' viewDidUnload got called. But seconds later, their viewDidLoad are called. And then again because of low memory, viewDidUnload, then viewDidLoad again. This is…

Kail
- 5
- 2
0
votes
1 answer
App view seems to reload back to default after some time
I've come across a strange error while programming my iPhone application. Basically when I leave my application in the background and then access it after a long time (i.e. the entire night while I'm sleeping), the viewDidLoad method seems to be…

user1871869
- 3,317
- 13
- 56
- 106
0
votes
2 answers
iOS UIViewController,why "self" become to "wild pointer" in viewDidUnload?
my code snippet:
- (void)viewDidUnload{
[super viewDidUnload];
self.statusView = nil;
self.tableView = nil;
self.noDataView = nil;
}
In a rare situation, my app crashed in line self.noDataView = nil;. When I debug by po self, it…

naiyi1984
- 3
- 1
0
votes
1 answer
Release memory in ARC based APP?
I am using a lot of NSDictionaries and NSArrays ,so currently am allocating everything at viewDidload and making everything nil in ViewDidDisappear.
-(void)viewDidDisappear:(BOOL)animated
{
loginDictionary=nil;
}
Now my memory will get down…

Navi
- 1,696
- 2
- 17
- 36
0
votes
2 answers
Managing View outlets in ios 5.0 and ios 6.0
I am working on an iPad application which is converted to ARC. Application is for os >= ios 5.0. So my doubt is that, how do I manage viewOutlets? I use -(void)didReceivememoryWarning to set ViewOutlets to nil. But in ios 5.0 and 5.1 application…

Abz Ios
- 64
- 7