Questions tagged [viewdidunload]

62 questions
0
votes
0 answers

In XCode 4.6.2, why does creating an outlet on a UITextView auto-generate a viewDidUnload method

I have a simple "About" view that I've made in a storyboard. Basically all it has is a UITextView. It's controller looks like this: // AboutViewController.m #import "AboutViewController.h" @interface AboutViewController() @end @implementation…
Bryce Thomas
  • 10,479
  • 26
  • 77
  • 126
0
votes
1 answer

App running slow after loading viewcontroller, then unload about 15-20 times

Using: Xcode 4.6 Storyboards ARC Model segue to SecondViewController I have an app that has the main ViewController that loads a new veiwController when the device is rotated to the right. When the app starts everything works great. If I rotate the…
Eric
  • 157
  • 1
  • 11
0
votes
2 answers

NSNotification & didReceiveMemoryWarning in iOS 6

As of iOS 6.0 , viewDidUnload method is deprecated. Before iOS 6 I used to removeObserver of NSNotification in viewDidUnload method. But since it is deprecated , I have moved it to didReceiveMemoryWarning. Now if my app receives the low memory…
iOSAppDev
  • 2,755
  • 4
  • 39
  • 77
0
votes
0 answers

didReceiveMemoryWarning using a Tab Bar

I have a UITabBar holding 3 UIViewControllers. One being a map, the other - a table, and the third - my own custom controller. I noticed lately that my app has some issues when it comes to operating on low memory, and it's due to me not being clear…
0
votes
1 answer

Release retained property pointing at self.view

In an instance of an UIViewController with ARC best practice would be to "release" any retained subviews of the main view (e.g. self.myOutlet = nil) in - viewDidUnload, and my guess is self.view = nil isn't strictly necessary at this point. What to…
Ali
  • 1,396
  • 14
  • 37
0
votes
2 answers

ios5: stopping views from being unloaded / stopping viewDidUnload being called

Given that iOS6 no longer unloads views, and hence no longer calls UIViewController's viewDidUnload, I was wondering if there is a reliable way to cause this same behaviour on iOS5? That is, I'd really like to stop my views unloading on iOS5, for…
JosephH
  • 37,173
  • 19
  • 130
  • 154
0
votes
2 answers

Is there any memory leak in following code?

I have uibutton as property and releasing it in dealloc. I am just using it to hide or unhide but the frequency of its usage is quite high. @property (retain, nonatomic) IBOutlet UIButton *object; -(void)onsomebuttonclick { …
Arun jalota
  • 252
  • 2
  • 14
0
votes
1 answer

memory keep on increasing when a opening a same uiviewcontroller again in iphone

I have two uiviewcontroller and i am releasing all the resources in dealloc and setting them to nil in didunload but still when i came across to both viewcontrollers the memory keep on increasing. I am keeping the track of memory used and free…
0
votes
1 answer

Programmatically unloading all views on iOS Device

Edited title I am using Core Data to store some data I collect from my server. In appDelegate's applicationDidBecomeActive, I check if the app needs to download new data (from a version-variable on my server). If it has old information, it downloads…
Sti
  • 8,275
  • 9
  • 62
  • 124
0
votes
1 answer

iOS memory management - low memory warnings and viewDidUnload

I'm getting this error when I get a memory warning: *** -[TheViewController_iPhone productImages]: message sent to deallocated instance Xcode shows the error being on the line noted below: - (void)viewDidUnload { [super viewDidUnload]; …
soleil
  • 12,133
  • 33
  • 112
  • 183
0
votes
1 answer

popViewController to a UIViewController initialized with a UIStoryboardSegue

I have a list controller that fires a performSegueWithIdentifier to load a detailViewController of the item that was selected. To initialize the detailViewController I set a property on it in the prepareForSegue that gets called before the…
0
votes
2 answers

didReceiveMemoryWarning Crash

-Using ARC -I have 5 separate view controllers all subclassing a class I made called "UIViewControllerWithLoadingView" which subclasses UIViewController. -In both the subclasses and superclass I allocate and deallocate properties like…
MobileMon
  • 8,341
  • 5
  • 56
  • 75
0
votes
1 answer

should I write [super viewDidLoad]?

I'm writing a navigation based app. (it has modal segues too) I'm not sure if I should keep [super viewDidLoad]; call or not. should I write code after this line of code or before it? how about [super viewDidUnload]; and similars?
Milad
  • 1,239
  • 3
  • 19
  • 37
0
votes
3 answers

viewDidUnload not called for alloc/init initialized viewcontroller with no xib file

Why isn't viewDidUnload method called, when I'm not using xib and use alloc/init to initialize my ViewController when i simulate memory warning for any iOS version via Simulator? It seems as if this method is never called. If I create controller via…
Valerii Pavlov
  • 1,986
  • 1
  • 19
  • 30
0
votes
1 answer

Set nil to child view controllers in viewDidUnload

My iOS app is navigation-based with the following structure: @interface ViewControllerA : UIViewController @property (strong,nonatomic) ViewControllerB *viewControllerB; @property (strong,nonatomic) ViewControllerC…