This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!block ?: block() | |
!completionHandler ? nil : completionHandler(error); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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的版本 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import json | |
g_build_sdp = "YES" | |
with open("config.json", "r+") as jsonFile: | |
data = json.load(jsonFile) | |
if g_build_sdp == "YES": | |
data["file-plugin"][1]["force"] = "true" | |
jsonFile.seek(0) # rewind |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)addVolumeObserver | |
{ | |
AVAudioSession *audioSession = [AVAudioSession sharedInstance]; | |
NSError *error = nil; | |
[audioSession setActive:YES error:&error]; | |
if (error) { | |
NSLog(@"%@", error); | |
} | |
[audioSession addObserver:self forKeyPath:@"outputVolume" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:NULL]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func rtfDataToHtmlData(data: Data) -> Data? { | |
let attributedString = NSAttributedString(rtf: data, documentAttributes: nil)! | |
do { | |
let htmlData = try attributedString.data(from: NSRange(location: 0, length: attributedString.length), documentAttributes: [NSAttributedString.DocumentAttributeKey.documentType:NSAttributedString.DocumentType.html]) | |
return htmlData | |
} catch { | |
} | |
return nil | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flutter_iOS | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build_ios: |
OlderNewer