i have uicollectionview
contains uicollectionviewcell
's. each of these cells has 2 labels, 1 in upper left date of cell, , other monetary amount. have position of both labels set constraints in story board.
the monetary label comes coredata , when first opening app displayed below. http://i.imgur.com/dl4dgih.png
i have button can clicked add new amount whichever cell selected. button saves new amount coredata, , calls self.collection.reloaditemsatindexpaths(self.collection.indexpathsforselecteditems()!)
.
when cell reloads monetary label positioned differently other cells. http://i.imgur.com/tbgo7pi.png
the debugger allowed me see reloaditemsatindexpath
taking me cellforitematindexpath
function , executing cell.dateamount.text = "$\(int(amount))"
.
everything working intended, except label's position getting moved few pixels. suggestions might causing this?
this because made width , height constraints.when font size changed,the content move up(or down).the solution remove them.or fix font size this:
Comments
Post a Comment