Wednesday, 15 May 2013

ios - Creating a custom template in Xcode - how can I make a required option based on a checkbox? -



ios - Creating a custom template in Xcode - how can I make a required option based on a checkbox? -

i trying create custom template in xcode. in templateinfo.plist, key options, have code pasted below. template class more not (but not always) utilize delegation when events occur.

the issue having value @ bottom, requiredoptions. want text box enabled only if withprotocol checkbox checked. however, can't figure out value , type of value use. have tried following:

<true/> (as below) - text box enabled. <string>yes</string> - text box disabled. <integer>1</integer> - text box enabled.

does have ideas else try? improve yet, know of decent reference xcode templates?

i have read through apple's plist manual pages , article @ this website.

<array> <dict> <key>description</key> <string>the name of class create</string> <key>identifier</key> <string>productname</string> <key>name</key> <string>class</string> <key>notpersisted</key> <true/> <key>required</key> <true/> <key>type</key> <string>text</string> </dict> <dict> <key>default</key> <string>false</string> <key>identifier</key> <string>withxib</string> <key>name</key> <string>with xib user interface</string> <key>type</key> <string>checkbox</string> </dict> <dict> <key>description</key> <string>choose whether or not delegate skeleton included.</string> <key>default</key> <string>false</string> <key>identifier</key> <string>withprotocol</string> <key>name</key> <string>with delegate skeleton</string> <key>type</key> <string>checkbox</string> </dict> <dict> <key>description</key> <string>the name of protocol used delegation.</string> <key>identifier</key> <string>protocolname</string> <key>name</key> <string>protocol</string> <key>notpersisted</key> <true/> <key>required</key> <true/> <key>type</key> <string>text</string> <key>requiredoptions</key> <dict> <key>withprotocol</key> <true/> </dict> </dict> </array>

i fixed own problem replacing <true/> <string>true</string>.

ios xcode cocoa-touch templates plist

No comments:

Post a Comment