Aaron Wright
8p4 comments posted · 0 followers · following 0
13 years ago @ Berry Insurance Blog - Create a Home Inventory · 1 reply · +1 points
Inventory Your Personal Property http://itunes.apple.com/us/app/id408835192?mt=8
13 years ago @ Social Media SEO - BP Oil Spill Live Feed... · 0 replies · +1 points
13 years ago @ http://linuxoniphone.b... - Nothing much new · 0 replies · +1 points
13 years ago @ iPhone Snippets | Exam... - Shake detect · 0 replies · +1 points
#pragma mark -
#pragma mark Shake Functions
-(BOOL)canBecomeFirstResponder
{
return YES;
}
-(void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:NO];
[self becomeFirstResponder];
}
-(void)viewWillDisappear:(BOOL)animated {
[nameField resignFirstResponder];
[super viewWillDisappear:NO];
}
-(void)viewDidDisappear:(BOOL)animated {
[self resignFirstResponder];
[super viewDidDisappear:NO];
}
-(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion == UIEventSubtypeMotionShake )
{
//shaking started.
//do something when shaking starts
}
}
-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion == UIEventSubtypeMotionShake )
{
// User was shaking the device. Post a notification named "shake".
// do something after shaking stops.
}
}