Skip to content

Instantly share code, notes, and snippets.

View DargonLee's full-sized avatar
🎯
Focusing

Harlans DargonLee

🎯
Focusing
View GitHub Profile
if [ "${ACTION}" = "build" ]
then
INSTALL_DIR=${SRCROOT}/Products/${PROJECT_NAME}.framework
DEVICE_DIR=${BUILD_ROOT}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework
SIMULATOR_DIR=${BUILD_ROOT}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework
pod 'JLRoutes' //每次都获取最新版本
pod 'JLRoutes', '~>0' //高于0的版本
pod 'JLRoutes', '~> 0.1.2' //使用大于等于0.1.2但小于0.2的版本
pod 'JLRoutes', '~>0.1' //使用大于等于0.1但小于1.0的版本一个效果,都表示使用最新版本
pod 'JLRoutes', '2.0' //只使用2.0版本
pod 'JLRoutes', '= 2.0' //只使用2.0版本
pod 'JLRoutes', '> 2.0' //使用高于2.0的版本
!block ?: block()
!completionHandler ? nil : completionHandler(error);
NSRect rect = CGRectMake(315, 344, 760, 548);
NSWindowStyleMask style = NSWindowStyleMaskBorderless | NSWindowStyleMaskNonactivatingPanel;
NSPanel *panel = [[NSPanel alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:YES screen:[NSScreen mainScreen]];
panel.level = NSFloatingWindowLevel;
// panel.level = NSScreenSaverWindowLevel;
panel.collectionBehavior = NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorFullScreenAuxiliary;
[panel orderFrontRegardless];
@DargonLee
DargonLee / macOS的UI层级关系.swift
Last active July 6, 2022 02:10
通过storyboard创建WindowController
let mainWindow = NSApplication.shared.mainWindow
mainWindow?.isReleasedWhenClosed = true
mainWindow?.close()
let storyboard = NSStoryboard(name: NSStoryboard.Name("Main"), bundle: nil)
let windowVC = storyboard.instantiateController(withIdentifier: NSStoryboard.SceneIdentifier("RootWindowViewController")) as! NSWindowController
windowVC.window?.makeKeyAndOrderFront(nil)