ios - why attributes properties in layoutAttributesForItemAtIndexPath does not get applied? -


if modified attribute property in layoutattributesforitematindexpath collectionview cell not modified

-(uicollectionviewlayoutattributes *)layoutattributesforitematindexpath:(nsindexpath *)indexpath 

{ uicollectionviewlayoutattributes *attributes = [super layoutattributesforitematindexpath:indexpath];

//this properties not applied attributes.zindex = 1; attributes.alpha = 0.5;  return attributes; 

}

but when moving properties modifications layoutattributesforelementsinrect gets applied:

-(nsarray *)layoutattributesforelementsinrect:(cgrect)rect 

{ nsarray *attributesarray = [super layoutattributesforelementsinrect:rect];

for (uicollectionviewlayoutattributes *attributes in attributesarray) {     //this properties getting applied here     attributes.zindex = 1;     attributes.alpha = 0.5;  } return attributesarray; 

}

i'am applying uipangesturerecognizer on uicollectionview , want apply these properties on cell i'am dragging .

i'am apple call layoutattributesforitematindexpath method while i'am dragging through calling method

[customlayoutinstance indexofitemselected:indexpath.row]; 

layoutattributesforitematindexpath called long i'am dragging properties not applied.

you should override 1 more method:

- (nsarray *)layoutattributesforelementsinrect:(cgrect)rect {  { 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -