1,设置图片内容拉伸
stretchableImageWithLeftCapWidth
+ (instancetype)imageWithStretchableName:(NSString *)imageName
{
UIImage *image = [UIImage imageNamed:imageName];
return [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
}
2.UINavigationController
#pragma mark -当点击tabBar上得plus 按钮的时候调用
- (void)tabbarDidClickPlusButton:(GWTabBar *)tabBar
{
GWCompose *composeVc = [[GWCompose alloc]init];
GWNavigationController *nav = [[GWNavigationController alloc]initWithRootViewController:composeVc];
[self presentViewController:nav animated:YES completion:nil];
}
-(void)btnClick
{
// _isani = !_isani;
[self setUpAnimation];
[self dismissViewControllerAnimated:YES completion:nil];
}
3.滑动手势 UISwipeGestureRecongnizer
- (void)touchMove
{
UISwipeGestureRecognizer *move = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(move)];
move.direction = UISwipeGestureRecognizerDirectionRight;
[self.view addGestureRecognizer:move];
}
- (void)move
{
if (_isani) {
[self animitonWithMiddle];
}
}
typedef NS_OPTIONS(NSUInteger, UISwipeGestureRecognizerDirection) {
UISwipeGestureRecognizerDirectionRight = 1 << 0,
UISwipeGestureRecognizerDirectionLeft = 1 << 1,
UISwipeGestureRecognizerDirectionUp = 1 << 2,
UISwipeGestureRecognizerDirectionDown = 1 << 3
};