<pre name="code" class="objc">//
// PublicViewController.m
// slidingTest
//
// Created by rimi on 15/12/3.
// Copyright © 2015年 hxm. All rights reserved.
//
#import "PublicViewController.h"
#import "SldingViewController.h"
#define SCREEN_W [UIScreen mainScreen].bounds.size.width
#define SCREEN_H [UIScreen mainScreen].bounds.size.height
#define MIN_CENTER_X SCREEN_W/6
#define MAX_CENTER_X SCREEN_W/6*4
@interface PublicViewController ()
{
UIButton *okBtn;
SldingViewController *sldingView;
}
@end
@implementation PublicViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor cyanColor];
/**< 初始化按钮 */
okBtn = [UIButton buttonWithType:UIButtonTypeSystem];
okBtn.frame = CGRectMake(SCREEN_W/30, SCREEN_H/1.2, SCREEN_W/10, SCREEN_W/10);
okBtn.backgroundColor = [UIColor whiteColor];
[okBtn setTitle:
iOS UIPanGestureRecognizer(拖动手势) 和 点击按钮 实现类似左抽屉的效果
最新推荐文章于 2022-05-06 11:42:41 发布