https://code.visualstudio.com/docs/python/python-tutorial
https://stackoverflow.com/questions/15148496/passing-an-integer-by-reference-in-python
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.3 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
# Mac | |
.DS_Store | |
# Xcode | |
# | |
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
## Build generated | |
build/ | |
DerivedData |
/* | |
Copyright (C) 2016 Apple Inc. All Rights Reserved. | |
See LICENSE.txt for this sample’s licensing information | |
Abstract: | |
`DirectoryMonitor` is used to monitor the contents of the provided directory by using a GCD dispatch source. | |
*/ | |
import Foundation |
#!/bin/sh | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
#include <mach/mach_time.h> | |
/* Get the timebase info */ | |
mach_timebase_info_data_t info; | |
mach_timebase_info(&info); | |
uint64_t start = mach_absolute_time(); | |
/* Do some code */ |
+ (void)deactivateAppForDuration:(NSTimeInterval)duration | |
{ | |
//如果kif框架此方法支持了iOS11可以去掉此判断,执行kif的方法 | |
// if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11.0) { | |
// UIApplication *application = [UIApplication sharedApplication]; | |
// [application.delegate applicationWillResignActive:application]; | |
// [application.delegate applicationDidEnterBackground:application]; | |
// [tester waitForTimeInterval:duration]; | |
// [application.delegate applicationWillEnterForeground:application]; | |
// [application.delegate applicationDidBecomeActive:application]; |
#import <UIKit/UIKit.h> | |
NS_ASSUME_NONNULL_BEGIN | |
@interface UIImage (TintColor) | |
- (UIImage *)imageWithOriginalImage:(UIImage *)image | |
tintColor:(UIColor *)tintColor; | |
@end |