This file contains 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
# Uncrustify 0.59 | |
# | |
# General options | |
# | |
# The type of line endings | |
newlines = auto # auto/lf/crlf/cr | |
# The original size of tabs in the input |
This file contains 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
#!/bin/bash | |
# This script will open a file compare dialog for files you select in Versions.app. This script requires | |
# Beyond Compare to be installed into CrossOver for Mac. Note that the BC window doesn't always open | |
# in the foreground nor does it appear in the Dock, so you will need to CMD-TAB to find it. If you have problems | |
# using this from Versions try executing the commands below in a normal Terminal window running bash and replace | |
# the $1 and $2 variables with complete paths to two existing files. | |
# Setup some variables that CrossOver will need. You should replace these with your own values which can | |
# be found by opening CrossOver, going to Programs -> Run Command, selecting the bottle you installed |
This file contains 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
/* | |
* Check http://stackoverflow.com/questions/2777438/how-to-tell-if-uiviewcontrollers-view-is-visible | |
* to see the discussions. | |
* If the container is a UINavigationController, | |
* we can use the visibleViewController property | |
* to check the visibility. | |
*/ | |
navigationController visibleViewController == self | |
/* Or, we can add a category to UIViewController |
This file contains 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
# | |
# iOS 友盟发布渠道自动化脚本 | |
# | |
# - 在 Archive 的 "Post-action" 添加脚本去执行 "/bin/sh $SRCROOT/package.sh" | |
# - 确保在 "Provide build setting from" 选择了当前的 App | |
# - 在项目根目录($SRCROOT)添加 "iTunesArtwork" 文件(符合 App Store 提交要求的 512x512 px, PNG 格式) | |
# - 在下面 "" 设置你需要的发布渠道(空格分隔) | |
# - 在下面设置打包后的 ipa 的输出路径(可选) | |
# - 执行 "Product > Archive" | |
# |
This file contains 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
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
This file contains 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/python | |
# fix-xcode | |
# Rob Napier <[email protected]> | |
# Script to link in all your old SDKs every time you upgrade Xcode | |
# Create a directory called /SDKs (or modify source_path). | |
# Under it, put all the platform directories: | |
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
# Under those, store the SDKs: |
This file contains 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
- (UIViewController *)topViewController{ | |
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
} | |
- (UIViewController *)topViewController:(UIViewController *)rootViewController | |
{ | |
if (rootViewController.presentedViewController == nil) { | |
return rootViewController; | |
} | |
This file contains 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
######################### | |
# .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.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
This file contains 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
通过读取系统网络接口信息,获取当前iphone设备的流量相关信息,统计的是上次开机至今的流量信息. 2 | |
倒入库: | |
[html] view plaincopy | |
SystemConfiguration.framework | |
加入头文件: | |
[html] view plaincopy | |
#include <ifaddrs.h> | |
#include <sys/socket.h> | |
#include <net/if.h> |
This file contains 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
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
#import <objc/runtime.h> | |
#import <objc/message.h> |
OlderNewer