简体   繁体   中英

How do i get this ios button to stay visible in the feed view after pushing to another view?

How do i get this ios button to stay visible in the feed view after pushing to the profile view?
When i return to the feed (by the tabbed bar button), the original 'to profile' button is no longer visible in the feed view. This continues on each button i press, so the buttons all endup not visible (but still selectable, and visible shortly when clicked before preceding to view).

iPhone视图

You need to maintain an array of feed indexes that are already selected in a singleton class.

NSMutableArray *selectedIndexes = [[NSMutableArray alloc]init];

Whenever you select a feed , you need to add the feed index to this array.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [selectedIndexes addObject:INDEX];
}

In your

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

you need to check whether this index included in the array. If it contains in the array, you need to hidden the button.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM