ios7 - change the position of textfield inside an expandable uitableview cell in iOS -
hi, new ios , trying have 2 text fields within custom table view cell , cells dynamic, having 2 text fields in each cell , when cell selected cell expand
how can reposition text field when cell expands? 1 text field should on top , other 1 on bottom within tableview cell.how can access uitext field delegate within uitable view delegate i.e.:
textfieldshouldbeginediting within tableview:diddeselectrowatindexpath:indexpath thanks in advance
i suggest having 2 different custom uitableviewcells - 1 viewing , 1 editing. when didselectrowatindexpath called, replace selected cell sec custom cell designed editing. when user finished, replace 1 time again original custom cell type.
for sec question accessing subviews of uitableviewcell, have several options. i'm going assume you're using storyboards.
if created custom class uitableviewcells, can add together uitextview class property , connect outlet storyboard class making iboutlet. way can access via self.nameoftextview.
if don't want create custom class uitableviewcells, can assign subviews tags , access them via (uitextview *)[cell.contentview viewwithtag:1]. sec alternative can used if aren't using storyboards.
uitableview ios7
No comments:
Post a Comment