Git - 恢复至指定 commit
变更记录
序号
录入时间
录入人
备注
1
2016-12-02
Alfred Jiang
-
方案名称Git - 恢复至指定 commit
关键字Git \ 恢复至指定 commit
需求场景
需要恢复代码至指定 commit 记录时
参考链接
ITEYE - git 撤销commit
CSDN - 三分钟教你学Git(二十) - revert merge会出现的问题
详细内容方法一:reset12git reset --hard commit-idgit push origin HEAD --force
方法二:revert1git revert commit-id
如果 Git revert 的时候出现下面错误
12error: Commit 7ec5362d47014deab2d1a3603c0e110caxxxxe06 is a merge but no -m option was given.fatal: revert failed
这是因为 revert 的那个 commit 是一个 merge commit,它有两个 parent, Git 不 ...
正则表达式 - 匹配中间字符串
变更记录
序号
录入时间
录入人
备注
1
2017-01-06
Alfred Jiang
-
方案名称正则表达式 - 匹配中间字符串
关键字正则表达式 \ 匹配字符串
需求场景
获取满足指定首尾字符串的中间字符串
参考链接
百度经验 - 正则表达式常用表达式(一):匹配中间字符串
详细内容1234567891011121314匹配两个字符串A与B中间的字符串包含A与B:表达式: A.*?B示例: Abaidu.comB结果: Awww.apizl.comB匹配两个字符串A与B中间的字符串包含A但是不包含B:表达式: A.*?(?=B)示例: Awww.apizl.comB结果: Awww.apizl.com匹配两个字符串A与B中间的字符串且不包含A与B:表达式: (?<=A).*?(?=B)示例: Awww.baidu.comB结果: www.baidu.com
效果图(无)
备注(无)
Xib - 利用 User Defined Runtime Attributes 设置运行时显示属性
变更记录
序号
录入时间
录入人
备注
1
2017-02-13
Alfred Jiang
-
方案名称Xib - 利用 User Defined Runtime Attributes 设置运行时显示属性
关键字Xib \ User Defined Runtime Attibutes \ xib 设置圆角
需求场景
通过 xib 进行一些运行时页面显示属性设置,比如设置圆角等
参考链接
iOS Blog - User Defined Runtime Attributes(推荐)
CSDN - iOS 在user defined runtime attributes(用户定义的运行时属性)改变UI
简书 - 在xib/storyboard里面设置view圆角半径
详细内容通过 Xib 设置 UIView 相关运行时页面显示属性时,可以通过 identity Inspector 下面的 User Defined Runtime Attributes 控制栏进行设置
以下是一些设置示例:
示例一:设置任意指定页面边框宽度为 2px ,圆角半径 10px
代码等价 ...
Mac 系统 - 通过 Shell 脚本自动记录 Terminal 活动
变更记录
序号
录入时间
录入人
备注
1
2016-09-30
Alfred Jiang
-
方案名称Mac 系统 - 通过 Shell 脚本自动记录 Terminal 活动
关键字Mac 系统 \ Terminal \ 终端
需求场景
自动记录 Terminal 活动以便于查找出错的地方
参考链接
系统之家 - MAC将Terminal活动记录下来的方法
GitHub - fumbles/dotfiles/bin/loggerScript
详细内容命令行方案1/usr/bin/script ~/Desktop/Terminal.log
脚本方案编写以时间为序命名的小脚本来保存每一次对话脚本 logger.sh
12345678910111213141516171819#!/bin/bash# logger.sh# Log everything you do in Terminal.#* Formatted date & time string.FORMATTED_DATE=`/bin/date "+%Y-%m-%d ...
专题 - objc.io Issue 3: 视图 相关文章五篇
变更记录
序号
录入时间
录入人
备注
1
2016-09-30
Alfred Jiang
-
方案名称专题 - objc.io Issue 3: 视图 相关文章五篇
关键字专题 \ Views \ 视图
需求场景
熟悉 iOS 视图层相关编程
参考链接
objc中国 - 期刊(推荐)
详细内容结合 walkingway 新浪微博提供的五张高清图,熟悉《objc.io Issue 3: 视图》 期刊五篇关于 iOS 视图层编程的介绍文章。以下为objc中国 - 期刊中文翻译链接
绘制像素到屏幕上
理解 Scroll Views
自定义 Collection View 布局
自定义控件
先进的自动布局工具箱
效果图
绘制像素到屏幕上
理解 Scroll Views
自定义 Collection View 布局
自定义控件
先进的自动布局工具箱
备注(无)
应用间通信 - URL Schemes
变更记录
序号
录入时间
录入人
备注
1
2016-10-08
Alfred Jiang
-
方案名称应用间通信 - URL Schemes
关键字应用间通信 \ URL Schemes
需求场景
在自己的应用中打开某个第三方应用或系统应用并调用指定功能
参考链接
少数派 - URL Schemes 使用详解(推荐)
Stack Overflow - iOS Launching Settings -> Restrictions URL Scheme
MacRumors - iOS 8 Widget Customisations using Launcher
开发者头条 - iOS 10 URL Scheme 列表
详细内容关于 URL Schemes 的详细介绍可以参考这里
更多资料见参考链接
iOS 10 URL Scheme 列表
1234567891011121314151617181920电池电量 Prefs:root=BATTERY_USAGE通用设置 Prefs:root=General存储空间 Prefs:root=General&pat ...
NSData - NSData 数据压缩与解压缩
变更记录
序号
录入时间
录入人
备注
1
2016-10-13
Alfred Jiang
-
方案名称NSData - NSData 数据压缩与解压缩
关键字NSData \ 文件 \ 压缩与解压缩
需求场景
需要对 NSData 进行压缩解压缩存取时
参考链接
CSDN - IOS 压缩与解压字符串(文件) 操作(推荐)
详细内容NSData+Compresssion.h
12345678910111213141516//// NSData+Compresssion.h// JDiPadNetworking//// Created by viktyz on 16/10/13.// Copyright © 2016年 Alfred Jiang. All rights reserved.//#import <Foundation/Foundation.h>@interface NSData (Compresssion)- (NSData *)compresssion;- (NSData *)deCompresssion;@end
NSData+C ...
UIDevice - 通过 DeviceKit 更方便的获取硬件设备参数
变更记录
序号
录入时间
录入人
备注
1
2016-10-14
Alfred Jiang
-
方案名称UIDevice - 通过 DeviceKit 更方便的获取硬件设备参数
关键字UIDevice \ DeviceKit \ 设备 \ 模拟器 \ 电量信息与状态
需求场景
需要确认设备型号时
需要确认电量信息状态时
参考链接
GitHub - dennisweissmann/DeviceKit(推荐)
详细内容UsageHere are some usage examples. All devices are also available as simulators:
12.iPhone6 => .Simulator(.iPhone6).iPhone6s => .Simualtor(.iPhone6s)
etc.
Get the Device You’re Running On123456789let device = Device()print(device) // prints, for example, "iPhone ...
工具 - 使用 iBackupbot 查看非越狱真机应用文件
变更记录
序号
录入时间
录入人
备注
1
2016-10-18
Alfred Jiang
-
方案名称工具 - 使用 iBackupbot 查看非越狱真机应用文件
关键字工具 \ iBackupbot \ 查看文件 \ 真机目录
需求场景
解决 iOS 8 之后 PP 助手、iTools 等工具难以查看非越狱机器 App 目录问题
修改非越狱机器下 App 中文件
参考链接
BackupBot(推荐)
详细内容iOS 8 之后大部分应用难以查看和修改非越狱机器下 App 中文件,iBackupbot 可以通过曲线方式解决这一问题
使用方法:
首先需要确保机器安装 iTunes 和 iBackupbot
连接真机并通过 iTunes 备份真机所有数据(主要是确保 App 数据备份至电脑)
通过 iBackupbot 载入电脑上的备份信息,导出并操作
修改完毕保存回去,通过 iTunes 恢复至真机
真个流程如果涉及到修改保存确实比较繁琐,但确实能满足查看需求,算是 iOS 8 之后 iTools 、 PP 助手等工具比较好的替代方案。
效果图(无)
备注(无)
Xcode - Xcodeproj 介绍
变更记录
序号
录入时间
录入人
备注
1
2016-10-09
Alfred Jiang
-
方案名称Xcode - Xcodeproj 介绍
关键字Xcode \ Xcodeproj 介绍 \ 工程目录结构 \ 工程组织结构
需求场景
需要了解 Xcode 工程组织结构时
需要解决 Xcode Xcodeproj 文件冲突时
参考链接
TOMORJM - 通过Xcodeproj深入探究Xcode工程文件 一
TOMORJM - 通过Xcodeproj深入探究Xcode工程文件 二
玉令天下的博客 - Let’s Talk About project.pbxproj
GitHub - yulingtianxia/pbxprojHelper
详细内容(见参考链接)
效果图(无)
备注(无)