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
#!/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
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
# | |
# 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
/* | |
* 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
#!/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
# Uncrustify 0.59 | |
# | |
# General options | |
# | |
# The type of line endings | |
newlines = auto # auto/lf/crlf/cr | |
# The original size of tabs in the input |
NewerOlder