Coder Social home page Coder Social logo

atassistivetools's Introduction

ATAssistiveTools

ATAssistiveTools 是一个辅助调试工具容器,包含收缩和扩展两个状态。

  • 扩展界面支持在任意时刻,加载任意的自定义界面,通过实现 ATCustomViewProtocol 协议,支持自定义界面获取 appear、 disappear、 shrink、 expand 四种状态的 will 和 did 事件,以便进行特定逻辑处理。
  • 收缩界面外观显示效果仿照 iOS 系统的 AssistiveTouch 。

ATCustomizeViews

ATCustomizeViews 目录中包含了以下的自定义界面,一方面可以作为使用示例,另一方面也可以直接使用这些自定义界面的功能:

  • ATFakeLocationView 虚拟定位
  • ATSandboxViewerView 沙盒目录浏览
  • ATDeviceLogsView 设备日志查看
  • ATGPSEmulatorView 对指定的坐标串按特定速度进行模拟

Installation

Manual

将ATAssistiveTools目录下载导入到工程中即可。

如果需要ATCustomizeViews,则需要下载ATCustomizeViews目录,导入到工程即可。

Usage

使用 ATAssistiveTools

  • 导入头文件
#import "ATAssistiveTools.h"
  • 显示 ATAssistiveTools
[[ATAssistiveTools sharedInstance] show];

使用ATCustomizeViews

在显示 ATAssistiveTools 的基础上:

  • 导入头文件
#import "ATDeviceLogsView.h"
#import "ATFakeLocationView.h"
#import "ATSandboxViewerView.h"
#import "ATGPSEmulatorView.h"
  • 加载 ATCustomizeViews
// add fake location view
ATFakeLocationView *simLocView = [[ATFakeLocationView alloc] init];
[[ATAssistiveTools sharedInstance] addCustomView:simLocView forTitle:@"FakeLocation"];

// add sandbox viewer view
ATSandboxViewerView *sandboxView = [[ATSandboxViewerView alloc] init];
[[ATAssistiveTools sharedInstance] addCustomView:sandboxView forTitle:@"SandboxViewer"];

// add device log view
ATDeviceLogsView *logsView = [[ATDeviceLogsView alloc] init];
[[ATAssistiveTools sharedInstance] addCustomView:logsView forTitle:@"DeviceLog"];

// add GPS emulator view
ATGPSEmulatorView *emulatorView = [[ATGPSEmulatorView alloc] init];
[[ATAssistiveTools sharedInstance] addCustomView:emulatorView forTitle:@"GPSEmulator"];

自定义界面

如果想自定义界面,需要让custom view实现 ATCustomViewProtocol 协议:

  • 导入头文件
#import "ATCustomViewProtocol.h" 
  • 使界面实现 ATCustomViewProtocol 协议
@interface ACustomView : UIView <ATCustomViewProtocol>
@end

To Do

  • 补全ATCustomizeViews的介绍说明
  • 收缩状态支持显示自定义的届满 ,支持显示自定义的标题
  • 增加生成 framework 的 target ,打包成 static library
  • 增加 podspec 文件 支持使用 cocoapods 安装

Notice

不建议用于性能相关的调试,虽然 ATAssistiveTools 本身对性能影响很小,但加载的 custom view 有可能对内存、CPU以及网络造成过大的占用,会导致结论的不严谨和不准确。

License

ATAssistiveTools is released under the MIT License.

atassistivetools's People

Contributors

devliubo avatar

Stargazers

Peng Liu avatar  avatar yeelight-牛星华 avatar  avatar  avatar duoduoni avatar Xiao Gai avatar  avatar  avatar  avatar 昝唯 avatar  avatar

Watchers

 avatar

atassistivetools's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.