CCNPreferencesWindowController 1.4.3

CCNPreferencesWindowController 1.4.3

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2017年1月

Frank Gregor 维护。



  • 作者:
  • Frank Gregor

概述

CCNPreferencesWindowControllerNSWindowController的Objective-C子类,它可以自动管理您的自定义视图控制器来处理应用首选项。

以下是包含的示例应用程序的截图

CCNPreferencesWindowController Example Application

集成

您可以通过CocoaPods添加CCNPreferencesWindowController。只需将此行添加到您的Podfile中。

pod 'CCNPreferencesWindowController'

用法

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    // init the preferences window controller
    self.preferences = [CCNPreferencesWindowController new];
    self.preferences.centerToolbarItems = YES;  // or NO

    // setup all preference view controllers
    [self.preferences setPreferencesViewControllers:@[
        [PreferencesGeneralViewController new],
        [PreferencesNetworkViewController new],
        [PreferencesBonjourViewController new]
    ]];
}

- (IBAction)showPreferencesWindow:(id)sender {
    [self.preferences showPreferencesWindow];
}

就是这样。

要求

CCNPreferencesWindowController是为使用ARC和“现代”Objective-C 2编写的。目前它仅支持OS X 10.10 Yosemite。OS X 10.9 Mavericks也应该可以工作,但尚未测试。

贡献

代码按原样提供,代码尚未完整,且可能存在错误。如果您喜欢此组件,请随时支持它。根据您的需求进行更改,扩展它或只需在自己的项目中使用它。非常欢迎Pull-Requests和反馈。请通过[email protected]与我联系或在Twitter上通过@TheCocoaNaut发信。

文档

完整的文档您可以在CocoaDocs上找到。

许可证

本软件在MIT许可证下发布。

使用CCNPreferencesWindowController的软件

  • Review Times - 一个小型Mac工具,可显示Mac App Store和iOS App Store的计算平均审阅时间