开发者

Question about default UISplitView iPad app template

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜