今天分享NSPanel,如下:
The NSPanel class is a subclass of NSWindow that you use to display transient, global, or pressing information. For example, you would use an instance of NSPanel, rather than an instance of NSWindow, to display error messages or to query the user for a response to remarkable or unusual circumstances. AppKit implements some common panels for you such as the Save, Open and Print panels, used to save, open, and print documents. Using these panels gives the user a consistent “look and feel” across applications for common operations.
讲到今天,我们已经讲了NSApplication、NSWindow、NSView、NSPanel,但这些api都是用于Mac os上的Application开发的,就是在苹果电脑上开发的应用,不是在手机上开发的应用。
ios开发,按照设备,分为在Mac、iPhone、TV、Watch,他们一致的是都使用Xcode开发工具,都使用Object-C语言,不一致的是它们有各自的sdk,但是也有部分公用的。
Mac对应的sdk为OS X sdk
iPhone对应的sdk为iOS
TV对应的sdk为tvOS
watch对应的sdk为watchOS
The NSPanel class is a subclass of NSWindow that you use to display transient, global, or pressing information. For example, you would use an instance of NSPanel, rather than an instance of NSWindow, to display error messages or to query the user for a response to remarkable or unusual circumstances. AppKit implements some common panels for you such as the Save, Open and Print panels, used to save, open, and print documents. Using these panels gives the user a consistent “look and feel” across applications for common operations.
讲到今天,我们已经讲了NSApplication、NSWindow、NSView、NSPanel,但这些api都是用于Mac os上的Application开发的,就是在苹果电脑上开发的应用,不是在手机上开发的应用。
ios开发,按照设备,分为在Mac、iPhone、TV、Watch,他们一致的是都使用Xcode开发工具,都使用Object-C语言,不一致的是它们有各自的sdk,但是也有部分公用的。
Mac对应的sdk为OS X sdk
iPhone对应的sdk为iOS
TV对应的sdk为tvOS
watch对应的sdk为watchOS
要看哪个类属于哪个sdk,可以在该类的右侧看到,如下:
总的来说,苹果从电脑到手机,甚至手表、电视,提供了更一致、连贯的sdk供开发者。而Windows、android在这方面是无法做到的。