Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2005c6a

Browse files
author
Jim Puls
committed
Documentation updates
1 parenta1bc380 commit2005c6a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Xcode 5 has an awesome new feature called "[asset catalogs](https://developer.ap
1212

1313
Unfortunately, to get the full benefits, you have to set your deployment target to iOS 7; otherwise, Xcode will dutifully put all of the images into your app bundle but totally ignore all of your resizable insets with only a build warning.
1414

15-
And even if you're targeting iOS 7, you'll still have to deal with typing string filenames correctly. And[everybody knows that stringly-typed code is bad.](http://c2.com/cgi/wiki?StringlyTyped)
15+
And even if you're targeting iOS 7, you'll still have to deal with typing string filenames correctly. And[everybody knows that stringly-typed code is bad.](http://c2.com/cgi/wiki?StringlyTyped) (While you're at it, consider replacing your stringly-typed key paths with[a macro to check them at compile time!](https://gist.github.com/kyleve/8213806))
1616

1717
But shucks! The important and awesome part is the editor, and it puts all of the data out in super-readable JSON. We should be able to do a poor man's version that reads in the data and spits out some code to give you most of the benefits.
1818

@@ -48,13 +48,13 @@ At least I think so. But if you go and search for more information on storyboard
4848

4949
[![Storyboard haters](Documentation/storyboardhaters.png)](http://stackoverflow.com/a/19457257/6010)
5050

51-
We already fixed the part about code reuse with`objc-colordump`, and now we can fix the parts about failures at runtime. If we generate some code to turn your string identifiersinto compiler-checked constants, we can avoid a whole class of problems.
51+
We already fixed the part about code reuse with`objc-colordump`, and now we can fix the parts about failures at runtime. If we generate some code to turn your string identifiers—and that's any kind of string identifier, be it a view controller identifier, a segue identifier, or a cell reuse identifier—into compiler-checked constants, we can avoid a whole class of problems.
5252

5353
###Usage
5454

5555
Call`objc-identifierconstants` with the`.storyboard` paths as arguments from the directory into which it should output the code.
5656

57-
For a storyboard named "Foo" withstring identifiers"Bar" and "Baz" somewhere in it, you'll get`FooStoryboardIdenfitiers.h` and`FooStoryboardIdentifiers.m` with`extern NSString *const FooStoryboardBarIdentifier` and`extern NSString *const FooStoryboardBazIdentifier` in it. Put them in your DerivedSources folder and you're good to go.
57+
For a storyboard named "Foo" withview controller identifier"Bar" and segue identifier "Baz" somewhere in it, you'll get`FooStoryboardIdenfitiers.h` and`FooStoryboardIdentifiers.m` with`extern NSString *const FooStoryboardBarIdentifier` and`extern NSString *const FooStoryboardBazIdentifier` in it. Put them in your DerivedSources folder and you're good to go.
5858

5959
##Command-line options (common to all three tools)
6060

‎codegenutils.xcodeproj/project.xcworkspace/xcshareddata/codegenutils.xccheckout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
66
<false/>
77
<key>IDESourceControlProjectIdentifier</key>
8-
<string>F2A2CD3B-CF92-456B-A6D1-521122A0B09F</string>
8+
<string>BE458A6D-99D5-4693-A8EE-24D91F3893FE</string>
99
<key>IDESourceControlProjectName</key>
1010
<string>codegenutils</string>
1111
<key>IDESourceControlProjectOriginsDictionary</key>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp