Skip to content

Commit 297391a

Browse files
author
Jim Puls
committed
Support storyboard names with spaces
1 parent 44e38a8 commit 297391a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

identifierconstants/IDStoryboardDumper.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ + (NSString *)inputFileExtension;
2727
- (void)startWithCompletionHandler:(dispatch_block_t)completionBlock;
2828
{
2929
self.skipClassDeclaration = YES;
30-
NSString *storyboardName = [[[self.inputURL lastPathComponent] stringByDeletingPathExtension]stringByReplacingOccurrencesOfString:@" " withString:@""];
30+
NSString *storyboardFilename = [[self.inputURL lastPathComponent] stringByDeletingPathExtension];
31+
NSString *storyboardName = [storyboardFilename stringByReplacingOccurrencesOfString:@" " withString:@""];
3132

3233
self.className = [NSString stringWithFormat:@"%@%@StoryboardIdentifiers", self.classPrefix, storyboardName];
3334
NSError *error = nil;
@@ -45,7 +46,7 @@ - (void)startWithCompletionHandler:(dispatch_block_t)completionBlock;
4546
self.implementationContents = [NSMutableArray array];
4647

4748
NSMutableDictionary *uniqueKeys = [NSMutableDictionary dictionary];
48-
uniqueKeys[[NSString stringWithFormat:@"%@%@StoryboardName", self.classPrefix, storyboardName]] = storyboardName;
49+
uniqueKeys[[NSString stringWithFormat:@"%@%@StoryboardName", self.classPrefix, storyboardName]] = storyboardFilename;
4950

5051
for (NSString *identifier in identifiers) {
5152
NSString *key = [NSString stringWithFormat:@"%@%@Storyboard%@Identifier", self.classPrefix, storyboardName, [identifier IDS_titlecaseString]];

0 commit comments

Comments
 (0)