Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use pushViewController and popViewController
    primarykey
    data
    text
    <p>I want to A viewcontroller switch another B viewcontroller,First time,I push(press GuestBook Button)and TableView get information ok,and press back Button ok, push(press GuestBook Button) again,JSON data <code>NSLog</code> have message,but tableview data not appear! what's happen?</p> <p>PS:i use storyboard!Have a custom cell xib!</p> <p>A.m</p> <pre><code>- (IBAction)toHostGuestBook:(id)sender { hgbvc = [self.storyboard instantiateViewControllerWithIdentifier:@"ToHostGuestBookSegue"]; hgbvc.eventidStr = eventidStr; NSLog(@"hgbvc.eventidStr:%@",hgbvc.eventidStr); [self.navigationController pushViewController:hgbvc animated:YES]; } </code></pre> <p>B.m</p> <pre><code>- (IBAction)backToHostMainEventDetail:(id)sender { [self.navigationController popViewControllerAnimated:YES]; } </code></pre> <p>B.m</p> <pre><code>// Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *GuestBookCellIdentifier = @"GuestBookCellIdentifier"; static BOOL nibsRegistered = NO; if (!nibsRegistered) { UINib *nib = [UINib nibWithNibName:@"GuestBookCell" bundle:nil]; [tableView registerNib:nib forCellReuseIdentifier:GuestBookCellIdentifier]; nibsRegistered = YES; } gbcell = [tableView dequeueReusableCellWithIdentifier:GuestBookCellIdentifier]; if (gbcell == nil) { gbcell = [[GuestBookCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:GuestBookCellIdentifier]; } NSDictionary *dict = [messageRows objectAtIndex: indexPath.row]; gbcell.nicknameStr = [dict objectForKey:@"vusr"]; gbcell.dateStr = [dict objectForKey:@"date"]; gbcell.messageStr = [dict objectForKey:@"message"]; return gbcell; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload