I've moved this gist to https://github.com/phynet/iOS-Schemes please check it there ;)
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
export GOPATH="$HOME/workspace-dir/" |
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
通过读取系统网络接口信息,获取当前iphone设备的流量相关信息,统计的是上次开机至今的流量信息. 2 | |
倒入库: | |
[html] view plaincopy | |
SystemConfiguration.framework | |
加入头文件: | |
[html] view plaincopy | |
#include <ifaddrs.h> | |
#include <sys/socket.h> | |
#include <net/if.h> |
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
-(UIImage *)makeMirroredImage:(UIImage *)image | |
{ | |
UIImageOrientation flippedOrientation = UIImageOrientationUpMirrored; | |
switch (image.imageOrientation) { | |
case UIImageOrientationDown: | |
flippedOrientation = UIImageOrientationDownMirrored; | |
break; | |
case UIImageOrientationLeft: | |
flippedOrientation = UIImageOrientationLeftMirrored; | |
break; |