ios - How do you hide and show a uiview when cell is selected UITableView -
Actually I want to hide uiview (with the button) until one cell touches it Since then, this UIV brings Vij under the cell with animation (if possible)
Something like this:
I saw it in an app and fell in love with it and I thought it would be a good user experience.
How do I collect this, cheers
Code so far:
- (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath : (NSIndexPath *) IndexPath {UITableViewCell * mycell = [TableView decomputer reusable cell with identifier: @ "cell identifier"]; If (mycell == zero) {mycell = [[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: @ "cellIdentifier"]; } UIView * myview = [[UIView alloc] initWithFrame: CGRectMake (0, 25, 320, 50)]; [Myview setback color: [UIColor greenColor]]; [Mycell.contentView addSubview: myview]; Mycell.imageView.image = [UIImage imageNamed: @ "Placeholder Page"]; Mycell.textLabel.text = @ "Song Title"; UIFont * myFont = [UIFont fontWithName: @ "Apple SD Gothic Neo-Bold" Size: 12.0]; [Mycell.textLabel setTextColor: [UIColor colorWithRed: 0.839 green: 0.271 blue: 0.255 alpha: 1]]; Mycell.textLabel.font = myFont; Return mycel; }
PS View the scenes that I want to add, which will contain buttons. Cheers !!!
This option would require for your UITableViewDelegate
and UITableViewDataSource < / Code> is the same object, which is usually the case.
UITableViewDelegate
and tableView: didSelectRowAtIndexPath:
, you can by an array of management selected indexPath values, and then tableView in> call [tableView reloadRowsAtIndexPaths: @ [indexPath] withRowAnimation: UITableViewRowAnimationNone]]
to the line that just was deselected selected / right UITableViewDelegate
is the list of managed selected indexPath by law, and show the appropriate action to hide / additional materials
Comments
Post a Comment