diff options
| author | mo khan <mo@mokhan.ca> | 2013-06-12 20:33:25 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-06-12 20:33:25 -0600 |
| commit | 53655afdb566bf7e442481fb5ca359b91336a89f (patch) | |
| tree | 45894e998b1af67b104b201e911e31c2d535112e | |
| parent | e8bcf8c913973d1b846927f2e2f7e2f8d10498d7 (diff) | |
connect outlet to ball and hookup on touch event handler
| -rw-r--r-- | Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate | bin | 12228 -> 15584 bytes | |||
| -rw-r--r-- | Wobble/ViewController.h | 4 | ||||
| -rw-r--r-- | Wobble/ViewController.m | 6 | ||||
| -rw-r--r-- | Wobble/en.lproj/ViewController.xib | 66 |
4 files changed, 51 insertions, 25 deletions
diff --git a/Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate b/Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate Binary files differindex 4746fca..99c0195 100644 --- a/Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate +++ b/Wobble.xcodeproj/project.xcworkspace/xcuserdata/mo.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/Wobble/ViewController.h b/Wobble/ViewController.h index 8967094..543b829 100644 --- a/Wobble/ViewController.h +++ b/Wobble/ViewController.h @@ -1,5 +1,7 @@ #import <UIKit/UIKit.h> -@interface ViewController : UIViewController +@class Ball; +@interface ViewController : UIViewController +@property (strong, nonatomic) IBOutlet Ball *ball; @end diff --git a/Wobble/ViewController.m b/Wobble/ViewController.m index 22c449e..7c05d3a 100644 --- a/Wobble/ViewController.m +++ b/Wobble/ViewController.m @@ -1,4 +1,5 @@ #import "ViewController.h" +#import "Ball.h" @interface ViewController () @@ -9,6 +10,11 @@ - (void)viewDidLoad { [super viewDidLoad]; + [self.ball addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTouch:)]]; +} + +-(void)onTouch:(UIGestureRecognizer *)sender +{ } - (void)didReceiveMemoryWarning diff --git a/Wobble/en.lproj/ViewController.xib b/Wobble/en.lproj/ViewController.xib index 9d50f2b..ed850f1 100644 --- a/Wobble/en.lproj/ViewController.xib +++ b/Wobble/en.lproj/ViewController.xib @@ -35,15 +35,14 @@ <reference key="NSNextResponder"/> <int key="NSvFlags">274</int> <array class="NSMutableArray" key="NSSubviews"> - <object class="IBUIView" id="779790879"> + <object class="IBUIView" id="469490776"> <reference key="NSNextResponder" ref="766721923"/> <int key="NSvFlags">274</int> <string key="NSFrame">{{347, 464}, {75, 75}}</string> <reference key="NSSuperview" ref="766721923"/> <reference key="NSWindow"/> - <reference key="NSNextKeyView"/> <string key="NSReuseIdentifierKey">_NS:9</string> - <object class="NSColor" key="IBUIBackgroundColor" id="851125949"> + <object class="NSColor" key="IBUIBackgroundColor" id="708192427"> <int key="NSColorSpace">1</int> <bytes key="NSRGB">MCAwIDAAA</bytes> </object> @@ -53,8 +52,8 @@ <string key="NSFrame">{{0, 20}, {768, 1004}}</string> <reference key="NSSuperview"/> <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="779790879"/> - <reference key="IBUIBackgroundColor" ref="851125949"/> + <reference key="NSNextKeyView" ref="469490776"/> + <reference key="IBUIBackgroundColor" ref="708192427"/> <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"> <int key="IBUIStatusBarStyle">2</int> </object> @@ -71,6 +70,14 @@ </object> <int key="connectionID">3</int> </object> + <object class="IBConnectionRecord"> + <object class="IBCocoaTouchOutletConnection" key="connection"> + <string key="label">ball</string> + <reference key="source" ref="841351856"/> + <reference key="destination" ref="469490776"/> + </object> + <int key="connectionID">20</int> + </object> </array> <object class="IBMutableOrderedSet" key="objectRecords"> <array key="orderedObjects"> @@ -95,8 +102,8 @@ <int key="objectID">2</int> <reference key="object" ref="766721923"/> <array class="NSMutableArray" key="children"> - <object class="IBNSLayoutConstraint" id="1060533727"> - <reference key="firstItem" ref="779790879"/> + <object class="IBNSLayoutConstraint" id="225861706"> + <reference key="firstItem" ref="469490776"/> <int key="firstAttribute">5</int> <int key="relation">0</int> <reference key="secondItem" ref="766721923"/> @@ -111,8 +118,8 @@ <float key="scoringTypeFloat">9</float> <int key="contentType">3</int> </object> - <object class="IBNSLayoutConstraint" id="129332105"> - <reference key="firstItem" ref="779790879"/> + <object class="IBNSLayoutConstraint" id="697746591"> + <reference key="firstItem" ref="469490776"/> <int key="firstAttribute">9</int> <int key="relation">0</int> <reference key="secondItem" ref="766721923"/> @@ -127,8 +134,8 @@ <float key="scoringTypeFloat">22</float> <int key="contentType">2</int> </object> - <object class="IBNSLayoutConstraint" id="82169406"> - <reference key="firstItem" ref="779790879"/> + <object class="IBNSLayoutConstraint" id="926920477"> + <reference key="firstItem" ref="469490776"/> <int key="firstAttribute">3</int> <int key="relation">0</int> <reference key="secondItem" ref="766721923"/> @@ -143,11 +150,11 @@ <float key="scoringTypeFloat">9</float> <int key="contentType">3</int> </object> - <object class="IBNSLayoutConstraint" id="440795979"> + <object class="IBNSLayoutConstraint" id="993091647"> <reference key="firstItem" ref="766721923"/> <int key="firstAttribute">4</int> <int key="relation">0</int> - <reference key="secondItem" ref="779790879"/> + <reference key="secondItem" ref="469490776"/> <int key="secondAttribute">4</int> <float key="multiplier">1</float> <object class="IBLayoutConstant" key="constant"> @@ -159,33 +166,33 @@ <float key="scoringTypeFloat">9</float> <int key="contentType">3</int> </object> - <reference ref="779790879"/> + <reference ref="469490776"/> </array> <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> <int key="objectID">9</int> - <reference key="object" ref="779790879"/> + <reference key="object" ref="469490776"/> <reference key="parent" ref="766721923"/> </object> <object class="IBObjectRecord"> <int key="objectID">16</int> - <reference key="object" ref="440795979"/> + <reference key="object" ref="993091647"/> <reference key="parent" ref="766721923"/> </object> <object class="IBObjectRecord"> <int key="objectID">17</int> - <reference key="object" ref="82169406"/> + <reference key="object" ref="926920477"/> <reference key="parent" ref="766721923"/> </object> <object class="IBObjectRecord"> <int key="objectID">18</int> - <reference key="object" ref="129332105"/> + <reference key="object" ref="697746591"/> <reference key="parent" ref="766721923"/> </object> <object class="IBObjectRecord"> <int key="objectID">19</int> - <reference key="object" ref="1060533727"/> + <reference key="object" ref="225861706"/> <reference key="parent" ref="766721923"/> </object> </array> @@ -201,10 +208,10 @@ <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <array class="NSMutableArray" key="2.IBViewMetadataConstraints"> - <reference ref="440795979"/> - <reference ref="82169406"/> - <reference ref="129332105"/> - <reference ref="1060533727"/> + <reference ref="993091647"/> + <reference ref="926920477"/> + <reference ref="697746591"/> + <reference ref="225861706"/> </array> <string key="9.CustomClassName">Ball</string> <string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> @@ -214,7 +221,7 @@ <nil key="activeLocalization"/> <dictionary class="NSMutableDictionary" key="localizations"/> <nil key="sourceID"/> - <int key="maxID">19</int> + <int key="maxID">20</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <array class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -237,6 +244,17 @@ <object class="IBPartialClassDescription"> <string key="className">ViewController</string> <string key="superclassName">UIViewController</string> + <object class="NSMutableDictionary" key="outlets"> + <string key="NS.key.0">ball</string> + <string key="NS.object.0">Ball</string> + </object> + <object class="NSMutableDictionary" key="toOneOutletInfosByName"> + <string key="NS.key.0">ball</string> + <object class="IBToOneOutletInfo" key="NS.object.0"> + <string key="name">ball</string> + <string key="candidateClassName">Ball</string> + </object> + </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> <string key="minorKey">./Classes/ViewController.h</string> |
