ios - Right to Left UICollectionView using Swift -


i trying implement right left flow of cells in uicollectionview using swift. tried layoutattributesforitematindexpath not work. here method.

func layoutattributesforitematindexpath(indexpath: nsindexpath) -> uicollectionviewlayoutattributes! {      var layoutattributes : uicollectionviewlayoutattributes!     if indexpath.item % 3 == 0 {         layoutattributes.frame = cgrectmake((self.namescollectionview.frame.width * 2)/3 , (self.namescollectionview.frame.width * 2) / 3, self.namescollectionview.frame.width/3, namescollectionview.frame.width/3)     }      return layoutattributes } 

need direction how can achieve right left flow?


Comments