如何让一组图片旋转

如何让一组图片旋转  有时候 我们会根据项目的要求  把一个图片以相反的方向旋转以下  
如果让美工在做一个  不是最佳的办法  直接把当前图片翻转以下 就可以 

   “ nextButton.transform = CGAffineTransformScale(nextButton.transform, -11);”


    UIButton *previousButton = [UIButton buttonWithType:101];

    [previousButton setTitle:@"<" forState:UIControlStateNormal];

    previousButton.frame = CGRectMake(0.f, 0.f, 30.f, 80.f);

    previousButton.center = CGPointMake(previousButton.frame.size.width / 2.f, pagingView.center.y);

    [previousButton addTarget:pagingView action:@selector(scrollToPreviousPage) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:previousButton];

    

    UIButton *nextButton = [UIButton buttonWithType:101];

    [nextButton setTitle:@"<" forState:UIControlStateNormal];

    nextButton.transform = CGAffineTransformScale(nextButton.transform, -1, 1);

    nextButton.frame = CGRectMake(0.f, 0.f, 30.f, 80.f);

    nextButton.center = CGPointMake(pagingView.frame.size.width - previousButton.frame.size.width / 2.f, pagingView.center.y);

    [nextButton addTarget:pagingView action:@selector(scrollToNextPage) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:nextButton];


你可能感兴趣的:(如何让一组图片旋转)