Giter Site home page Giter Site logo

xncategory's Introduction

XNCategory(整理中...)

Build Status GitHub license

iOS useful categories. 一行代码搞定一个小功能!

Requirements

- iOS 7.0+
- Xcode 8+

Installation

Installation with CocoaPods

To integrate XNCategory into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
use_frameworks!

target 'TargetName' do
pod 'XNCategory', '~> 0.0.2'
end

Then, run the following command:

$ pod install

Manually

1. Download all the files in the `XNCategory` subdirectory.
2. Add the source files to your Xcode project.

Usage example

UIKit

UIKit

绘制一个纯色的image

#import "UIImage+DrawImage.h"

[UIImage drawPlaceHolderImage]

创建一个拉伸不变形的image

#import "UIImage+ResizeImage.h"

[UIImage resizableImageNamed:@"chat_bg.png"]

UIImageView播放动画

#import "UIImageView+RunAnimation.h"

[imgIV runAnimationWithCount:6 name:@"runningman_" delatTime:0.1 repeatCount:INT_MAX];

便捷设置与访问frame

#import "UIView+AccessFrameComponent.h"
testView.x = 50;
testView.y = 100;
testView.width = 100;
testView.height = 100;

圆角

#import "UIView+RoundCorner.h"
[imgIV roundCorner];  //圆角
[imgIV1 circularClipping];  //圆形
[imgIV2 roundCornerWithBorderWidth:2.0 borderColor:[UIColor greenColor] cornerRadius:20];  //自定义

Foundation

Release History

* 0.2
    * CHANGE: modify bugs,support ios7.
* 0.1 
    * CHANGE: modify bugs,support bitcode.

License

**XNCategory is released under the MIT license. See LICENSE for details.

xncategory's People

Contributors

xn4545945 avatar

Stargazers

xxx avatar  avatar gitow avatar learn avatar  avatar  avatar iosgogo123 avatar  avatar

Watchers

 avatar

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.