<|start_filename|>YJCategories/Foundation/NSMutableArray/NSMutableArray+YJSuperExt.h<|end_filename|>
//
//  NSMutableArray+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/5/22.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface NSMutableArray (YJSuperExt)

/** 安全添加对象到数组，防止非对象的崩溃 */
- (void)yj_addSafeObject:(id)obj;

/** 添加BOOL值 */
-(void)yj_addBOOL:(BOOL)boolValue;

/** 添加Int值 */
-(void)yj_addInt:(int)value;

/** 添加Integer值 */
-(void)yj_addInteger:(NSInteger)value;

/** 添加UnsignedInteger值 */
-(void)yj_addUnsignedInteger:(NSUInteger)value;

/** 添加CGFloat值 */
-(void)yj_addCGFloat:(CGFloat)value;

/** 添加Char值 */
-(void)yj_addChar:(char)value;

/** 添加Float值 */
-(void)yj_addFloat:(float)value;

/** 添加CGPoint值 */
-(void)yj_addPoint:(CGPoint)value;

/** 添加CGSize值 */
-(void)yj_addSize:(CGSize)value;

/** 添加CGRect值 */
-(void)yj_addRect:(CGRect)value;

/** 移除第一个对象 */
- (void)yj_removeFirstObject ;

/**
 move item

 @param index form
 @param toIndex to
 */
- (void)yj_moveObjectAtIndex:(NSUInteger)index
                     toIndex:(NSUInteger)toIndex;

@end


<|start_filename|>YJCategoriesGather/Views/DrawView.h<|end_filename|>
//
//  DrawView.h
//  YJCategoriesGather
//
//  Created by YJHou on 2014/11/4.
//  Copyright © 2014年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface DrawView : UIView

@end


<|start_filename|>YJCategories/UIKit/UIBezierPath/UIBezierPath+YJLength.h<|end_filename|>
//
//  UIBezierPath+YJLength.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIBezierPath (YJLength)

/** 总长度 */
- (CGFloat)yj_length;

/** 百分数的位置 */
- (CGPoint)yj_pointAtPercentOfLength:(CGFloat)percent;

@end


<|start_filename|>YJCategories/Foundation/NSString/NSString+YJSize.h<|end_filename|>
//
//  NSString+YJSize.h
//  YJCategoriesGather
//
//  Created by YJHou on 2014/11/4.
//  Copyright © 2014年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface NSString (YJSize)

/** 计算文字大小 固定width */
- (CGSize)yj_sizeWithFont:(UIFont *)font constrainedToWidth:(CGFloat)width;

/** 计算文字大小 固定height */
- (CGSize)yj_sizeWithFont:(UIFont *)font constrainedToHeight:(CGFloat)height;

@end


<|start_filename|>YJCategories/Foundation/NSDictionary/NSDictionary+YJLog.h<|end_filename|>
//
//  NSDictionary+YJLog.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (YJLog)

- (NSString *)descriptionWithLocale:(id)locale;

@end


<|start_filename|>YJCategories/UIKit/UITextField/UITextField+YJSuperExt.h<|end_filename|>
//
//  UITextField+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/7/18.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UITextField (YJSuperExt)

/** 传入 0~9 返回 YES 否则 返回 NO */
- (BOOL)yj_validateArabicNumber:(NSString *)numberString;

/** 是否是纯数字 */
- (BOOL)yj_isPureNumandCharacters:(NSString *)string;

@end


<|start_filename|>YJCategories/YJUnicodeConvert/NSDictionary+YJUnicodeConvert.h<|end_filename|>
//
//  NSDictionary+YJUnicodeConvert.h
//  YJCategoriesGather
//
//  Created by YJHou on 15/11/28.
//  Copyright © 2015年 YJHou. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (YJUnicodeConvert)

@end


<|start_filename|>YJCategories/Foundation/NSString/NSString+YJSpecialCharacter.h<|end_filename|>
//
//  NSString+YJSpecialCharacter.h
//  YJCategoriesGather
//
//  Created by YJHou on 2014/11/4.
//  Copyright © 2014年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (YJSpecialCharacter)

/** 是否包含特殊emoji */
- (BOOL)yj_isIncludingEmoji;

/** 删除emoji字符 */
- (NSString *)yj_removedEmojiString;

/** emoji转换  "This is a smiley face :smiley:" -> "This is a smiley face \U0001F604" */
- (NSString *)yj_stringByReplacingEmojiCheatCodesWithUnicode;

/** emoji转换  "This is a smiley face \U0001F604" -> "This is a smiley face :smiley:" */
- (NSString *)yj_stringByReplacingEmojiUnicodeWithCheatCodes;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJViewSize.h<|end_filename|>
//
//  UIView+YJViewSize.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/20.
//  Copyright © 2015年 hm <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (YJViewSize)

/** 自适应宽度 */
- (CGRect)yj_getFrameWithFreeWidth:(CGPoint)origin
                       maxHight:(CGFloat)maxHight;

/** 自适应高度 */
- (CGRect)yj_getFrameWithFreeHight:(CGPoint)origin
                       maxWidth:(CGFloat)maxWidth;

/** 自适应宽度--->可调整字间距 */
- (CGRect)yj_getFrameWithFreeWidth:(CGPoint)origin
                       maxHight:(CGFloat)maxHight
                      textSpace:(CGFloat)textSpace;

/** 自适应高度--->可调整字间距和行间距 */
- (CGRect)yj_getFrameWithFreeHight:(CGPoint)origin
                       maxWidth:(CGFloat)maxWidth
                      textSpace:(CGFloat)textSpace
                      lineSpace:(CGFloat)lineSpace;

@end


<|start_filename|>YJCategories/UIKit/UIDevice/UIDevice+YJSuperExt.h<|end_filename|>
//
//  UIDevice+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIDevice (YJSuperExt)

/** 根据状态栏获取_网络状态 */
+ (NSString *)getNetWorkStates;

/** 获取手机当前的DNS地址 */
+ (NSArray *)getAllDNSServers;

/** 文件大小的计算转换为KB/MB/GB */
+ (NSString *)fileSizeWithOrginalSize:(CGFloat)orginalSize;

/** 获取设备UUID */
+ (NSString *)yj_UUID;

@end


<|start_filename|>YJCategories/Foundation/NSDictionary/NSDictionary+YJSuperExt.h<|end_filename|>
//
//  NSDictionary+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (YJSuperExt)

/** 转换为 NSString */
- (NSString *)yj_convertToJSONString;

/** 转换为 NSData */
- (NSData *)yj_convertToJSONData;

/** 安全设置键值对 */
- (void)setSafeValue:(id)value forKey:(NSString *)key;

/** 将NSDictionary转换成 url 参数字符串 */
- (NSString *)yj_parameterDictToUrlString;

@end


<|start_filename|>YJCategories/UIKit/UIResponder/UIResponder+YJSuperExt.h<|end_filename|>
//
//  UIResponder+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIResponder (YJSuperExt)

/** 当前第一响应者 */
+ (id)yj_currentFirstResponder;

/** 响应者链 */
- (NSString *)yj_responderChainDescription;

@end


<|start_filename|>YJCategories/Foundation/NSIndexPath/NSIndexPath+YJOffset.h<|end_filename|>
//
//  NSIndexPath+YJOffset.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface NSIndexPath (YJOffset)

/** 上一行 */
- (NSIndexPath *)previousRow;

/** 下一行 */
- (NSIndexPath *)nextRow;

/** 上一项 */
- (NSIndexPath *)previousItem;

/** 下一项 */
- (NSIndexPath *)nextItem;

/** 上一组 */
- (NSIndexPath *)previousSection;

/** 下一组 */
- (NSIndexPath *)nextSection;


@end


<|start_filename|>YJCategories/YJUnicodeConvert/NSArray+YJUnicodeConvert.h<|end_filename|>
//
//  NSArray+YJUnicodeConvert.h
//  YJCategoriesGather
//
//  Created by YJHou on 15/11/28.
//  Copyright © 2015年 YJHou. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSArray (YJUnicodeConvert)

@end


<|start_filename|>YJCategories/Foundation/NSString/NSString+YJHTML.h<|end_filename|>
//
//  NSString+YJHTML.h
//  YJCategoriesGather
//
//  Created by YJHou on 2014/11/4.
//  Copyright © 2014年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (YJHTML)

/**
 使用Unicode 编码所有HTML实体 Get a string where internal characters that need escaping for HTML are escaped

 @return 处理完的
 */
- (NSString *)yj_stringByEscapingForHTML;

/**
 使用Ascii编码所有HTML实体  Get a string where internal characters that need escaping for HTML are escaped
 * For example, '&' become '&amp;'

 @return 处理完的
 */
- (NSString *)yj_stringByEscapingForAsciiHTML;

/**
 解码HTML实体 Get a string where internal characters that are escaped for HTML are unescaped
 * For example, '&amp;' becomes '&'
 * Handles &#32; and &#x32; cases as well

 @return 处理完的
 */
- (NSString *)yj_stringByUnescapingFromHTML;

/**
  Replace newlines with <br /> tags.

 @return 处理完的
 */
- (NSString *)yj_stringWithNewLinesAsBRs;

/**
 Remove newlines and white space from string

 @return 处理完的
 */
- (NSString *)yj_stringByRemovingNewLinesAndWhitespace;

// Wrap plain URLs in <a href="..." class="linkified">...</a>
//  - Ignores URLs inside tags (any URL beginning with =")
//  - HTTP & HTTPS schemes only
//  - Only works in iOS 4+ as we use NSRegularExpression (returns self if not supported so be careful with NSMutableStrings)
//  - Expression: (?<!=")\b((http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?)
//  - Adapted from http://regexlib.com/REDetails.aspx?regexp_id=96
- (NSString *)yj_stringByLinkifyingURLs;

/**
 DEPRECIATED - Please use NSString stringByConvertingHTMLToPlainText

 @return 处理完的 已过期
 */
- (NSString *)yj_stringByStrippingTags __attribute__((deprecated));

/**
 将html转换为纯文本 Convert HTML To Plain Text

 @return 处理完的
 */
- (NSString *)yj_stringByConvertingHTMLToPlainText;

@end


<|start_filename|>YJCategories/UIKit/UITableView/UITableView+YJSuperExt.h<|end_filename|>
//
//  UITableView+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UITableView (YJSuperExt)

@end


<|start_filename|>YJCategories/UIKit/UIViewController/UIViewController+YJSuperExt.h<|end_filename|>
//
//  UIViewController+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIViewController (YJSuperExt)

/** vc 是否已经显示 */
- (BOOL)yj_isVisible;

/// Wraps the view controller container methods and exchanges the old view controller with the new view controller.
///
/// @param oldController  The controller to be removed.
/// @param newController  The controller to be added.
/// @param viewTransition A block that manages the view transition of the two controllers if necessary.
- (void)yj_exchangeViewController:(nullable UIViewController *)oldController withViewController:(nullable UIViewController *)newController viewTransition:(nullable void(^)(void))viewTransition;

/// Wraps the exchange of the views of two view controllers including the appearance calls.
///
/// @param oldController The controller whoes view needs to be removed.
/// @param newController The controller whoes view needs to be added.
/// @param containerView The container view in which this replacement should take place.
- (void)yj_exchangeViewFromController:(nullable UIViewController *)oldController toController:(nullable UIViewController *)newController inContainerView:(UIView *)containerView;


@end


<|start_filename|>YJCategories/UIKit/UIBarButtonItem/UIBarButtonItem+YJSuperExt.h<|end_filename|>
//
//  UIBarButtonItem+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIBarButtonItem (YJSuperExt)

/**
 *  设置NavigationItem的自定义文字图片按钮
 *  @param title   文字
 *  @param nomal   文字颜色
 *  @param img     默认图
 *  @param highimg 高亮图
 *  @param target  代理
 *  @param action  方法
 */
+ (instancetype)itemWithNomalTitle:(NSString *)title
                        titleColor:(UIColor *)titleColor
                        nomalImage:(NSString *)nomalImage
                         highImage:(NSString *)highImage
                            target:(id)target
                            action:(SEL)action;

/**
 *  设置NavigationItem的自定义按钮
 *  @param image        默认图片
 *  @param highImage    按下后高亮图片
 *  @param target       self 代理
 *  @param action       方法
 */
+ (instancetype)itemWithImageName:(NSString *)image
                        highImage:(NSString *)highImage
                           target:(id)target
                           action:(SEL)action;

/**
 *  设置NavigationItem的自定义按下按钮
 *  @param image        默认图片
 *  @param selectImg    按下后高亮图片
 *  @param target       self 代理
 *  @param action       方法
 */
+ (instancetype)itemWithImageName:(NSString *)image
                      selectImage:(NSString *)selectImg
                           target:(id)target
                           action:(SEL)action;

/**
 *  自定义返回按钮
 *  @param title  文字
 *  @param img    图片名
 *  @param target self 代理
 *  @param action 方法名
 */
+ (instancetype)leftItemWithNomalTitle:(NSString *)title
                            nomalImage:(NSString *)image
                            titleColor:(UIColor *)titleColor
                                target:(id)target
                                action:(SEL)action;

/**
 *  自定义文字按钮
 *  @param title  文字
 *  @param target self 代理
 *  @param action 方法名
 */
+ (instancetype)itemWithNomalTitle:(NSString *)title
                            target:(id)target
                            action:(SEL)action;


/**
 *  自定义文字按钮 带文字属性
 *  @param title        文字
 *  @param nomal        默认颜色
 *  @param heightcolor  高亮颜色
 *  @param target       代理
 *  @param action       方法名
 */
+ (instancetype)itemWithNomalTitle:(NSString *)title
                        nomalColor:(UIColor *)nomal
                       heightColor:(UIColor *)heightcolor
                            target:(id)target
                            action:(SEL)action;

@end


<|start_filename|>YJCategories/YJUIKit.h<|end_filename|>
//
//  YJUIKit.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#ifndef YJUIKit_h
#define YJUIKit_h

//////////// UIView ////////////////////
    #import "UIView+YJFrame.h"           // View Frame
    #import "UIView+YJFind.h"            // 寻找 View
    #import "UIView+YJLoadNib.h"         // 从 Nib 实例化 View
    #import "UIView+YJScreenshot.h"      // 将 view 转为 image
    #import "UIView+YJGestureBlock.h"    // 给 View 添加手势
    #import "UIView+YJRecursion.h"       // 递归
    #import "UIView+YJCustomBorder.h"    // 自定义边框
    #import "UIView+YJShake.h"           // 摇动
    #import "UIView+YJVisuals.h"         // 显示效果
    #import "UIView+YJDraggable.h"       // 拖动
    #import "UIView+YJAnimation.h"       // 动画
    #import "UIView+YJBadge.h"           // 角标


//////////// UIWindow /////////////////
    #import "UIWindow+YJSuperExt.h"

//////////// UIViewController /////////////////
    #import "UIApplication+YJAppInfo.h"
    #import "UIApplication+YJSuperExt.h"

//////////// UILabel /////////////////
    #import "UILabel+YJSuperExt.h"


//////////// UIButton /////////////////
    #import "UIButton+YJSuperExt.h"
    #import "UIButton+YJImagePosition.h"

//////////// UITableView /////////////////
    #import "UITableView+YJSuperExt.h"

//////////// UITableViewCell /////////////////
    #import "UITableViewCell+YJNib.h"  // 加载 Nib

//////////// UIViewController /////////////////
    #import "UIViewController+YJSuperExt.h"
    #import "UIViewController+YJBackButtonBlock.h"
    #import "UIViewController+YJFullScreenSupport.h"

    #import "UINavigationController+YJSuperExt.h"


////////// UIControl //////////
    #import "UIControl+YJSuperExt.h"
    #import "UIControl+YJBlock.h"

//////////// UIFont ////////
    #import "UIFont+YJSuperExt.h"

    #import "UINavigationBar+YJSuperExt.h"
    #import "UIResponder+YJSuperExt.h"

    #import "UIBezierPath+YJSuperExt.h"
    #import "UIBezierPath+YJBasicShapes.h"
    #import "UIBezierPath+YJSymbol.h"
    #import "UIBezierPath+YJLength.h"

    #import "UIScrollView+YJSuperExt.h"
    #import "UIScrollView+YJPosition.h"

    #import "UIBarButtonItem+YJBadge.h"

#import "UIImageView+YJSuperExt.h"
#import "UIImageView+YJCornerRadius.h"

#import "UIScreen+YJFrame.h"

#import "UIImage+YJReSize.h"
#import "UIImage+YJAlpha.h"
#import "UIImage+YJRoundedCorner.h"
#import "UIImage+YJSuperExt.h"




#endif /* YJUIKit_h */


<|start_filename|>YJCategories/UIKit/UILabel/UILabel+YJSuperExt.h<|end_filename|>
//
//  UILabel+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UILabel (YJSuperExt)

@end


<|start_filename|>YJCategories/UIKit/UIScrollView/UIScrollView+YJPosition.h<|end_filename|>
//
//  UIScrollView+YJPosition.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

/** 手势滚动方向 */
typedef NS_ENUM(NSInteger, YJScrollDirection) {
    YJScrollDirectionUp,
    YJScrollDirectionDown,
    YJScrollDirectionLeft,
    YJScrollDirectionRight,
    YJScrollDirectionWTF
};

@interface UIScrollView (YJPosition)

@property (nonatomic, assign) CGFloat yj_contentWidth; /**< 宽 */
@property (nonatomic, assign) CGFloat yj_contentHeight; /**< 高 */
@property (nonatomic, assign) CGFloat yj_contentOffsetX; /**< x */
@property (nonatomic, assign) CGFloat yj_contentOffsetY; /**< y */

/** 顶部偏移量 */
- (CGPoint)yj_topContentOffset;

/** 底部偏移量 */
- (CGPoint)yj_bottomContentOffset;

/** 左边偏移量 */
- (CGPoint)yj_leftContentOffset;

/** 右边偏移量 */
- (CGPoint)yj_rightContentOffset;

/** 手势滚动方向 */
- (YJScrollDirection)yj_ScrollDirection;

/** 是否滚动到了top */
- (BOOL)yj_isScrolledToTop;

/** 是否滚动到了Bottom */
- (BOOL)yj_isScrolledToBottom;

/** 是否滚动到了Left */
- (BOOL)yj_isScrolledToLeft;

/** 是否滚动到了Right */
- (BOOL)yj_isScrolledToRight;

/** 动画滚动 */
- (void)yj_scrollToTopAnimated:(BOOL)animated;
- (void)yj_scrollToBottomAnimated:(BOOL)animated;
- (void)yj_scrollToLeftAnimated:(BOOL)animated;
- (void)yj_scrollToRightAnimated:(BOOL)animated;

/** 当前滚动页面 及 滚动到哪一页 */
- (NSUInteger)yj_verticalPageIndex;
- (NSUInteger)yj_horizontalPageIndex;
- (void)yj_scrollToVerticalPageIndex:(NSUInteger)pageIndex animated:(BOOL)animated;
- (void)yj_scrollToHorizontalPageIndex:(NSUInteger)pageIndex animated:(BOOL)animated;

@end


<|start_filename|>YJCategories/UIKit/UINavigationBar/UINavigationBar+YJSuperExt.h<|end_filename|>
//
//  UINavigationBar+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UINavigationBar (YJSuperExt)

@property (nonatomic, strong) UIView *yj_overlayView; /**< 导航条颜色视图 */

/** 导航栏设置背景颜色 */
- (void)yj_setBackgroundColor:(UIColor *)backgroundColor;

/** 修改导航栏的位置 */
- (void)yj_setTranslationY:(CGFloat)translationY;

/** 设置添加视图的透明度 */
- (void)yj_setElementsAlpha:(CGFloat)alpha;

/** 重新设置初始化 */
- (void)yj_reset;


@end


<|start_filename|>YJCategories/Foundation/NSMutableArray/NSMutableArray+YJSafeExt.h<|end_filename|>
//
//  NSMutableArray+YJSafeExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSMutableArray (YJSafeExt)

@end


<|start_filename|>YJCategories/UIKit/UIBezierPath/UIBezierPath+YJBasicShapes.h<|end_filename|>
//
//  UIBezierPath+YJBasicShapes.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIBezierPath (YJBasicShapes)

/** 心形 */
+ (UIBezierPath *)yj_heartShape:(CGRect)originalFrame;

/** 用户头像 */
+ (UIBezierPath *)yj_userShape:(CGRect)originalFrame;

/** 马丁尼酒杯 */
+ (UIBezierPath *)yj_martiniShape:(CGRect)originalFrame;

/** 烧杯 */
+ (UIBezierPath *)yj_beakerShape:(CGRect)originalFrame;

/** 五角星 */
+ (UIBezierPath *)yj_starShape:(CGRect)originalFrame;

/** 多个小五角星 */
+ (UIBezierPath *)yj_stars:(NSUInteger)numberOfStars shapeInFrame:(CGRect)originalFrame;

@end


<|start_filename|>YJCategories/UIKit/UITableViewCell/UITableViewCell+YJNib.h<|end_filename|>
//
//  UITableViewCell+YJNib.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UITableViewCell (YJNib)

/** 加载同类名的 nib */
+ (UINib *)nib;

@end


<|start_filename|>YJCategories/Foundation/NSTimer/NSTimer+YJSuperExt.h<|end_filename|>
//
//  NSTimer+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSTimer (YJSuperExt)

/** 暂停NSTimer */
- (void)yj_pauseTimer;

/** 开始NSTimer */
- (void)yj_resumeTimer;

/** 延迟开始NSTimer */
- (void)yj_resumeTimerAfterTimeInterval:(NSTimeInterval)interval;

@end


<|start_filename|>YJCategoriesGather/SubViewController.h<|end_filename|>
//
//  SubViewController.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/3/6.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SubViewController : UIViewController

@property (nonatomic, assign) BOOL isCanMoveTop; /**< 可以滑动到顶部 */

@end


<|start_filename|>YJCategories/UIKit/UIFont/UIFont+YJSuperExt.h<|end_filename|>
//
//  UIFont+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIFont (YJSuperExt)

/** 自定义字体的获取 */
+ (UIFont *)yj_fontWithTTFAtPath:(NSString *)path size:(CGFloat)size;

@end


<|start_filename|>YJCategories/Foundation/NSTimer/NSTimer+YJBlock.h<|end_filename|>
//
//  NSTimer+YJBlock.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSTimer (YJBlock)

/** 定时器Block执行 scheduled*/
+ (NSTimer *)yj_scheduledTimerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)())inBlock repeats:(BOOL)inRepeats;

/** 定时器Block执行 timer */
+ (NSTimer *)yj_timerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)())inBlock repeats:(BOOL)inRepeats;

@end


<|start_filename|>YJCategories/QuartzCore/CATransaction/CATransaction+YJAnimationDuration.h<|end_filename|>
//
//  CATransaction+YJAnimationDuration.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/5/22.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>

#if __has_feature(nullability) // Xcode 6.3+
#pragma clang assume_nonnull begin
#else
#define nullable
#define __nullable
#endif

@interface CATransaction (YJAnimationDuration)

/**
 CATransaction 动画执 block回调

 @param duration 动画时间
 @param animations 动画代码块
 @param completion 完成
 */
+(void)yj_animationDuration:(NSTimeInterval)duration
                 animations:(void (^)(void))animations
                 completion:(void (^)())completion;

@end

#if __has_feature(nullability)
#pragma clang assume_nonnull end
#endif


<|start_filename|>YJCategories/Foundation/NSFileManager/NSFileManager+YJSuperExt.h<|end_filename|>
//
//  NSFileManager+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/3/2.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSFileManager (YJSuperExt)

/** DocumentsURL */
+ (NSURL *)yj_documentsURL;

/** LibraryURL */
+ (NSURL *)yj_libraryURL;

/** CachesURL */
+ (NSURL *)yj_cachesURL;

/** 设置path跳过备份 */
+ (BOOL)yj_addSkipBackupAttributeToFile:(NSString *)path;

/** 可用磁盘空间 */
+ (double)yj_availableDiskSpace;

/** 获取应用沙盒根路径 */
+ (NSString *)yj_homePath;

/** 获取Tmp目录路径 */
+ (NSString *)yj_tmpPath;

/**
 file is Exists

 @param filePath filePath
 @return file exists or not
 */
- (BOOL)yj_isFileExists:(NSString *)filePath;

/**
 判断文件是否超时

 @param filePath filePath
 @param timeout timeout
 @return timeout or not
 */
- (BOOL)yj_isFile:(NSString *)filePath timeout:(NSTimeInterval)timeout;

@end


<|start_filename|>YJCategories/Foundation/NSString/NSString+YJPinYin.h<|end_filename|>
//
//  NSString+YJPinYin.h
//  YJCategoriesGather
//
//  Created by YJHou on 2014/11/4.
//  Copyright © 2014年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (YJPinYin)

/**【拼音 是否大写】比如: 侯跃军 -> hou yue jun*/
- (NSString *)yj_pinyinUppercase:(BOOL)uppercase;

/**【每个首字母大写】比如: 侯跃军 -> Hou Yue Jun */
- (NSString *)yj_pinyinCapitalized;

/** 拼音带声调 比如: 侯跃军 -> hóu yuè jūn */
- (NSString *)yj_pinyinWithPhoneticSymbolUppercase:(BOOL)uppercase;

/**【带声调 每个首字母大写】比如: 侯跃军 -> Hóu Yuè Jūn */
- (NSString *)yj_pinyinPhoneticSymbolCapitalized;

/**【没有空格 是否全大写】比如: 侯跃军 -> houyuejun */
- (NSString *)yj_pinyinWithoutBlankUppercase:(BOOL)uppercase;

/**【没有空格 每个首字母大写】比如: 侯跃军 -> HouYueJun */
- (NSString *)yj_pinyinWithoutBlankCapitalized;

/**【拼音数组 是否全部大写】比如: 侯跃军 -> @[@"hou", @"yue", @"jun"]*/
- (NSArray *)yj_pinyinArrayUppercase:(BOOL)uppercase;

/**【拼音数组 首字母大写】比如:侯跃军 -> @[@"Hou", @"Yue", @"Jun"] */
- (NSArray *)yj_pinyinArrayCapitalized;

/**【拼音首字母字符串 是否大写】比如: 侯跃军 -> hyj */
- (NSString *)yj_pinyinInitialsStringUppercase:(BOOL)uppercase;

/**【拼音首字母数组 是否大写】 比如: 侯跃军 -> @[@"h", @"y", @"j"] */
- (NSArray*)yj_pinyinInitialsArrayUppercase:(BOOL)uppercase;

@end


<|start_filename|>YJCategories/Foundation/NSDateFormatter/NSDateFormatter+YJSuperExt.h<|end_filename|>
//
//  NSDateFormatter+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDateFormatter (YJSuperExt)

/** 根据 dateString 和 format 返回 NSDate */
+ (NSDate *)yj_dateWithString:(NSString *)dateString format:(NSString *)format;

/** 根据 date 和 format 返回字符串日期 */
+ (NSString *)yj_stringWithDate:(NSDate *)date format:(NSString *)format;

#pragma mark - 日期格式部分
/** yyyy-MM-dd 格式 */
+ (NSString *)yj_yyyyMMddFormat;
/** HH:mm:ss 格式 */
+ (NSString *)yj_HHmmssFormat;
/** 完整的 yyyy-MM-dd HH:mm:ss */
+ (NSString *)yj_yyyyMMddHHmmssFormat;
/** 月日年 格式 */
+ (NSString *)yj_MMddyyyyFormat;
/** 带毫秒的完整的时间格式 */
+ (NSString *)yj_yyyyMMddHHmmssSSSFormat;

@end


<|start_filename|>YJCategories/YJQuartzCore.h<|end_filename|>
//
//  YJQuartzCore.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#ifndef YJQuartzCore_h
#define YJQuartzCore_h

#import "CATransaction+YJAnimationDuration.h"


#endif /* YJQuartzCore_h */


<|start_filename|>YJCategories/Foundation/NSString/NSString+YJMIME.h<|end_filename|>
//
//  NSString+YJMIME.h
//  YJCategoriesGather
//
//  Created by YJHou on 2014/11/4.
//  Copyright © 2014年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (YJMIME)

/** 根据文件url后缀 返回对应的MIMEType */
- (NSString *)yj_MIMEType;

/** 根据扩展返回 MIMEType */
+ (NSString *)yj_MIMETypeForExtension:(NSString *)extension;

/** 常见MIME集合 */
+ (NSDictionary *)yj_MIMEDict;

@end


<|start_filename|>YJCategories/Foundation/NSData/NSData+YJSuperExt.h<|end_filename|>
//
//  NSData+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSData (YJSuperExt)

/** 将APNS NSData类型token 格式化成字符串 */
- (NSString *)APNSTokenString;

// 创建密匙
- (NSData *)yj_ctreatAKeyData;

@end


<|start_filename|>YJCategories/UIKit/UIButton/UIButton+YJSuperExt.h<|end_filename|>
//
//  UIButton+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIButton (YJSuperExt)

/** 倒计时Btn */
- (void)yj_startCountDownTime:(NSInteger )timeout title:(NSString *)tittle waitTittle:(NSString *)waitTittle;

/**
 *  倒计时按钮
 *  @param timeLine 倒计时总时间
 *  @param title    还没倒计时的title
 *  @param subTitle 倒计时中的子名字，如时、分
 *  @param mColor   还没倒计时的颜色
 *  @param color    倒计时中的颜色
 */
- (void)yj_startWithTime:(NSInteger)timeLine
                   title:(NSString *)title
          countDownTitle:(NSString *)subTitle
               mainColor:(UIColor *)mColor
              countColor:(UIColor *)color;

@end


<|start_filename|>YJCategories/Foundation/NSDate/NSDate+YJInternetDateTime.h<|end_filename|>
//
//  NSDate+YJInternetDateTime.h
//  YJCategoriesGather
//
//  Created by hm on 2015/3/13.
//  Copyright © 2015年 stackhou <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, DateFormatHint) {
    DateFormatHintNone,
    DateFormatHintRFC822,
    DateFormatHintRFC3339
};

@interface NSDate (YJInternetDateTime)

// Get date from RFC3339 or RFC822 string
// - A format/specification hint can be used to speed up,
//   otherwise both will be attempted in order to get a date
+ (NSDate *)dateFromInternetDateTimeString:(NSString *)dateString
                                formatHint:(DateFormatHint)hint;

// Get date from a string using a specific date specification
+ (NSDate *)dateFromRFC3339String:(NSString *)dateString;
+ (NSDate *)dateFromRFC822String:(NSString *)dateString;


@end


<|start_filename|>YJCategories/UIKit/UIImage/UIImage+YJReSize.h<|end_filename|>
//
//  UIImage+YJReSize.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (YJReSize)

- (UIImage *)jk_croppedImage:(CGRect)bounds;
- (UIImage *)jk_thumbnailImage:(NSInteger)thumbnailSize
             transparentBorder:(NSUInteger)borderSize
                  cornerRadius:(NSUInteger)cornerRadius
          interpolationQuality:(CGInterpolationQuality)quality;
- (UIImage *)jk_resizedImage:(CGSize)newSize
        interpolationQuality:(CGInterpolationQuality)quality;
- (UIImage *)jk_resizedImageWithContentMode:(UIViewContentMode)contentMode
                                     bounds:(CGSize)bounds
                       interpolationQuality:(CGInterpolationQuality)quality;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJScreenshot.h<|end_filename|>
//
//  UIView+YJScreenshot.h
//  YJCategoriesGather
//
//  Created by YJHou on 2016/2/18.
//  Copyright © 2016年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (YJScreenshot)

/** 生成图片 */
- (UIImage *)imageSreenshot;

/** 截图一个view中所有视图 包括旋转缩放效果(maxWidth 限制缩放的最大宽度 Default=0) */
- (UIImage *)imageScreenshotWithMaxWidth:(CGFloat)maxWidth;

@end


<|start_filename|>YJCategoriesGather/Models/PersonModel.h<|end_filename|>
//
//  PersonModel.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/4/1.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface PersonModel : NSObject

@property (nonatomic, copy) NSString *name; /**< 名字 */
@property (nonatomic, strong) NSNumber *height; /**< 身高 */

@end


<|start_filename|>YJCategories/Foundation/NSObject/NSObject+YJSuperExt.h<|end_filename|>
//
//  NSObject+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (YJSuperExt)

/** 模型是否包含空对象值nil */
- (BOOL)isContainsNilObject;

/** 交换对象方法 */
+ (void)yj_exchangeInstanceMethod1:(SEL)method1 method2:(SEL)method2;
/** 交换类方法 */
+ (void)yj_exchangeClassMethod1:(SEL)method1 method2:(SEL)method2;

/** 执行 > 2 参数的方法签名 */
-(id)performSelector:(SEL)aSelector withObjectsYJ_Ext:(NSArray *)objects;

/**
 po 打印模型

 @return 模型String
 */
- (NSString *)debugDescription;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJShake.h<|end_filename|>
//
//  UIView+YJShake.h
//  YJCategoriesGather
//
//  Created by YJHou on 2016/2/18.
//  Copyright © 2016年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

/** 摇晃的方向 */
typedef NS_ENUM(NSInteger, YJShakeDirectionType) {
    YJShakeDirectionHorizontal = 0,  // 水平
    YJShakeDirectionVertical         // 竖直
};

@interface UIView (YJShake)

/** 默认参数配置Shake */
- (void)yj_shakeDefaultHorizontal;

/** 设置水平摇晃的 次数times和幅度offset Block */
- (void)yj_shakeHorizontalWithTimes:(int)times offset:(CGFloat)offset completion:(void(^)())completion;

/** 晃动 相关参数配置 */
- (void)yj_shakeWithTimes:(int)times offset:(CGFloat)offset speed:(NSTimeInterval)speed shakeDirection:(YJShakeDirectionType)shakeDirection completion:(void (^)(void))completion;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJLoadNib.h<|end_filename|>
//
//  UIView+YJLoadNib.h
//  YJCategoriesGather
//
//  Created by YJHou on 2016/2/18.
//  Copyright © 2016年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (YJLoadNib)

/** 根据 View 获取自身的 nib */
+ (UINib *)loadNib;

/** 根据 nibName 获取 Nib */
+ (UINib *)loadNibNamed:(NSString *)nibName bundle:(NSBundle *)bundle;

/** 实例化View Form Nib*/
+ (UIView *)loadInstanceFromNib;

/** 实例化 View 参数nibName:名字  owner:归属*/
+ (UIView *)loadInstanceWithNibName:(NSString *)nibName owner:(id)owner bundle:(NSBundle *)bundle;

@end


<|start_filename|>YJCategories/Foundation/NSObject/NSObject+YJKeyValueObserving.h<|end_filename|>
//
//  NSObject+YJKeyValueObserving.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/5/19.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (YJKeyValueObserving)

@property (nonatomic, strong) NSMutableArray *keyPathObservers; /**< 保存监察者们 @{@"keyPath":observer}*/

/** 安全添加kvo */
- (void)yj_addSafeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath;

/** 安全移除kvo */
- (void)yj_removeSafeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath;

/** 移除本类所有的监听者们 */
- (void)yj_removeSafeAllObservers;

@end


<|start_filename|>YJCategories/UIKit/UIViewController/UIViewController+YJBackButtonBlock.h<|end_filename|>
//
//  UIViewController+YJBackButtonBlock.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//  在点击返回按钮前需要做的操作

#import <UIKit/UIKit.h>

typedef void(^YJBackButtonHandlBlock)(__kindof UIViewController *vc);

@interface UIViewController (YJBackButtonBlock)

/** 返回按钮的预处理操作 */
- (void)yj_backButtonClickBlock:(YJBackButtonHandlBlock)clickBlock;

@end


<|start_filename|>YJCategories/YJCategories.h<|end_filename|>
//
//  YJCategories.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

/** 当前版本: 0.0.9 */

#ifndef YJCategories_h
#define YJCategories_h

#ifdef __OBJC__

    #import "YJUIKit.h"
    #import "YJFoundation.h"
    #import "YJQuartzCore.h"


#endif


#endif /* YJCategories_h */


<|start_filename|>YJCategories/UIKit/UIBarButtonItem/UIBarButtonItem+YJBadge.h<|end_filename|>
//
//  UIBarButtonItem+YJBadge.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIBarButtonItem (YJBadge)

@property (nonatomic, copy) NSString *badgeValue; /**< 显示数值 */

@property (nonatomic, strong) UILabel  *yj_badgeLabel; /**< 角标 */
@property (nonatomic, assign) CGFloat   yj_badgeOriginX; /**< 原坐标x */
@property (nonatomic, assign) CGFloat   yj_badgeOriginY; /**< 原坐标y */
@property (nonatomic, strong) UIColor  *yj_badgeBgColor; /**< 背景色 */
@property (nonatomic, strong) UIColor  *yj_badgeTextColor; /**< 字体色 */
@property (nonatomic, strong) UIFont   *yj_badgeFont; /**< 字体 */

@property (nonatomic, assign) CGFloat   yj_badgeXPadding; /**< XPadding */
@property (nonatomic, assign) CGFloat   yj_badgeYPadding; /**< YPadding */

@property (nonatomic, assign) CGFloat   yj_badgeMinHeight; /**< MinHeight */

@property (nonatomic, assign) BOOL      yj_hideBadgeWhenZero; /**< 为0时隐藏 */
@property (nonatomic, assign) BOOL      yj_animateBadgeEnable; /**< 当数值变化时是否动画 */

@end


<|start_filename|>YJCategories/Foundation/NSURL/NSURL+YJParameters.h<|end_filename|>
//
//  NSURL+YJParameters.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSURL (YJParameters)

/** url参数转字典 */
- (NSDictionary *)yj_dictParameters;


@end


<|start_filename|>YJCategories/Foundation/NSNotificationCenter/NSNotificationCenter+YJMainThread.h<|end_filename|>
//
//  NSNotificationCenter+YJMainThread.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSNotificationCenter (YJMainThread)

/** 在主线程中发送一条通知 */
- (void)postNotificationOnMainThread:(NSNotification *)notification;

/** 在主线程中发送一条通知 携带对象 */
- (void)postNotificationOnMainThreadWithName:(NSString *)name
                                      object:(id)anObject;

/** 在主线程中发送一条通知 携带对象和用户信息 */
- (void)postNotificationOnMainThreadWithName:(NSString *)name
                                      object:(id)anObject
                                    userInfo:(NSDictionary *)userInfo;

@end


<|start_filename|>YJCategories/UIKit/UIImage/UIImage+YJRoundedCorner.h<|end_filename|>
//
//  UIImage+YJRoundedCorner.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (YJRoundedCorner)

- (UIImage *)jk_roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize;

@end


<|start_filename|>YJCategories/UIKit/UIApplication/UIApplication+YJSuperExt.h<|end_filename|>
//
//  UIApplication+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIApplication (YJSuperExt)

/** 开始网络请求指示 */
- (void)yj_startNetworkActivity;

/** 停止网络请求指示 */
- (void)yj_stopNetworkActivity;

/** 键盘的大小 */
- (CGRect)yj_keyboardFrame;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJCornerRadius.h<|end_filename|>
//
//  UIView+YJCornerRadius.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/7/31.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (YJCornerRadius)

/**
 设置圆角

 @param rectCorner 圆角类型
 @param cornerRadius 圆角度数
 */
- (void)yj_setCornerWithRectCorner:(UIRectCorner)rectCorner cornerRadius:(CGFloat)cornerRadius;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJFind.h<|end_filename|>
//
//  UIView+YJFind.h
//  YJCategoriesGather
//
//  Created by YJHou on 2016/2/18.
//  Copyright © 2016年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (YJFind)

/** 找到指定类名的subview子对象 */
- (id)yj_findSubViewWithSubViewClass:(Class)clazz;

/** 找到指定类名的SuperView对象 */
- (id)yj_findSuperViewWithSuperViewClass:(Class)clazz;

/** 找到第一响应者 */
- (UIView *)yj_findFirstResponder;

/** 找到第一响应者并注销 */
- (BOOL)yj_findFirstResponderAndResign;

/** 找到当前view所在的viewcontroler */
- (UIViewController *)yj_findSelfInViewController;

@end


<|start_filename|>YJCategories/Foundation/NSBundle/NSBundle+YJSuperExt.h<|end_filename|>
//
//  NSBundle+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface NSBundle (YJSuperExt)


@end


<|start_filename|>YJCategories/UIKit/UIScrollView/UIScrollView+YJSuperExt.h<|end_filename|>
//
//  UIScrollView+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIScrollView (YJSuperExt)

/** 共多少页 */
- (NSInteger)yj_allPages;

/** 当前是第几页 */
- (NSInteger)yj_currentPage;

/** 滚动百分比 */
- (CGFloat)yj_scrollPercent;

/** x方向上的页数 */
- (CGFloat)yj_pagesX;

/** y方向上的页数 */
- (CGFloat)yj_pagesY;

/** X当前是第几页 */
- (CGFloat)yj_currentPageX;

/** Y当前是第几页 */
- (CGFloat)yj_currentPageY;

/** 设置X方向页数 */
- (void)yj_setPageX:(NSInteger)page animated:(BOOL)animated;

/** 设置Y方向页数 */
- (void)yj_setPageY:(NSInteger)page animated:(BOOL)animated;

@end


<|start_filename|>YJCategories/Foundation/NSString/NSString+YJContains.h<|end_filename|>
//
//  NSString+YJContains.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (YJContains)

/** 是否包含空格 */
- (BOOL)yj_isContainBlank;

/** 是否包含中文 */
- (BOOL)yj_isContainChinese;

/** 是否包含字符 string */
- (BOOL)yj_containsString:(NSString *)string;

/** 是否包含字符集合 set */
- (BOOL)yj_containsCharacterSet:(NSCharacterSet *)set;


@end


<|start_filename|>YJCategories/YJFoundation.h<|end_filename|>
//
//  YJFoundation.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#ifndef YJFoundation_h
#define YJFoundation_h

    #import "NSObject+YJSuperExt.h"
    #import "NSObject+YJKeyValueObserving.h"

//  NSArray
    #import "NSArray+YJSuperExt.h"
    #import "NSArray+YJBlock.h"
    #import "NSArray+YJLog.h"

    #import "NSMutableArray+YJSuperExt.h"

//  NSDictionary
    #import "NSDictionary+YJSuperExt.h"
    #import "NSDictionary+YJMerge.h"
    #import "NSDictionary+YJXML.h"
    #import "NSDictionary+YJLog.h"

//  NSString
    #import "NSString+YJSuperExt.h"
    #import "NSString+YJContains.h"
    #import "NSString+YJPinYin.h"
    #import "NSString+YJSize.h"
    #import "NSString+YJSpecialCharacter.h"
    #import "NSString+YJMIME.h"
    #import "NSString+YJVerification.h"
    #import "NSString+YJXML.h"
    #import "NSString+YJHTML.h"

    #import "NSNotificationCenter+YJMainThread.h"
    #import "NSIndexPath+YJOffset.h"
    #import "NSURL+YJParameters.h"
    #import "NSBundle+YJSuperExt.h"

//  NSData
    #import "NSData+YJGzip.h"
    #import "NSData+YJSuperExt.h"

//  NSDate
    #import "NSDate+YJSuperExt.h"
    #import "NSDate+YJStartEnd.h"
    #import "NSDateFormatter+YJSuperExt.h"

//  NSFileManager
    #import "NSFileManager+YJSuperExt.h"

//  NSTimer
    #import "NSTimer+YJBlock.h"



#endif /* YJFoundation_h */


<|start_filename|>YJCategories/Foundation/NSString/NSString+Hashing.h<|end_filename|>
//
//  NSString+Hashing.h
//  YJMD5AndSoOn
//
//  Created by YJHou on 15/11/28.
//  Copyright © 2015年 YJHou. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Hashing)

#pragma mark - 加密
/** MD5 加密 */
- (NSString *)yj_md5String;

/** SHA1 加密*/
- (NSString *)yj_sha1String;

/** SHA 256 加密 */
- (NSString *)yj_sha256String;

/** SHA 512 加密 */
- (NSString *)yj_sha512String;


#pragma mark - HMAC 加密
/** HMAC MD5 加密 */
- (NSString *)yj_hmacMD5StringWithKey:(NSString *)key;

/**
 *  计算HMAC SHA1 加密 */
- (NSString *)yj_hmacSHA1StringWithKey:(NSString *)key;

/** HMAC SHA256 加密*/
- (NSString *)yj_hmacSHA256StringWithKey:(NSString *)key;

/** HMAC SHA512 加密 */
- (NSString *)yj_hmacSHA512StringWithKey:(NSString *)key;


#pragma mark - 文件加密

/** 文件的MD5 加密*/
- (NSString *)yj_fileMD5Hash;

/** 文件的SHA1 加密 */
- (NSString *)yj_fileSHA1Hash;

/** 文件的SHA256 加密 */
- (NSString *)yj_fileSHA256Hash;

/** 文件的SHA512 加密 */
- (NSString *)yj_fileSHA512Hash;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJDraggable.h<|end_filename|>
//
//  UIView+YJDraggable.h
//  YJCategoriesGather
//
//  Created by YJHou on 2016/2/18.
//  Copyright © 2016年 侯跃军 <EMAIL>. All rights reserved.
//  view 拖拽

#import <UIKit/UIKit.h>

@interface UIView (YJDraggable)

@property (nonatomic, strong) UIPanGestureRecognizer *panGesture; /**< 手势 */

@property (nonatomic, assign) CGRect cagingArea; /**< 拖动区域 */

@property (nonatomic, assign)  CGRect handle; /**< 处理对象 */

@property (nonatomic, assign) BOOL shouldMoveAlongX;  /**< 水平方向 */

@property (nonatomic, assign) BOOL shouldMoveAlongY;  /**< 竖直方向 */

@property (nonatomic, copy) void (^draggingStartedBlock)(UIView *);
@property (nonatomic, copy) void (^draggingMovedBlock)(UIView *);
@property (nonatomic, copy) void (^draggingEndedBlock)(UIView *);

- (void)enableDragging;

- (void)setDraggable:(BOOL)draggable;

@end


<|start_filename|>YJCategories/UIKit/UIWindow/UIWindow+YJSuperExt.h<|end_filename|>
//
//  UIWindow+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIWindow (YJSuperExt)

/** 最底层的控制器 */
- (UIViewController *)yj_topMostController;

/** 当前显示的控制器 */
- (UIViewController *)yj_currentViewController;

+ (UIWindow *)bk_mainWindow;
+ (CGSize)bk_windowSize;

@end


<|start_filename|>YJCategories/UIKit/UIImageView/UIImageView+YJSuperExt.h<|end_filename|>
//
//  UIImageView+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/7.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImageView (YJSuperExt)

/**
 倒影
 */
- (void)yj_reflect;

@end


<|start_filename|>YJCategories/Foundation/NSDictionary/NSDictionary+YJXML.h<|end_filename|>
//
//  NSDictionary+YJXML.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/3/2.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (YJXML)

/** 不带XML声明 不带根节点 */
- (NSString *)yj_xmlString;

/** 默认 <?xml version=\"1.0\" encoding=\"utf-8\"?> 声明   自定义根节点 */
- (NSString*)yj_xmlStringDefaultDeclarationWithRootElement:(NSString *)rootElement;

/** 将NSDictionary转换成XML字符串, 自定义根节点  自定义xml声明 */
- (NSString*)yj_xmlStringWithRootElement:(NSString *)rootElement declaration:(NSString *)declaration;

/** 字典转 plistString*/
- (NSString *)yj_plistString;

/** 转换为plistData类型 */
- (NSData *)yj_plistData;

@end


<|start_filename|>YJCategories/UIKit/UIImage/UIImage+YJAlpha.h<|end_filename|>
//
//  UIImage+YJAlpha.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (YJAlpha)

/**
 *  @brief  是否有alpha通道
 *
 *  @return 是否有alpha通道
 */
- (BOOL)jk_hasAlpha;
/**
 *  @brief  如果没有alpha通道 增加alpha通道
 *
 *  @return 如果没有alpha通道 增加alpha通道
 */
- (UIImage *)jk_imageWithAlpha;
/**
 *  @brief  增加透明边框
 *
 *  @param borderSize 边框尺寸
 *
 *  @return 增加透明边框后的图片
 */
- (UIImage *)jk_transparentBorderImage:(NSUInteger)borderSize;


//http://stackoverflow.com/questions/6521987/crop-uiimage-to-alpha?answertab=oldest#tab-top
/**
 *  @brief  裁切含透明图片为最小大小
 *
 *  @return 裁切后的图片
 */
- (UIImage *)jk_trimmedBetterSize;


@end


<|start_filename|>YJCategories/Foundation/NSAttributedString/NSAttributedString+YJSuperExt.h<|end_filename|>
//
//  NSAttributedString+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by stackhou on 2015/3/17.
//  Copyright © 2015年 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSAttributedString (YJSuperExt)

/**
 由于系统计算富文本的高度不正确 替换方法

 @param width 包容width
 @return height
 */
- (CGFloat)yj_attributedStringHeightWithContainWidth:(CGFloat)width;

@end


<|start_filename|>YJCategoriesGather/ViewController.h<|end_filename|>
//
//  ViewController.h
//  YJCategoriesGather
//
//  Created by YJHou on 2014/11/4.
//  Copyright © 2014年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController


@end



<|start_filename|>YJCategories/Foundation/NSDate/NSDate+YJSuperExt.h<|end_filename|>
//
//  NSDate+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface NSDate (YJSuperExt)

@property (nonatomic, readonly) NSString *yj_shortString;       /**< 2017/2/22 16:26 */
@property (nonatomic, readonly) NSString *yj_shortDateString;   /**< 2017/2/22 */
@property (nonatomic, readonly) NSString *yj_shortTimeString;   /**< 16:28 */

@property (nonatomic, readonly) NSString *yj_mediumString;      /**< 2017年2月22日 16:30:00 */
@property (nonatomic, readonly) NSString *yj_mediumDateString;  /**< 2017年2月22日 */
@property (nonatomic, readonly) NSString *yj_mediumTimeString;  /** 16:46:59 */

@property (nonatomic, readonly) NSString *yj_longString;        /** 2017年2月22日 GMT+8 16:48:38 */
@property (nonatomic, readonly) NSString *yj_longDateString;    /** 2017年2月22日 */
@property (nonatomic, readonly) NSString *yj_longTimeString;    /** GMT+8 16:54:03 */

/** 当前日历 */
+ (NSCalendar *)yj_currentCalendar;

// 日期分解
/** 年、月、日、时、分、秒、周 */
- (NSInteger)yj_year;

- (NSInteger)yj_month;
/** 返回英文月份 如"January" */
+ (NSString *)yj_monthWithMonthNumber:(NSInteger)month;

- (NSInteger)yj_day;
- (NSInteger)yj_nearestHour; // 最接近的一个整点
- (NSInteger)yj_hour;
- (NSInteger)yj_minute;
- (NSInteger)yj_second;

- (NSInteger)yj_nthWeekday; // 该月第几周
- (NSInteger)yj_weekday;    // 1~7 1=Sunday,2=Monday...7=Saturday
/** "星期几" 返回 */
- (NSString *)yj_weekDayString;

/** 使用dateStyle timeStyle格式化时间 */
- (NSString *)yj_stringWithDateStyle:(NSDateFormatterStyle)dateStyle timeStyle:(NSDateFormatterStyle)timeStyle;

/** 根据指定format返回 String 时间 */
- (NSString *)yj_stringWithFormat:(NSString *)format;

#pragma mark -- 从当前日期相对日期时间

/** 增加 dYears 年的时间 */
- (NSDate *)yj_dateByAddingYears:(NSInteger)dYears;

/** 增加 dMonths 月时间 */
- (NSDate *)yj_dateByAddingMonths:(NSInteger)dMonths;

/** 增加几天时间 */
- (NSDate *)yj_dateByAddingDays:(NSUInteger)days;

/** 当前时间增加几个小时 */
- (NSDate *)yj_dateByAddingHours:(NSInteger)dHours;

/** 当前时间增加 dMinutes 分钟 */
- (NSDate *)yj_dateByAddingMinutes:(NSInteger)dMinutes;

#pragma mark - 时间比较
/** 比较年月日是否相等 */
- (BOOL)yj_isEqualToDateIgnoreTime:(NSDate *)aDate;

/** 两个时间的差 */
- (NSDateComponents *)yj_componentsWithOffsetFromDate:(NSDate *)aDate;

// ------ 天 --------
/** 是否是今天 */
- (BOOL)yj_isToday;

/** 是否是明天 */
- (BOOL)yj_isTomorrow;

/** 是否是昨天 */
- (BOOL)yj_isYesterday;
//------- 周 ---------
/** 是否是同一周 */
- (BOOL)yj_isEqualWeekWithDate:(NSDate *)aDate;

/** 是否是本周 */
- (BOOL)yj_isThisWeek;

/** 是否是上一周 */
- (BOOL)yj_isNextWeek;

/** 是否是上一周 */
- (BOOL)yj_isBeforeWeek;

// ------- 月 ------
/** 是否是同一个月 */
- (BOOL)yj_isEqualMonthWithDate:(NSDate *)aDate;

/** 是否是本月 */
- (BOOL)yj_isThisMonth;

/** 是否是上一个月 */
- (BOOL)yj_isBeforeMonth;

/** 是否是下一个月 */
- (BOOL)yj_isNextMonth;

// -------- 年 -----------
/** 是否是同一年 */
- (BOOL)yj_isEqualYearWithDate:(NSDate *)aDate;

/** 是否是今年 */
- (BOOL) jk_isThisYear;

/** 是否是上一年 */
- (BOOL)yj_isBeforeYear;

/** 是否是下一年 */
- (BOOL)yj_isNextYear;

// ------- 早迟比较 ---------
/** 是否早于 aDate  */
- (BOOL)yj_isEarlierThanDate:(NSDate *)aDate;

/** 是否晚于 aDate  */
- (BOOL)yj_isLaterThanDate:(NSDate *)aDate;

/** 是否是周末 */
- (BOOL)yj_isTypicallyWeekend;

/** 是否是工作日 */
- (BOOL)yj_isTypicallyWorkday;

#pragma mark -  时间间隔
/** 时隔 几年 */
- (NSInteger)yj_dateYearAfterDate:(NSDate *)anotherDate;

/** 时间相隔几个月 */
- (NSInteger)yj_dateMonthsAfterDate:(NSDate *)anotherDate;

/** 时间相隔几天 方式一*/
- (NSInteger)jk_dateDaysAfterDate:(NSDate *)anotherDate;

/** aDate 后第几天 方式二 */
- (NSInteger)yj_dateDaysCalculateAfterDate:(NSDate *)aDate;

/** aDate 后多少小时 */
- (NSInteger)yj_dateHoursAfterDate:(NSDate *)aDate;

/** aDate 后多少分钟 */
- (NSInteger)yj_minutesAfterDate:(NSDate *)aDate;

#pragma mark - 类型/时间 判断
/** 判断是否是润年 */
- (BOOL)yj_isLeapYear;

/** 一年有多少天 */
- (NSUInteger)yj_daysInThisYear;

/** 今天是今年的第多少天 */
- (NSUInteger)yj_dayOfThisYear;

/** 这个月有多少天 */
- (NSUInteger)yj_daysInMonth:(NSUInteger)month;

/** date 月有多少天 */
+ (NSUInteger)yj_daysInMonth:(NSDate *)date month:(NSUInteger)month;

/** 该月的第一天 */
- (NSDate *)yj_beginDayOfMonth;

/** 该月的最后一天 */
- (NSDate *)yj_lastDayOfMonth;

/** 返回格式为 YYYY-MM-dd 的日期 */
- (NSString *)yj_dateStringFormatYMD;

/** 时间信息 */
- (NSString *)yj_timeInfo;

/** 根据date 返回字符类型日期 */
+ (NSString *)yj_timeInfoWithDate:(NSDate *)date;

/** 返回时间信息 */
+ (NSString *)yj_timeInfoWithDateString:(NSString *)dateString;

// 秒数时间转换 刚刚 一分钟前 某年某月某日
+ (NSString *)yj_distanceTimeWithBeforeTime:(double)time;









@end


<|start_filename|>YJCategories/Foundation/NSDictionary/NSDictionary+YJMerge.h<|end_filename|>
//
//  NSDictionary+YJMerge.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (YJMerge)

/** 合并两个NSDictionary */
+ (NSDictionary *)margeDictionaryWithDict:(NSDictionary *)dict1
                                     dict:(NSDictionary *)dict2;

/** 合并入一个NSDictionary */
- (NSDictionary *)mergeDictionary:(NSDictionary *)dict;

/** 遍历字典的key-Value键值对并 Return处理结果数组 */
- (NSArray *)yj_dictionaryMapBlock:(id (^)(id key, id value))block;

/** 字典选择器 */
- (NSDictionary *)yj_dictionaryPickForKeys:(NSArray *)keys;

/** 字典移除器 */
- (NSDictionary *)yj_removeObjectsForKeys:(NSArray *)keys;

@end


<|start_filename|>YJCategories/Foundation/NSData/NSData+YJGzip.h<|end_filename|>
//
//  NSData+YJGzip.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSData (YJGzip)

/** GZIP压缩  level 压缩级别*/
- (NSData *)gzippedDataWithCompressionLevel:(float)level;

/** 默认压缩级别为-1 */
- (NSData *)gzippedDataLevelDefault;

/** 解压数据 */
- (NSData *)gunzippedData;

/** 是否是压缩的数据 */
- (BOOL)isGzippedData;

@end


<|start_filename|>YJCategories/UIKit/UIBezierPath/UIBezierPath+YJSymbol.h<|end_filename|>
//
//  UIBezierPath+YJSymbol.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, YJUIBezierPathArrowDirection) {
    kUIBezierPathArrowDirectionNone  = 0,
    kUIBezierPathArrowDirectionRight = 1 << 0,
    kUIBezierPathArrowDirectionLeft  = 1 << 1,
    kUIBezierPathArrowDirectionUp    = 1 << 2,
    kUIBezierPathArrowDirectionDown  = 1 << 3
};

@interface UIBezierPath (YJSymbol)

/** +号 */
+ (UIBezierPath *)yj_customBezierPathOfPlusSymbolWithRect:(CGRect)rect scale:(CGFloat)scale;

/** -减号 */
+ (UIBezierPath *)yj_customBezierPathOfMinusSymbolWithRect:(CGRect)rect scale:(CGFloat)scale;

/** 对号 */
+ (UIBezierPath *)yj_customBezierPathOfCheckSymbolWithRect:(CGRect)rect scale:(CGFloat)scale thick:(CGFloat)thick;

/** x号 */
+ (UIBezierPath *)yj_customBezierPathOfCrossSymbolWithRect:(CGRect)rect scale:(CGFloat)scale thick:(CGFloat)thick;

/** 箭头 */
+ (UIBezierPath *)yj_customBezierPathOfArrowSymbolWithRect:(CGRect)rect scale:(CGFloat)scale thick:(CGFloat)thick direction:(YJUIBezierPathArrowDirection)direction;

/** 铅笔 */
+ (UIBezierPath *)yj_customBezierPathOfPencilSymbolWithRect:(CGRect)rect scale:(CGFloat)scale thick:(CGFloat)thick;

@end


<|start_filename|>YJCategories/UIKit/UIScreen/UIScreen+YJFrame.h<|end_filename|>
//
//  UIScreen+YJFrame.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/8/25.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIScreen (YJFrame)

+ (CGSize)yj_size;

+ (CGFloat)yj_width;
+ (CGFloat)yj_height;

+ (CGSize)yj_orientationSize;
+ (CGFloat)yj_orientationWidth;
+ (CGFloat)yj_orientationHeight;
+ (CGSize)yj_DPISize;

@end


<|start_filename|>YJCategories/Foundation/NSString/NSString+YJXML.h<|end_filename|>
//
//  NSString+YJXML.h
//  YJCategoriesGather
//
//  Created by YJHou on 2014/11/4.
//  Copyright © 2014年 侯跃军 <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (YJXML)

/** xml字符串转换成NSDictionary */
- (NSDictionary *)yj_convertXMLToDictionary;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJConstraints.h<|end_filename|>
//
//  UIView+YJConstraints.h
//  YJCategoriesGather
//
//  Created by YJHou on 2016/2/18.
//  Copyright © 2016年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (YJConstraints)

/** 左约束 */
- (NSLayoutConstraint *)leftConstraint;

/** 右边约束 */
- (NSLayoutConstraint *)rightConstraint;

/** 顶部约束 */
- (NSLayoutConstraint *)topConstraint;

/** 底部约束 */
- (NSLayoutConstraint *)bottomConstraint;

/** leading 约束 */
- (NSLayoutConstraint *)leadingConstraint;

/** 尾部约束 */
- (NSLayoutConstraint *)trailingConstraint;

/** 宽度约束 */
- (NSLayoutConstraint *)widthConstraint;

/** 高度约束 */
- (NSLayoutConstraint *)heightConstraint;

/** 水平中心点约束 */
- (NSLayoutConstraint *)centerXConstraint;

/** 竖直中心点约束 */
- (NSLayoutConstraint *)centerYConstraint;

/** baseLine 约束 */
- (NSLayoutConstraint *)baseLineConstraint;

/** 根据选择属性 返回 View 的约束 */
- (NSLayoutConstraint *)constraintForAttribute:(NSLayoutAttribute)attribute;

@end


<|start_filename|>YJCategories/UIKit/UIViewController/UIViewController+YJFullScreenSupport.h<|end_filename|>
//
//  UIViewController+YJFullScreenSupport.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//  本类通过修改系统控件的Frame, 以便支持满屏

#import <UIKit/UIKit.h>

typedef void(^YJFinishedBlock)(BOOL finished);

@interface UIViewController (YJFullScreenSupport)

/** 显示导航栏 */
- (void)yj_showNavigationBar:(BOOL)animated toStatusBar:(BOOL)toStatusBar duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 隐藏导航栏 */
- (void)yj_hideNavigationBar:(BOOL)animated toStatusBar:(BOOL)toStatusBar duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 移动导航栏 */
- (void)yj_moveNavigtionBar:(CGFloat)deltaY animated:(BOOL)animated toStatusBar:(BOOL)toStatusBar duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 设置导航栏起始位置 */
- (void)yj_setNavigationBarOriginY:(CGFloat)y animated:(BOOL)animated toStatusBar:(BOOL)toStatusBar duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;


/** 显示Toolbar */
- (void)yj_showToolbar:(BOOL)animated duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 隐藏ToolBar */
- (void)yj_hideToolbar:(BOOL)animated duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 移动ToolBar */
- (void)yj_moveToolbar:(CGFloat)deltaY animated:(BOOL)animated duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 设置ToolBar起始位置 */
- (void)yj_setToolbarOriginY:(CGFloat)y animated:(BOOL)animated duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;


/** 显示TabBar */
- (void)yj_showTabBar:(BOOL)animated duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 隐藏TabBar */
- (void)yj_hideTabBar:(BOOL)animated duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 移动TabBar */
- (void)yj_moveTabBar:(CGFloat)deltaY animated:(BOOL)animated duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

/** 设置TabBar起始位置 */
- (void)yj_setTabBarOriginY:(CGFloat)y animated:(BOOL)animated duration:(NSTimeInterval)duration completion:(YJFinishedBlock)completion;

@end


<|start_filename|>YJCategories/Foundation/NSArray/NSArray+YJSafeExt.h<|end_filename|>
//
//  NSArray+YJSafeExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2018/5/15.
//  Copyright © 2018年 stackhou <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSArray (YJSafeExt)

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJFrame.h<|end_filename|>
//
//  UIView+YJFrame.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/20.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

/** 获取 View 中心点 */
CGPoint CGRectGetCenter(CGRect rect);

@interface UIView (YJFrame)

@property (nonatomic, assign) CGPoint origin;        /**< 坐标点 */
@property (nonatomic, assign) CGSize size;           /**< 大小 */

@property (nonatomic, assign) CGFloat x;              /**< 左 */
@property (nonatomic, assign) CGFloat y;              /**< 上 */
@property (nonatomic, assign) CGFloat bottom;         /**< 下 */
@property (nonatomic, assign) CGFloat right;          /**< 右 */
@property (nonatomic, assign) CGFloat width;          /**< 宽 */
@property (nonatomic, assign) CGFloat height;         /**< 高 */

@property (nonatomic, assign) CGPoint leftTop;        /**< 左上 */
@property (nonatomic, assign) CGPoint rightTop;       /**< 右上 */
@property (nonatomic, assign) CGPoint leftBottom;     /**< 左下 */
@property (nonatomic, assign) CGPoint rightBottom;    /**< 右下 */

@property (nonatomic, assign) CGFloat centerX;        /**< 中心点X */
@property (nonatomic, assign) CGFloat centerY;        /**< 中心点Y */

/** 移动 */
- (void)yj_moveOriginToPoint:(CGPoint)point;
/** 缩放 */
- (void)yj_scaleWidth:(CGFloat)widthFactor height:(CGFloat)heightFactor;
/** 适应缩放 */
- (void)yj_fitScaleInSize:(CGSize)size;


@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJRecursion.h<|end_filename|>
//
//  UIView+YJRecursion.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/4/27.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//  UIView 递归分类

#import <UIKit/UIKit.h>

typedef void (^YJSubviewBlock) (UIView *view);
typedef void (^YJSuperviewBlock) (UIView *superview);

@interface UIView (YJRecursion)

/** 所有 SubView 都执行Block */
- (void)subViewsAllExecuteBlock:(YJSubviewBlock)block;

/** 所有 SuperView 都执行Block */
-(void)superViewsAllExecuteBlock:(YJSuperviewBlock)block;

/** 所有 SubView Control 设为 Enable  */
- (void)subViewsAllControlsEnable:(BOOL)enable;

/** 递归寻找子视图 */
- (UIView *)findSubViewRecursively:(BOOL(^)(UIView *subview, BOOL *stop))recurse;

@end


<|start_filename|>YJCategories/Foundation/NSString/NSString+YJSuperExt.h<|end_filename|>
//
//  NSString+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

/** 匹配字符串的相似度 */
typedef NS_OPTIONS(NSUInteger, YJNSStringScoreOption) {
    YJNSStringScoreOptionNone                     = 1 << 0,
    YJNSStringScoreOptionFavorSmallerWords        = 1 << 1,
    YJNSStringScoreOptionReducedLongStringPenalty = 1 << 2
};

@interface NSString (YJSuperExt)

/** 安全取出非nilString, 避免显示(null) */
+ (NSString *)safeString:(NSString *)string;

#pragma mark - 装换Convert

/** NSString -> NSDictionary */
- (NSDictionary *)yj_convertToDictionary;

#pragma mark - remove
/** 移除字符串中的所有空白 */
- (NSString *)yj_removeBlank;
/** 清除html标签 */
- (NSString *)yj_stringByStrippingHTML;
/** 清除js脚本 */
- (NSString *)yj_stringByRemovingScriptsAndStrippingHTML;

/** 将字符串Url里面的参数解析出来 */
- (NSDictionary *)yj_parameterDictionary;

/** 翻转字符串 abc -> cba*/
- (NSString *)yj_reverseString;

/** Unicode编码的字符串转成NSString */
- (NSString *)yj_makeUnicodeToString;

/** 字符数量 */
- (int)yj_wordsCount;

/** 精准分段 功能特性如下：1、分页比较准确 2、根据CGRect来计算页数 3、利用多线程加载和分页 */
- (NSArray *)yj_getPagesOfString:(NSString *)string
                            font:(UIFont*)font
                          inRect:(CGRect)rect;

/** 字符串的匹配相似度 */
- (CGFloat)yj_scoreAgainst:(NSString *)anotherString fuzziness:(NSNumber *)fuzziness options:(YJNSStringScoreOption)options;

/** 设置WebView类型的自提样式 colorStr=#ffffff */
- (NSString *)yj_setWebViewWithString:(NSString *)str font:(float)size color:(NSString *)colorStr;

- (NSString *)yj_getterToSetter;

- (NSString *)yj_setterToGetter;

- (NSString *)yj_removeHtmlTags;
- (BOOL)yj_has4ByteChar;
- (BOOL)yj_isAsciiString;
- (NSString *)yj_MD5Hex;
- (NSData *)yj_hexStringToData;


/**
 格式化字符串内部实现

 @param format 格式
 @return 格式化后的字符串
 */
- (NSString *)yj_stringWithFormat:(NSString *)format, ...;

/**
 将浮点数转换成字符串
 实现：有小数点就显示，最多2位

 @param floatValue 浮点值
 @return 格式化好的String
 */
+ (NSString *)yj_floatToString:(CGFloat)floatValue;

/**
 分割字符串

 @param string original
 @param interval 每隔几个字符分割
 @param separateString 用来分割的字符串
 @param separateCount 分割字符每次添加几次
 @return result
 */
- (NSString *)yj_formatString:(NSString *)string
                     interval:(NSInteger)interval
               separateString:(NSString *)separateString
                separateCount:(NSInteger)separateCount;

/**
 获取随机 length 的字符串

 @param length 长度
 @return result
 */
+ (instancetype)yj_randomStringWithoutDigitalWithLength:(int)length;


@end


<|start_filename|>YJCategories/UIKit/UIImageView/UIImageView+YJCornerRadius.h<|end_filename|>
//
//  UIImageView+YJCornerRadius.h
//  YJCategoriesGather
//
//  Created by YJHou on 2017/8/1.
//  Copyright © 2017年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImageView (YJCornerRadius)

- (instancetype)initWithCornerRadiusAdvance:(CGFloat)cornerRadius rectCornerType:(UIRectCorner)rectCornerType;

- (void)yj_cornerRadiusAdvance:(CGFloat)cornerRadius rectCornerType:(UIRectCorner)rectCornerType;

- (instancetype)initWithRoundingRectImageView;

- (void)yj_cornerRadiusRoundingRect;

- (void)yj_attachBorderWidth:(CGFloat)width color:(UIColor *)color;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJGestureBlock.h<|end_filename|>
//
//  UIView+YJGestureBlock.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/4/27.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void (^YJGestureActionBlock)(UIGestureRecognizer *gestureRecoginzer);

@interface UIView (YJGestureBlock)

/** 添加 Tap 手势 */
- (void)addTapGestureWithBlock:(YJGestureActionBlock)block;

/** 添加 LongPressGesture 手势 */
- (void)addLongPressGestureWithBlock:(YJGestureActionBlock)block;

@end


<|start_filename|>YJCategories/Foundation/NSThread/NSThread+YJSuperExt.h<|end_filename|>
//
//  NSThread+YJSuperExt.h
//  YJCategoriesGather
//
//  Created by hyj on 2020/8/17.
//  Copyright © 2020 stackhou <EMAIL>. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSThread (YJSuperExt)

+ (BOOL)yj_isMainQueue;

@end

NS_ASSUME_NONNULL_END


<|start_filename|>YJCategories/Foundation/NSDate/NSDate+YJStartEnd.h<|end_filename|>
//
//  NSDate+YJStartEnd.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface NSDate (YJStartEnd)

/** 当前日历 */
+ (NSCalendar *)yj_currentCalendarForStartEnd;

#pragma mark - 时间的开始和结束
/** 某天的0点0分0秒 */
- (NSDate *)yj_dateAtStartOfDay;

/** 某天的23点59分59秒 */
- (NSDate *)yj_dateAtEndOfDay;

/** 该日期的周开始日期 */
- (NSDate *)yj_dateAtStartOfWeek;

/** 该日期的周结束日期 */
- (NSDate *)yj_dateAtEndOfWeek;

/** 该月的开始 */
- (NSDate *)yj_dateAtStartOfMonth;

/** 该月的结束 */
- (NSDate *)yj_dateAtEndOfMonth;

/** 该年的第一天 */
- (NSDate *)yj_dateAtStartOfYear;

/** 该年的最后一天 */
- (NSDate *)yj_dateAtEndOfYear;


@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJCustomBorder.h<|end_filename|>
//
//  UIView+YJCustomBorder.h
//  YJCategoriesGather
//
//  Created by YJHou on 2016/2/18.
//  Copyright © 2016年 侯跃军 <EMAIL>. All rights reserved.
//  给视图添加自定义Border边框

#import <UIKit/UIKit.h>

typedef NS_OPTIONS(NSUInteger, YJExcludePointType) {
    YJExcludePointStart = 1 << 0,
    YJExcludePointEnd   = 1 << 1,
    YJExcludePointAll   = ~0UL    // 无符号长整型 0, ~表示按位取反, 即: 0xffff
};

@interface UIView (YJCustomBorder)

#pragma mark - Add Line
/** 顶部添加Border边框 无删除  */
- (void)yj_addTopBorderWithColor:(UIColor *)color width:(CGFloat)width;
/** Top 添加 边框 */
- (void)yj_addTopBorderWithColor:(UIColor *)color
                           width:(CGFloat)width
                   excludeLength:(CGFloat)length
                excludePointType:(YJExcludePointType)excludeType;

#pragma mark - Left
/** Left添加Border边框 无删除 */
- (void)yj_addLeftBorderWithColor:(UIColor *)color width:(CGFloat)width;
/** Left添加Border边框 */
- (void)yj_addLeftBorderWithColor:(UIColor *)color
                            width:(CGFloat)width
                    excludeLength:(CGFloat)length
                 excludePointType:(YJExcludePointType)excludeType;

#pragma mark - Bottom
/** Bottom添加Border边框 无删除 */
- (void)yj_addBottomBorderWithColor:(UIColor *)color width:(CGFloat)width;
/** Bottom添加Border边框 */
- (void)yj_addBottomBorderWithColor:(UIColor *)color
                              width:(CGFloat)width
                      excludeLength:(CGFloat)length
                   excludePointType:(YJExcludePointType)excludeType;

#pragma mark - Right
/** Right添加Border边框 无删除 */
- (void)yj_addRightBorderWithColor:(UIColor *)color width:(CGFloat)width;
/** Right添加Border边框 */
- (void)yj_addRightBorderWithColor:(UIColor *)color
                             width:(CGFloat)width
                     excludeLength:(CGFloat)length
                  excludePointType:(YJExcludePointType)excludeType;


#pragma mark - Remove
/** 移除顶部的Border */
- (void)yj_removeTopBorder;

/** 移除Left的Border */
- (void)yj_removeLeftBorder;

/** 移除Bottom的Border */
- (void)yj_removeBottomBorder;

/** 移除Right的Border */
- (void)yj_removeRightBorder;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJVisuals.h<|end_filename|>
//
//  UIView+YJVisuals.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/20.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//  显示效果分类

#import <UIKit/UIKit.h>

@interface UIView (YJVisuals)

/** 设置圆角和边框 */
- (void)yj_cornerRadius:(CGFloat)radius
                  color:(UIColor *)color
            borderWidth:(CGFloat)borderWidth;

/** 设置阴影 */
- (void)yj_shadowWithColor:(UIColor *)shadowColor
                    offset:(CGSize)offset
                   opacity:(CGFloat)opacity
                    radius:(CGFloat)radius;

/** 从父视图动画消失 */
-(void)yj_removeFromSuperviewWithFadeDuration:(NSTimeInterval)duration completion:(void (^)(BOOL finished))completion;

/** 动画添加呈现视图 一般用不到，比较low*/
- (void)yj_addSubview:(UIView *)subview transition:(UIViewAnimationTransition)transition duration:(NSTimeInterval)duration;

/** 旋转参数设置 angle=角度 duration=时间 autoreverse=自动重复 repeatCount=重复次数 */
- (void)yj_rotateByAngle:(CGFloat)angle
                duration:(NSTimeInterval)duration
             autoreverse:(BOOL)autoreverse
             repeatCount:(CGFloat)repeatCount
          timingFunction:(CAMediaTimingFunction *)timingFunction;

/** 移动视图相关参数设置 newPoint=新位置 duration=时间 autoreverse=自动重复 repeatCount=重复次数*/
- (void)yj_moveToPoint:(CGPoint)newPoint
              duration:(NSTimeInterval)duration
           autoreverse:(BOOL)autoreverse
           repeatCount:(CGFloat)repeatCount
        timingFunction:(CAMediaTimingFunction *)timingFunction;

@end


<|start_filename|>YJCategories/UIKit/UIButton/UIButton+YJImagePosition.h<|end_filename|>
//
//  UIButton+YJImagePosition.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, YJButtomImagePosition) {
    YJButtomImagePositionLeft   = 0,
    YJButtomImagePositionRight,
    YJButtomImagePositionTop,
    YJButtomImagePositionBottom,
};

@interface UIButton (YJImagePosition)

/** 设置图片和image的位置 */
- (void)yj_setImagePosition:(YJButtomImagePosition)postion spacing:(CGFloat)spacing;

@end


<|start_filename|>YJCategories/UIKit/UIView/UIView+YJAnimation.h<|end_filename|>
//
//  UIView+YJAnimation.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/20.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (YJAnimation)

/** 动画添加子视图 */
- (void)yj_addSubviewWithFadeAnimation:(UIView *)subview
                              duration:(NSTimeInterval)duration
                            completion:(void (^)(BOOL finished))completion;

#pragma mark - Effects
/** 脉冲式 动画 */
- (void)yj_pulseDuration:(NSTimeInterval)duration continuously:(BOOL)continuously;

/** 改变alpaca */
- (void)yj_changeAlpha:(float)newAlpha duration:(NSTimeInterval)duration completion:(void (^)(BOOL finished))completion;

#pragma mark - Transitions
/** 旋转变小消失 */
- (void)yj_rotateRemoveDuration:(NSTimeInterval)duration;

#pragma mark - Transforms
/** 是否顺时针不停旋转 */
- (void)yj_rotateClockwise:(BOOL)clockwise duration:(NSTimeInterval)duration;

/** 动态旋转 degrees=度数 */
- (void)yj_rotateDegrees:(CGFloat)degrees duration:(NSTimeInterval)duration completion:(void (^)(BOOL finished))completion;

/** 缩放动画 scaleX 和 scaleY 取值 0~Max*/
- (void)yj_scaleDuration:(NSTimeInterval)duration x:(CGFloat)scaleX y:(CGFloat)scaleY completion:(void (^)(BOOL finished))completion;

#pragma mark - Moves

/** 动态移动到 snapBack=是否回弹 snapBackOffset=回弹幅度*/
- (void)yj_moveTostopPoint:(CGPoint)destination duration:(NSTimeInterval)duration snapBack:(BOOL)snapBack snapBackOffset:(CGFloat)snapBackOffset completion:(void (^)(BOOL finished))completion;


@end


<|start_filename|>YJCategories/UIKit/UIControl/UIControl+YJBlock.h<|end_filename|>
//
//  UIControl+YJBlock.h
//  YJCategoriesGather
//
//  Created by YJHou on 2015/3/17.
//  Copyright © 2015年 侯跃军 <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIControl (YJBlock)

/** 添加Block 事件 */
- (void)yj_addControlBlock:(void (^)(__kindof UIControl *sender))block events:(UIControlEvents)events;

@end


<|start_filename|>YJCategories/UIKit/UIViewController/UIViewController+YJCyclePushLimit.h<|end_filename|>
//
//  UIViewController+YJCyclePushLimit.h
//  YJCategoriesGather
//
//  Created by hm on 2015/5/11.
//  Copyright © 2015年 stackhou <EMAIL>. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIViewController (YJCyclePushLimit)

/**
 限制同一个控制器重复加载的次数 默认 return 0 不受控制

 @return 控制器加载的最大限度
 */
+ (NSUInteger)yj_cyclePushLimitNumber;

@end
