Giter Site home page Giter Site logo

bb9z / rfkit Goto Github PK

View Code? Open in Web Editor NEW
20.0 5.0 7.0 725 KB

Toolkit for daily Cocoa development. Since 2012.

License: Other

Objective-C 77.30% C 12.28% Ruby 5.18% Swift 3.37% Shell 1.87%
objective-c uikit macros ios category extensions toolkit macos log tvos

rfkit's Introduction

RFKit

CocoaPods Build Status Codecov CocoaPods Carthage Compatible

English 简体中文 🇨🇳

RFKit is a useful toolkit for daily Cocoa development.

Requirements

RFKit Version Minimum Xcode Version Minimum iOS Target Minimum macOS Target Minimum watchOS Target Minimum tvOS Target
2.5+ Xcode 9 iOS 9 macOS 10.9 watchOS 2.0 tvOS 9.0
2.4 Xcode 8 iOS 8 macOS 10.8 watchOS 2.0 tvOS 9.0
2.0-2.3 Xcode 8 iOS 6 macOS 10.8 watchOS 2.0 tvOS 9.0
1.7 Xcode 7 iOS 6 macOS 10.8 watchOS 2.0 tvOS 9.0
1.6 Xcode 8 iOS 6 N/A watchOS 2.0 N/A

Install

CocoaPods

To install using CocoaPods, add the following to your project Podfile:

pod 'RFKit'

Specify develop branch to install the lastest version:

pod 'RFKit', :git => 'https://github.com/BB9z/RFKit.git', :branch => 'develop'

A more complex sample:

pod 'RFKit',
    :git => 'https://github.com/BB9z/RFKit.git',
    :subspecs => ['Default', 'Category/NSDateFormatter']

Carthage

Although I recommend using CocoaPods, Carthage is still supported.

Specify RFKit in your Cartfile:

github "BB9z/RFKit"

Manual

You can always import RFKit by adding source code into your project. Just copy any files you needs.

dout

dout contains a set of convenient log toolcha, which was designed for debugging.

Features:

  • Out out format is better than NSLog(), and more faster.

  • Auto add expression before the results.

    e.g.:

    int a = 10;
    dout_int(101+a)  // Output: 101+a = 111
  • Optimized for multiple threads debugging, you can easily find the output come from which thread.

  • Support add position information in log output to help tracking location of log statements. Set DOUT_FALG_TRACE as 1 to active.

  • Special log methods for warning and error. Can change theirs behave to throw exception or assert fail.

  • Behavior can be highly customizable through the switch.

  • As macro, usually no performance loss.

Details: dout Document(in Chinese)

RFRuntime

Handle build or runtime differences. Provides an unified and simple interface for upper components. Contains:debugging switch define, default header file, RFARC and language extensions.

Debugging switch

RFDEBUG, RFKit debug mode switch. Set as 1 to active. If it´s not defined, will defined as 1 when DEBUG is true and NDEBUG not defined.

RFDebugLevel, controlling debugging behavior. If it´s not defined, will be defined as 2 if RFDEBUG is true, otherwise 1.

Default header file

UIKit and Foundation header is included in RFRuntime by default.

RFFeatureSupport

Defined some fake protocols for declaring a class support something or not.

RFDispatch

Some helper function for GCD.

Language extensions

Include some components from libextobjc:

  • metamacros.h, macros for metaprogramming.
  • EXTKeyPathCoding, allows compile-time verification of key paths.
  • EXTScope, several tools relative to scope.

@keypathClassInstance is similar with @keypath, but accept a class as parameter instead of a instance variable.

UIKit & Foundation Categories

Important part of RFKit. They contains many useful methods.

RFKitDefaultCategories.h defends which extension is imported by default.

See each header file to know the specific features.

RFGeometry

Add new methods and constants for geometry structures: CGPoint, CGSize, CGRect. Add an new CGAngle angle structure.

RFResizeAnchor and RFAlignmentAnchor provides a reference for resizing and aligning.

RFPerformance & doutkit

Performance toolkit.

Others

Some external components were placed under external folder.

Change log

rfkit's People

Contributors

bb9z avatar ddhjy avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rfkit's Issues

2.0 Roadmap

  • Remove all deprecated code.
  • doc to wiki
  • Merge RFUI/Core
  • CI
  • Lisence file rename
  • change log file
  • Swift enhance

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.