-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed support for using system font (using
system
as font name or o…
…mitting font name entirely), and added support for using bold and italic system fonts (`systemBold` and `systemItalic`).
- Loading branch information
Showing
8 changed files
with
105 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// NSArray+ISSAdditions.h | ||
// Part of InterfaCSS - http://www.github.com/tolo/InterfaCSS | ||
// | ||
// Copyright (c) Tobias Löfstrand, Leafnode AB. | ||
// License: MIT - http://www.github.com/tolo/InterfaCSS/blob/master/LICENSE | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface NSArray (ISSAdditions) | ||
|
||
- (NSArray*) iss_flattened; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// NSArray+ISSAdditions.m | ||
// Part of InterfaCSS - http://www.github.com/tolo/InterfaCSS | ||
// | ||
// Copyright (c) Tobias Löfstrand, Leafnode AB. | ||
// License: MIT - http://www.github.com/tolo/InterfaCSS/blob/master/LICENSE | ||
// | ||
|
||
#import "NSArray+ISSAdditions.h" | ||
|
||
#import "NSString+ISSStringAdditions.h" | ||
|
||
static NSArray* flattenArray(NSArray* array) { | ||
NSMutableArray* flattened = [NSMutableArray array]; | ||
for(id e in array) { | ||
if( [e isKindOfClass:NSArray.class] ) { | ||
[flattened addObjectsFromArray:flattenArray(e)]; | ||
} else if( e != [NSNull null] ) { | ||
[flattened addObject:e]; | ||
} | ||
} | ||
return [flattened copy]; | ||
} | ||
|
||
|
||
@implementation NSArray (ISSAdditions) | ||
|
||
- (NSArray*) iss_flattened { | ||
return flattenArray(self); | ||
} | ||
|
||
@end |