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
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 | |
} |
NewerOlder