Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios treturn UIApplicationMain(argc、argv、nil、NSStringFromClass([AppDelegate类])@JohnnyCox有事故记录吗?更新的问题我把它换成了GDB,它仍然做同样的事情。至于我的崩溃日志,那是它崩_Ios_Uitableview_Ios6_Tableview - Fatal编程技术网

Ios treturn UIApplicationMain(argc、argv、nil、NSStringFromClass([AppDelegate类])@JohnnyCox有事故记录吗?更新的问题我把它换成了GDB,它仍然做同样的事情。至于我的崩溃日志,那是它崩

Ios treturn UIApplicationMain(argc、argv、nil、NSStringFromClass([AppDelegate类])@JohnnyCox有事故记录吗?更新的问题我把它换成了GDB,它仍然做同样的事情。至于我的崩溃日志,那是它崩,ios,uitableview,ios6,tableview,Ios,Uitableview,Ios6,Tableview,treturn UIApplicationMain(argc、argv、nil、NSStringFromClass([AppDelegate类])@JohnnyCox有事故记录吗?更新的问题我把它换成了GDB,它仍然做同样的事情。至于我的崩溃日志,那是它崩溃时弹出的所有内容。还有别的地方可以看吗?@JohnnyCox你能不能在屏幕上拍照,然后用你的问题更新一下。。。只是确认一下?另外,我有另一个更新的应答器没有足够的崩溃日志。需要更多的细节。或者至少是它在代码方面崩溃的原因-是SEGV(分段错误


treturn UIApplicationMain(argc、argv、nil、NSStringFromClass([AppDelegate类])@JohnnyCox有事故记录吗?更新的问题我把它换成了GDB,它仍然做同样的事情。至于我的崩溃日志,那是它崩溃时弹出的所有内容。还有别的地方可以看吗?@JohnnyCox你能不能在屏幕上拍照,然后用你的问题更新一下。。。只是确认一下?另外,我有另一个更新的应答器没有足够的崩溃日志。需要更多的细节。或者至少是它在代码方面崩溃的原因-是SEGV(分段错误)还是异常?在
prepareforsgue
中,您试图设置名为
name1
的控件的文本属性。您无法访问
destinationViewController
中的控件,因为它的视图尚未创建。您必须向目标控制器添加一个
NSString
属性,然后在
prepareforsgue
中进行设置,然后,目标控制器的
viewDidLoad
可以将
name1
控件的
text
属性设置为存储在
NSString
属性中的值,该属性是在
prepareforsgue
中设置的。没有足够的崩溃日志。需要更多的细节。或者至少是它在代码方面崩溃的原因-是SEGV(分段错误)还是异常?在
prepareforsgue
中,您试图设置名为
name1
的控件的文本属性。您无法访问
destinationViewController
中的控件,因为它的视图尚未创建。您必须向目标控制器添加一个
NSString
属性,然后在
prepareforsgue
中进行设置,然后,目标控制器的
viewDidLoad
可以将
name1
控件的
text
属性设置为存储在
NSString
属性中的值,该属性是在
prepareforsgue
中设置的。
arg c = (int) 1
arg v = (char **) 0x2fd63cdc
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<DetailViewController 0x1e098bd0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key name.'
*** First throw call stack:
(0x3a1e63e7 0x39072963 0x3a1e60d5 0x3a418fe9 0x3a414d53 0x3a16c8a5 0x39665d7d 0x396655ff 0x3955e039 0x394e8421 0x3953d1b7 0x3953d0fd 0x3953cfe1 0x3953cf0d 0x3953c659 0x3953c541 0x3952ab33 0x3952a7d3 0x3958b2ad 0x3960dca1 0x3a4b9e67 0x3a1bb857 0x3a1bb503 0x3a1ba177 0x3a12d23d 0x3a12d0c9 0x3746633b 0x3951d291 0x69a9 0x3a91eb20)
libc++abi.dylib: terminate called throwing an exception
#import "RootViewController.h"
#import "DetailViewController.h"



@implementation RootViewController

- (id)initWithStyle:(UITableViewStyle)style
{
    self = [super initWithStyle:style];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];

    //Initialize the array.
    listOfItems = [[NSMutableArray alloc] init];

    //Add items
    [listOfItems addObject:@"Jane"];
    [listOfItems addObject:@"Johnny"];
    [listOfItems addObject:@"Deanne"];
    [listOfItems addObject:@"John"];
    [listOfItems addObject:@"Susan"];

    //Set the title
    self.navigationItem.title = @"Countries";
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    // Return the number of sections.
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [listOfItems count];
}

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

    static NSString *CellIdentifier = @"MyCell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }

    // Set up the cell...
    NSString *cellValue = [listOfItems objectAtIndex:indexPath.row];
    cell.textLabel.text = cellValue;


    return cell;
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    DetailViewController *DVC = [[DetailViewController alloc]init];
    DVC = [segue destinationViewController];
    NSIndexPath *path = [self.tableView indexPathForSelectedRow];
    NSString *name = [listOfItems objectAtIndex:path.row];
    DVC.name1.text = name;
}
#import <UIKit/UIKit.h>

@interface RootViewController : UITableViewController <UITableViewDataSource,UITableViewDelegate> {

    NSMutableArray *listOfItems;
    IBOutlet NSMutableArray *detailListOfItems;
}
@end
#import "DetailViewController.h"



@implementation DetailViewController
@synthesize selectedCountry;
@synthesize name1;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}


- (void)viewDidLoad
{
    [super viewDidLoad];


    //Set the title of the navigation bar
    //self.navigationItem.title = name1.text;

}
#import <UIKit/UIKit.h>

@interface DetailViewController : UIViewController


@property (nonatomic,strong) IBOutlet UILabel *name1;
@property (nonatomic, retain) NSString *selectedCountry;
@end