iOS编程 摇一摇 震动

//

//  ViewController.m

//  autolayout070801

//

//  Created by tianshangrenjian on 15/7/9.

//  Copyright (c) 2015 tianshangrenjian. All rights reserved.

//


#import "ViewController.h"

#import <AVFoundation/AVFoundation.h>

@interface ViewController ()


@end


@implementation ViewController


- (void)viewDidLoad {

    [super viewDidLoad];

    // Do any additional setup after loading the view, typically from a nib.

}


- (void)touchesBegan:(nonnull NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event

{

    AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

}


- (void)motionBegan:(UIEventSubtype)motion withEvent:(nullable UIEvent *)event

{

    NSLog(@"begin motion");

}

- (void)motionEnded:(UIEventSubtype)motion withEvent:(nullable UIEvent *)event

{

    NSLog(@"end motion");

    

}

- (void)didReceiveMemoryWarning {

    [super didReceiveMemoryWarning];

    // Dispose of any resources that can be recreated.

}


@end


阅读更多
文章标签: ios
个人分类: objective-c
上一篇iOS autolayout 页面布局 屏幕适配
下一篇iOS编程 界面布局 纯代码 VFL编写和添加
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭