当我没有刀刺的节目时,我的印象是,我需要打电话,以提出我的看法。
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nil bundle:nil];
if (self) {
// Custom initialization
[self loadView];
}
return self;
}
(我已经确定尼比奥尼拉 = 无,因为没有尼伯。)
然后,我提出以下看法:
- (void) loadView {
self.view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 367)];
[self viewDidLoad];
}
这是从德洛德的角度考虑的。
如果我以这种方式要求收音和观看德洛德的话,我仍然不相信。 他们不会自动被叫。
问题在于:
装载 观点讨论
You should never call this method directly. The view controller calls this method when the view property is requested but is currently nil. If you create your views manually, you must override this method and use it to create your views. If you use Interface Builder to create your views and initialize the view controller—that is, you initialize the view using the initWithNibName:bundle: method, set the nibName and nibBundle properties directly, or create both your views and view controller in Interface Builder—then you must not override this method.
So, I don t understand how loadView gets called if I should never call it directly.
The default implementation of this method looks for valid nib information and uses that information to load the associated nib file. If no nib information is specified, the default implementation creates a plain UIView object and makes it the main view.
我不理解这如何奏效——制造痛苦的问讯。
If you override this method in order to create your views manually, you should do so and assign the root view of your hierarchy to the view property. (The views you create should be unique instances and should not be shared with any other view controller object.) Your custom implementation of this method should not call super.
If you want to perform any additional initialization of your views, do so in the viewDidLoad method. In iOS 3.0 and later, you should also override the viewDidUnload method to release any references to the view or its contents.
Okay, 到目前为止,它并没有说观点如何。 DidLoad被传唤。 因此,DidLoad:
意见 DidLoad Discussion
This method is called after the view controller has loaded its associated views into memory. This method is called regardless of whether the views were stored in a nib file or created programmatically in the loadView method. This method is most commonly used to perform additional initialization steps on views that are loaded from nib files.
如何?
自2006年以来 我的法典没有自动提及这些方法,我不得不认为,我必须自称。 但我仍未得到明确的理解,即文件表明这是正确的。