I have a class to enable placeholders for UITextView. This class is called PlaceHolder, and it has initializer that accepts view. It then stores it in strong property and sets itself as view delegate. I store array of PlaceHolders in my strong array in viewDidLoaded:
self.placeHolders = @[[[PlaceHolder alloc]initWithControl:self.textView andPlaceHolder:@"text"]];
I then call
-(void)viewWillUnload {
for(PlaceHolder* holder in self.placeHolders) {
[holder unload]; // This method does self.view = nil; in each PlaceHolder
}
self.placeHolders = nil;
}
Nice. But viewWillUload is deprecated! It says I should use lowMemoryWarning, but it does not means view is unloaded!
So, what is the correct place to remove my placeholders?