开发者

Question about default UISplitView iPad app template

开发者 https://www.devze.com 2023-03-06 04:40 出处:网络
Create default iPad split view based apps from template from xcode 4, then we have codes like @synthesize popoverController=_myPopoverController;

Create default iPad split view based apps from template from xcode 4, then we have codes like

@synthesize popoverController=_myPopoverController;

in file DetailViewController.m

My question is

what is "_myPopoverController" ? We do not declare such attribute in the interface, why introduce this magically ? 开发者_如何学编程


The Objective-C Programming Language Guide says this:

For the modern runtimes (see “Runtime Versions and Platforms” in Objective-C Runtime Programming Guide), instance variables are synthesized as needed. If an instance variable of the same name already exists, it is used.

That means the instance variable _myPopoverController (or whatever name you put here) will be considered as if you would declare it in the @interface section.

0

精彩评论

暂无评论...
验证码 换一张
取 消