Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9166569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:10:51+00:00 2026-06-17T15:10:51+00:00

I have an UICollectionView where I am reusing many UICollectionViewCells with product information, think

  • 0

I have an UICollectionView where I am reusing many UICollectionViewCells with product information, think of Pinterest.

But it comes to a point where I have a price tag and would like to rotate the price ribbon about 45 degrees for everyone of the cells.

please note the green price ribbon

What would be the best performance wise method to achieve that?

I have tried with:

#import <QuartzCore/QuartzCore.h>

@interface ItemCollectionViewCell : UICollectionViewCell

@property (weak, nonatomic) IBOutlet UILabel *price;

@end


@implementation ItemCollectionViewCell

@synthesize price;

- (void)awakeFromNib {
    price.layer.transform = CATransform3DMakeRotation(M_PI_4, 0, 0, 1);
    price.layer.transform = CATransform3DTranslate(price.transform, 25, -15, 0);
    price.layer.shouldRasterize = YES;
}

@end

But the overall result as scrolling and pushing new views into the navigation controller is really slow.

Update

  • It seems that iOS6 Autolayout is the main cause for the performance decrease, but I still don’t know how to fix this or remove autolayout only for the price label.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:10:52+00:00Added an answer on June 17, 2026 at 3:10 pm

    What worked for me was to remove the attributes defined by iOS6 autoLayout feature inside the UICollectionViewCell where it sets constraints for the price label, being:

    - (void)awakeFromNib {
    
        NSMutableArray* cons = [NSMutableArray array];
        //iterating through UICollectionViewCell constraint list
        for (NSLayoutConstraint* con in self.constraints) {
            //if the target constraint is `price` then add that to the array
            if (con.firstItem == price || con.secondItem == price) {
                [cons addObject:con];
            }
        }
        //remove the unwanted constraints array to the UICollectionViewCell
        [self removeConstraints:cons];
    
        //ready to roll…
        price.layer.transform = CATransform3DMakeRotation(M_PI_4, 0, 0, 1);
        price.layer.transform = CATransform3DTranslate(price.transform, 25, -15, 0);
        price.layer.shouldRasterize = YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UICollectionView , and it works great, but I have a doubt.
I have created a UICollectionView and would like to have all the cells shake
I recently started playing with the awesome UICollectionView API, making reasonable progress, but have
I have a UICollectionView , but the same methods should apply to UITableViews .
I have a UICollectionView which uses UICollectionViewDelegateFlowLayout . I've added a method which changes
I have a UICollectionView showing several items. I also have an edit button in
There are cases when you have many UI updates due a massive amount of
have been using no DOCTYPE but rather simply starting with <html> as per HTML5
I have a UICollectionView where I represent data taken from a SQLite database. When
I have a UICollectionView which shows photos. I have created the collectionview using UICollectionViewFlowLayout

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.