UIView: Force viewDidLoad / A way to release an UIView?

Some important part of my code is running in viewDidLoad and I was wondering is there was a way to unload an UIView so that when my controller calls it again it must go through viewDidLoad again?

Thanks a lot!

Answers


You should perhaps rethink the positioning of that code if its important.

If you need it to run each time the view is displayed, consider placing it in view[Will/Did]Appear.


Put those important part of code into -viewWillAppear:. -viewDidLoad is meant for initialization only.


You can also manually call -viewDidLoad or set the view property to nil.


Need Your Help

When to use takeUnretainedValue() or takeRetainedValue() to retrieve Unmanaged Objects in Swift?

ios objective-c iphone swift

According to Using Swift with Cocoa and Objective-C you can use takeUnretainedValue() and takeRetainedValue()to tell Swift how to manage the memory of an object for a function like this:

How to redirect focus inside a dialog box in intro.js?

primefaces intro.js

I want to redirect at the bottom of the dialog, as i click button at the header of the dialog with name "Click for INSIDE help" as shown in the image.