Skip to content

Commit 179fe19

Browse files
committed
Added Dynamics to the NES controller.
1 parent 6b8fda0 commit 179fe19

File tree

3 files changed

+222
-46
lines changed

3 files changed

+222
-46
lines changed

Resources/DRViewController.xib

Lines changed: 179 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
33
<data>
4-
<int key="IBDocument.SystemTarget">1536</int>
5-
<string key="IBDocument.SystemVersion">12C3012</string>
6-
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
7-
<string key="IBDocument.AppKitVersion">1187.34</string>
8-
<string key="IBDocument.HIToolboxVersion">625.00</string>
4+
<int key="IBDocument.SystemTarget">1280</int>
5+
<string key="IBDocument.SystemVersion">14A361c</string>
6+
<string key="IBDocument.InterfaceBuilderVersion">6245</string>
7+
<string key="IBDocument.AppKitVersion">1339</string>
8+
<string key="IBDocument.HIToolboxVersion">755.00</string>
99
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
1010
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
11-
<string key="NS.object.0">1930</string>
11+
<string key="NS.object.0">6238</string>
1212
</object>
1313
<array key="IBDocument.IntegratedClassDependencies">
1414
<string>IBProxyObject</string>
@@ -75,14 +75,14 @@
7575
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
7676
<int key="IBUIContentHorizontalAlignment">0</int>
7777
<int key="IBUIContentVerticalAlignment">0</int>
78-
<object class="NSColor" key="IBUIHighlightedTitleColor" id="220388252">
79-
<int key="NSColorSpace">3</int>
80-
<bytes key="NSWhite">MQA</bytes>
81-
</object>
8278
<object class="NSColor" key="IBUINormalTitleColor">
8379
<int key="NSColorSpace">1</int>
8480
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
8581
</object>
82+
<object class="NSColor" key="IBUIHighlightedTitleColor" id="220388252">
83+
<int key="NSColorSpace">3</int>
84+
<bytes key="NSWhite">MQA</bytes>
85+
</object>
8686
<object class="NSColor" key="IBUINormalTitleShadowColor" id="929615557">
8787
<int key="NSColorSpace">3</int>
8888
<bytes key="NSWhite">MC41AA</bytes>
@@ -91,8 +91,8 @@
9191
<int key="type">2</int>
9292
<double key="pointSize">15</double>
9393
</object>
94-
<object class="NSFont" key="IBUIFont" id="383812841">
95-
<string key="NSName">Helvetica-Bold</string>
94+
<object class="NSFont" key="IBUIFont" id="348569031">
95+
<string key="NSName">HelveticaNeue-Bold</string>
9696
<double key="NSSize">15</double>
9797
<int key="NSfFlags">16</int>
9898
</object>
@@ -109,14 +109,14 @@
109109
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
110110
<int key="IBUIContentHorizontalAlignment">0</int>
111111
<int key="IBUIContentVerticalAlignment">0</int>
112-
<reference key="IBUIHighlightedTitleColor" ref="220388252"/>
113112
<object class="NSColor" key="IBUINormalTitleColor">
114113
<int key="NSColorSpace">1</int>
115114
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
116115
</object>
116+
<reference key="IBUIHighlightedTitleColor" ref="220388252"/>
117117
<reference key="IBUINormalTitleShadowColor" ref="929615557"/>
118118
<reference key="IBUIFontDescription" ref="94280866"/>
119-
<reference key="IBUIFont" ref="383812841"/>
119+
<reference key="IBUIFont" ref="348569031"/>
120120
</object>
121121
<object class="IBUIButton" id="266380791">
122122
<reference key="NSNextResponder" ref="403812303"/>
@@ -130,14 +130,14 @@
130130
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
131131
<int key="IBUIContentHorizontalAlignment">0</int>
132132
<int key="IBUIContentVerticalAlignment">0</int>
133-
<reference key="IBUIHighlightedTitleColor" ref="220388252"/>
134133
<object class="NSColor" key="IBUINormalTitleColor">
135134
<int key="NSColorSpace">1</int>
136135
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
137136
</object>
137+
<reference key="IBUIHighlightedTitleColor" ref="220388252"/>
138138
<reference key="IBUINormalTitleShadowColor" ref="929615557"/>
139139
<reference key="IBUIFontDescription" ref="94280866"/>
140-
<reference key="IBUIFont" ref="383812841"/>
140+
<reference key="IBUIFont" ref="348569031"/>
141141
</object>
142142
<object class="IBUIButton" id="532994162">
143143
<reference key="NSNextResponder" ref="403812303"/>
@@ -151,14 +151,14 @@
151151
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
152152
<int key="IBUIContentHorizontalAlignment">0</int>
153153
<int key="IBUIContentVerticalAlignment">0</int>
154-
<reference key="IBUIHighlightedTitleColor" ref="220388252"/>
155154
<object class="NSColor" key="IBUINormalTitleColor">
156155
<int key="NSColorSpace">1</int>
157156
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
158157
</object>
158+
<reference key="IBUIHighlightedTitleColor" ref="220388252"/>
159159
<reference key="IBUINormalTitleShadowColor" ref="929615557"/>
160160
<reference key="IBUIFontDescription" ref="94280866"/>
161-
<reference key="IBUIFont" ref="383812841"/>
161+
<reference key="IBUIFont" ref="348569031"/>
162162
</object>
163163
</array>
164164
<string key="NSFrame">{{33, 130}, {270, 138}}</string>
@@ -209,11 +209,12 @@
209209
<int key="type">1</int>
210210
<double key="pointSize">17</double>
211211
</object>
212-
<object class="NSFont" key="IBUIFont" id="272516613">
213-
<string key="NSName">Helvetica</string>
212+
<object class="NSFont" key="IBUIFont" id="454402349">
213+
<string key="NSName">HelveticaNeue</string>
214214
<double key="NSSize">17</double>
215215
<int key="NSfFlags">16</int>
216216
</object>
217+
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
217218
</object>
218219
<object class="IBUILabel" id="1007695532">
219220
<reference key="NSNextResponder" ref="774585933"/>
@@ -238,11 +239,12 @@
238239
<int key="type">1</int>
239240
<double key="pointSize">25</double>
240241
</object>
241-
<object class="NSFont" key="IBUIFont" id="686250232">
242-
<string key="NSName">Helvetica</string>
242+
<object class="NSFont" key="IBUIFont" id="893406020">
243+
<string key="NSName">HelveticaNeue</string>
243244
<double key="NSSize">25</double>
244245
<int key="NSfFlags">16</int>
245246
</object>
247+
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
246248
</object>
247249
<object class="IBUILabel" id="788121175">
248250
<reference key="NSNextResponder" ref="774585933"/>
@@ -267,15 +269,15 @@
267269
<float key="IBUIMinimumFontSize">10</float>
268270
<int key="IBUITextAlignment">1</int>
269271
<reference key="IBUIFontDescription" ref="479834827"/>
270-
<reference key="IBUIFont" ref="686250232"/>
272+
<reference key="IBUIFont" ref="893406020"/>
273+
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
271274
</object>
272275
<object class="IBUILabel" id="1058139760">
273276
<reference key="NSNextResponder" ref="774585933"/>
274277
<int key="NSvFlags">293</int>
275278
<string key="NSFrame">{{0, 342}, {320, 118}}</string>
276279
<reference key="NSSuperview" ref="774585933"/>
277280
<reference key="NSWindow"/>
278-
<reference key="NSNextKeyView"/>
279281
<string key="NSReuseIdentifierKey">_NS:9</string>
280282
<bool key="IBUIOpaque">NO</bool>
281283
<bool key="IBUIClipsSubviews">YES</bool>
@@ -289,7 +291,7 @@
289291
<int key="IBUINumberOfLines">0</int>
290292
<int key="IBUITextAlignment">1</int>
291293
<reference key="IBUIFontDescription" ref="742200232"/>
292-
<reference key="IBUIFont" ref="272516613"/>
294+
<reference key="IBUIFont" ref="454402349"/>
293295
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
294296
<double key="preferredMaxLayoutWidth">320</double>
295297
</object>
@@ -304,11 +306,15 @@
304306
</object>
305307
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
306308
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
309+
<object class="IBUISimulatedSizeMetrics" key="IBUISimulatedDestinationMetrics">
310+
<string key="IBUISimulatedSizeMetricsClass">IBUISimulatedFreeformSizeMetricsSentinel</string>
311+
<string key="IBUIDisplayName">Freeform</string>
312+
</object>
307313
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
308314
</object>
309315
</array>
310316
<object class="IBObjectContainer" key="IBDocument.Objects">
311-
<array class="NSMutableArray" key="connectionRecords">
317+
<array key="connectionRecords">
312318
<object class="IBConnectionRecord">
313319
<object class="IBCocoaTouchOutletConnection" key="connection">
314320
<string key="label">view</string>
@@ -333,6 +339,14 @@
333339
</object>
334340
<int key="connectionID">26</int>
335341
</object>
342+
<object class="IBConnectionRecord">
343+
<object class="IBCocoaTouchOutletConnection" key="connection">
344+
<string key="label">guideLabel</string>
345+
<reference key="source" ref="372490531"/>
346+
<reference key="destination" ref="788121175"/>
347+
</object>
348+
<int key="connectionID">30</int>
349+
</object>
336350
<object class="IBConnectionRecord">
337351
<object class="IBCocoaTouchEventConnection" key="connection">
338352
<string key="label">aButtonWasPressed:</string>
@@ -497,7 +511,7 @@
497511
<nil key="activeLocalization"/>
498512
<dictionary class="NSMutableDictionary" key="localizations"/>
499513
<nil key="sourceID"/>
500-
<int key="maxID">29</int>
514+
<int key="maxID">30</int>
501515
</object>
502516
<object class="IBClassDescriber" key="IBDocument.Classes">
503517
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -535,37 +549,172 @@
535549
</dictionary>
536550
<dictionary class="NSMutableDictionary" key="outlets">
537551
<string key="NESControllerView">UIView</string>
552+
<string key="guideLabel">UILabel</string>
538553
<string key="statusLabel">UILabel</string>
539554
</dictionary>
540555
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
541556
<object class="IBToOneOutletInfo" key="NESControllerView">
542557
<string key="name">NESControllerView</string>
543558
<string key="candidateClassName">UIView</string>
544559
</object>
560+
<object class="IBToOneOutletInfo" key="guideLabel">
561+
<string key="name">guideLabel</string>
562+
<string key="candidateClassName">UILabel</string>
563+
</object>
545564
<object class="IBToOneOutletInfo" key="statusLabel">
546565
<string key="name">statusLabel</string>
547566
<string key="candidateClassName">UILabel</string>
548567
</object>
549568
</dictionary>
550569
<object class="IBClassDescriptionSource" key="sourceIdentifier">
551570
<string key="majorKey">IBProjectSource</string>
552-
<string key="minorKey">./Classes/DRViewController.h</string>
571+
<string key="minorKey">../Sources/DRViewController.h</string>
572+
</object>
573+
</object>
574+
<object class="IBPartialClassDescription">
575+
<string key="className">DRViewController</string>
576+
<dictionary class="NSMutableDictionary" key="actions">
577+
<string key="aButtonWasPressed:">id</string>
578+
<string key="advancedModeSwitchValueChanged:">id</string>
579+
<string key="bButtonWasPressed:">id</string>
580+
<string key="enterButtonWasPressed:">id</string>
581+
<string key="nesControllerWasPressed:">id</string>
582+
</dictionary>
583+
<dictionary class="NSMutableDictionary" key="actionInfosByName">
584+
<object class="IBActionInfo" key="aButtonWasPressed:">
585+
<string key="name">aButtonWasPressed:</string>
586+
<string key="candidateClassName">id</string>
587+
</object>
588+
<object class="IBActionInfo" key="advancedModeSwitchValueChanged:">
589+
<string key="name">advancedModeSwitchValueChanged:</string>
590+
<string key="candidateClassName">id</string>
591+
</object>
592+
<object class="IBActionInfo" key="bButtonWasPressed:">
593+
<string key="name">bButtonWasPressed:</string>
594+
<string key="candidateClassName">id</string>
595+
</object>
596+
<object class="IBActionInfo" key="enterButtonWasPressed:">
597+
<string key="name">enterButtonWasPressed:</string>
598+
<string key="candidateClassName">id</string>
599+
</object>
600+
<object class="IBActionInfo" key="nesControllerWasPressed:">
601+
<string key="name">nesControllerWasPressed:</string>
602+
<string key="candidateClassName">id</string>
603+
</object>
604+
</dictionary>
605+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
606+
<string key="majorKey">IBProjectSource</string>
607+
<string key="minorKey">../Sources/DRViewController.m</string>
608+
</object>
609+
</object>
610+
</array>
611+
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
612+
<object class="IBPartialClassDescription">
613+
<string key="className">UIButton</string>
614+
<string key="superclassName">UIControl</string>
615+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
616+
<string key="majorKey">IBFrameworkSource</string>
617+
<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
618+
</object>
619+
</object>
620+
<object class="IBPartialClassDescription">
621+
<string key="className">UIControl</string>
622+
<string key="superclassName">UIView</string>
623+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
624+
<string key="majorKey">IBFrameworkSource</string>
625+
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
626+
</object>
627+
</object>
628+
<object class="IBPartialClassDescription">
629+
<string key="className">UIGestureRecognizer</string>
630+
<string key="superclassName">NSObject</string>
631+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
632+
<string key="majorKey">IBFrameworkSource</string>
633+
<string key="minorKey">UIKit.framework/Headers/UIGestureRecognizer.h</string>
634+
</object>
635+
</object>
636+
<object class="IBPartialClassDescription">
637+
<string key="className">UIImageView</string>
638+
<string key="superclassName">UIView</string>
639+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
640+
<string key="majorKey">IBFrameworkSource</string>
641+
<string key="minorKey">UIKit.framework/Headers/UIImageView.h</string>
642+
</object>
643+
</object>
644+
<object class="IBPartialClassDescription">
645+
<string key="className">UILabel</string>
646+
<string key="superclassName">UIView</string>
647+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
648+
<string key="majorKey">IBFrameworkSource</string>
649+
<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
650+
</object>
651+
</object>
652+
<object class="IBPartialClassDescription">
653+
<string key="className">UIResponder</string>
654+
<string key="superclassName">NSObject</string>
655+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
656+
<string key="majorKey">IBFrameworkSource</string>
657+
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
658+
</object>
659+
</object>
660+
<object class="IBPartialClassDescription">
661+
<string key="className">UISearchBar</string>
662+
<string key="superclassName">UIView</string>
663+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
664+
<string key="majorKey">IBFrameworkSource</string>
665+
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
666+
</object>
667+
</object>
668+
<object class="IBPartialClassDescription">
669+
<string key="className">UISearchDisplayController</string>
670+
<string key="superclassName">NSObject</string>
671+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
672+
<string key="majorKey">IBFrameworkSource</string>
673+
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
674+
</object>
675+
</object>
676+
<object class="IBPartialClassDescription">
677+
<string key="className">UISwitch</string>
678+
<string key="superclassName">UIControl</string>
679+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
680+
<string key="majorKey">IBFrameworkSource</string>
681+
<string key="minorKey">UIKit.framework/Headers/UISwitch.h</string>
682+
</object>
683+
</object>
684+
<object class="IBPartialClassDescription">
685+
<string key="className">UIView</string>
686+
<string key="superclassName">UIResponder</string>
687+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
688+
<string key="majorKey">IBFrameworkSource</string>
689+
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
690+
</object>
691+
</object>
692+
<object class="IBPartialClassDescription">
693+
<string key="className">UIViewController</string>
694+
<string key="superclassName">UIResponder</string>
695+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
696+
<string key="majorKey">IBFrameworkSource</string>
697+
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
553698
</object>
554699
</object>
555700
</array>
556701
</object>
557702
<int key="IBDocument.localizationMode">0</int>
558703
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
704+
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
559705
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
560706
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
561-
<real value="1536" key="NS.object.0"/>
707+
<real value="1280" key="NS.object.0"/>
708+
</object>
709+
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
710+
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
711+
<integer value="4600" key="NS.object.0"/>
562712
</object>
563713
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
564714
<int key="IBDocument.defaultPropertyAccessControl">3</int>
565715
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
566716
<string key="NS.key.0">nes.png</string>
567717
<string key="NS.object.0">{270, 138}</string>
568718
</object>
569-
<string key="IBCocoaTouchPluginVersion">1930</string>
570719
</data>
571720
</archive>

Sources/DRViewController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
@property (weak, nonatomic, readonly) IBOutlet UIView *NESControllerView;
2121
@property (weak, nonatomic, readonly) IBOutlet UILabel *statusLabel;
22+
@property (weak, nonatomic, readonly) IBOutlet UILabel *guideLabel;
2223
@property (nonatomic, readonly) DRKonamiGestureRecognizer* konamiGestureRecognizer;
2324

2425
- (IBAction)aButtonWasPressed:(id)sender;

0 commit comments

Comments
 (0)