GithubHelp home page GithubHelp logo

carabina / drpagetracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shevckcccc/drpagetracker

0.0 1.0 0.0 21 KB

PageTracker is a pod that help you tracking your ViewController appear

License: MIT License

Ruby 5.62% Objective-C 38.05% Shell 56.33%

drpagetracker's Introduction

DRPageTracker

DRPageTracker is a sample iOS class for tracking view controller didappear

Installation

pod 'DRPageTracker'

That's all

Usage

run your app(debug model), and check the output log:

UINavigationController viewDidAppear

HomeViewController viewDidAppear

UIInputWindowController viewDidAppear

PageViewController viewDidAppear

HomeViewController viewDidAppear

PageViewController viewDidAppear

HomeViewController viewDidAppear
...

Notes

If you already have a hack of UIViewController#viewDidAppear method, this pod maybe not work, please be careful.

#中文版本

DRPageTracker 是一个用来追踪ViewController是否显示的库,用到了OC的runtime特性,比较轻量,对现有代码结构无影响

安装

pod 'DRPageTracker'

安装完运行即可看到效果,不需要有任何代码接入

使用

运行你的工程(debug模式下),在App里面随便打开几个ViewController,然后你就可以在日志里面找到类似如下的内容:

UINavigationController viewDidAppear

HomeViewController viewDidAppear

UIInputWindowController viewDidAppear

PageViewController viewDidAppear

HomeViewController viewDidAppear

PageViewController viewDidAppear

HomeViewController viewDidAppear
...

需要注意的地方

如果你的代码中原先已经有UIViewController#viewDidAppear的hack方法了,再使用DRPageTracker也许会造成冲突,请谨慎使用

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.