This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableString *ms = [[NSMutableString alloc] initWithString:@"我是中国人"]; | |
if (CFStringTransform((__bridge CFMutableStringRef)ms, 0, kCFStringTransformMandarinLatin, NO)) { | |
NSLog(@"Pingying: %@", ms); // wǒ shì zhōng guó rén | |
} | |
if (CFStringTransform((__bridge CFMutableStringRef)ms, 0, kCFStringTransformStripDiacritics, NO)) { | |
NSLog(@"Pingying: %@", ms); // wo shi zhong guo ren | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//po [[UIWindow keyWindow] recursiveDescription] //private api | |
// Recursively travel down the view tree, increasing the indentation level for children | |
- (void)dumpView:(UIView *)aView atIndent:(int)indent into:(NSMutableString *)outstring | |
{ | |
for (int i = 0; i < indent; i++) [outstring appendString:@"--"]; | |
[outstring appendFormat:@"[%2d] %@\n", indent, [[aView class] description]]; | |
for (UIView *view in [aView subviews]) | |
[self dumpView:view atIndent:indent + 1 into:outstring]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Make all categories in the current file loadable without using -load-all. | |
* | |
* Normally, compilers will skip linking files that contain only categories. | |
* Adding a call to this macro adds a dummy class, which causes the linker | |
* to add the file. | |
* | |
* @param UNIQUE_NAME A globally unique name. | |
*/ | |
#define MAKE_CATEGORIES_LOADABLE(UNIQUE_NAME) @interface FORCELOAD_##UNIQUE_NAME : NSObject @end @implementation FORCELOAD_##UNIQUE_NAME @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSNull+LCFMessageForwarding.h | |
// NSNull | |
// | |
// Created by leichunfeng on 15/12/22. | |
// Copyright © 2015年 leichunfeng. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface UIScrollView (ScrollsToTop) | |
+ (void)forceNewViewsDefaultValueForScrollsToTop; | |
+ (void)makeOnlyThisScrollViewScrollToTopOnStatusBarTap:(UIScrollView *)scrollView; | |
- (void)makeOnlyThisScrollViewScrollToTopOnStatusBarTap; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "UIImage+Antialiase.h" | |
@implementation UIImage (Antialiase) | |
//创建抗锯齿头像 | |
- (UIImage*)antialiasedImage{ | |
return [self antialiasedImageOfSize:self.size scale:self.scale]; | |
} | |
//创建抗锯齿头像,并调整大小和缩放比。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// LLImageLogger.h | |
// ImageLogger | |
// | |
// Created by Damien DeVille on 3/27/14. | |
// Copyright (c) 2014 Damien DeVille. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIImage+RoundedCorner.h | |
// SelectTags | |
// | |
// Created by jm on 16/2/22. | |
// Copyright © 2016年 Jim. All rights reserved. | |
// | |
//生成带圆角的图片 | |
#import <UIKit/UIKit.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSObject+DLIntrospection.h | |
// DLIntrospection | |
// | |
// Created by Denis Lebedev on 12/27/12. | |
// Copyright (c) 2012 Denis Lebedev. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
OlderNewer