记录

2018-10-12  本文已影响0人  开始懂了812

1.默认的NSButton是不可以修改高度的,需要将NSButton的style属性修改为sqare后才可以进行修改。代码设置的话是在NSButtonCell属性里进行修改

2.NSButton的backgroundColor需要在layer里才能修改:button.layer.backgroundColor = [NSColor whiteColoe].CGColor;

3.window跳转后的button点击事件无法触发的话,需要在跳转时将要跳转的window声明为强属性才可以,跳转设置下一个窗口为mainAndKey 之后还需要

[NSApp activateIgnoringOtherApps:YES];

4.设置二级目录方法 : [statusItemMenusetSubmenu:helpSubMenu forItem:helpItem];

5.同一窗口切换不同viewController :[self.view.window.windowController setContentViewController:self.loginView];

6.项目中关于沙盒冲突怎么解决

7.finderSync与主程序之间通信 1.都打开App group 然后findersync开沙盒 设置UserselectedFile 为none 然后通过nsdistribuatednotificationcenter进行通信

8.授权功能实现

9.OSXFUSE相关:1.是mrc的 2.不能用沙盒 3.mount需获取权限 否则会得到operation not permitted报错

10.偏好设置效果实现:选中效果(阴影)要实现需要添加- (NSArray*)toolbarSelectableItemIdentifiers:(NSToolbar*)toolbar代理方法

上一篇下一篇

猜你喜欢

热点阅读