应用程序崩溃,错误代码

时间:2014-06-13 16:46:51

标签: ios xcode debugging uitableview int

当我点击带有SIGNAL1:SIGABRT的UITableViewCell时,我的应用程序崩溃了。 这是我的错误代码:

2014-06-13 18:25:28.232 MyClothezz[1266:239793] Unknown class KategorienTableViewDetailControllerViewController in Interface Builder file.
2014-06-13 18:25:57.461 MyClothezz[1266:239793] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x125d524f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key gewaehlteKategorie.'
*** First throw call stack:
(0x187375dc4 0x1968701e8 0x187375a48 0x18818e818 0x1872a473c 0x18bc11ac4 0x18bb26cbc 0x18b81492c 0x18b814898 0x18b9b4b8c 0x18b8c7ba8 0x18b8c7974 0x18b8c78f4 0x18b81190c 0x18b191b5c 0x18b18c758 0x18b18c5fc 0x18b18bdfc 0x18b18bb80 0x18b18570c 0x18732fd60 0x18732ccec 0x18732d0cc 0x187259444 0x18fccb7e4 0x18b8799c8 0x1000d5b18 0x196ee2a08)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

那是什么意思?我做错了什么?我需要改变什么? 我会附上一切,但如果你需要更多细节,请问! 非常感谢你!

这是我的RootViewController .h文件:

#import <UIKit/UIKit.h>
#import <iAd/iAd.h>


@interface KategorienTableViewController : UITableViewController <UISearchBarDelegate, UIAlertViewDelegate>
@property (strong, nonatomic) IBOutlet UISearchBar *searchBar;
@property (nonatomic, strong) NSMutableArray *category;
@property (nonatomic, strong) NSMutableArray *results;

@end

这是我的RootViewController .m文件:

#import "KategorienTableViewController.h"
#import "KategorienDetailTableViewController.h"
#import "KategorienInfoViewController.h"

@interface KategorienTableViewController ()


@end

@implementation KategorienTableViewController
@synthesize category;

-(NSMutableArray *)category
{
if (!category)

{
    category = [[NSMutableArray alloc]init];
}
return category;
}

-(NSMutableArray *)results
{
if (!_results)
{
    _results = [[NSMutableArray alloc]init];
}
return _results;
}

- (void)viewDidLoad
{
[super viewDidLoad];
[self.category addObject:@"Accessories" ];
[self.category addObject:@"Blouses"];
[self.category addObject:@"Bras"];
[self.category addObject:@"Caps"];
[self.category addObject:@"Cardigans & Sweaters"];
[self.category addObject:@"Dresses"];
[self.category addObject:@"Hot-Pants"];
[self.category addObject:@"Jackets & Coats"];
[self.category addObject:@"Jackettes"];
[self.category addObject:@"Jeans & Pants"];
[self.category addObject:@"Leggins"];
[self.category addObject:@"Longsleeves"];
[self.category addObject:@"Shirts"];
[self.category addObject:@"Shoes"];
[self.category addObject:@"Shorts"];
[self.category addObject:@"Skirts"];
[self.category addObject:@"Suits"];
[self.category addObject:@"Swimwear"];
[self.category addObject:@"Tights"];
[self.category addObject:@"Tops"];
[self.category addObject:@"T-Shirts"];
[self.category addObject:@"Underwear"];

// Uncomment the following line to preserve selection between presentations.
self.clearsSelectionOnViewWillAppear = NO;

// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
self.navigationItem.leftBarButtonItem = self.editButtonItem;


UIBarButtonItem *addButton =[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject)];
self.navigationItem.rightBarButtonItem = addButton;



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

-(void)searchThroughData
{
self.results = nil;

NSPredicate *resultsPredicate = [NSPredicate predicateWithFormat:@"SELF contains [search] %@", self.searchBar.text];
self.results = [[self.category filteredArrayUsingPredicate:resultsPredicate] mutableCopy];
}

-(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
{
[self searchThroughData];
}


- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

// Return the number of sections.
return 1;
}



- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
if (tableView == self.tableView)
{
    return self.category.count;
}
else
{
    [self searchThroughData];
    return self.results.count;
}

}
-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
// Push new View controller here
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
KategorienTableViewController *viewController = (KategorienTableViewController *)[storyboard instantiateViewControllerWithIdentifier:@"Detail"];
[self.navigationController pushViewController:viewController animated:YES];

}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];



[cell setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton];

if (!cell)
{
    cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}

if (tableView == self.tableView)
{
    cell.textLabel.text = self.category [indexPath.row];
}
else
{
    cell.textLabel.text = self.results [indexPath.row];
}

// Configure the cell...

    return cell;

}


// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath

{
// Return NO if you do not want the specified item to be editable.
return YES;
[tableView reloadData];


}




// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete)
{
    // Delete the row from the data source
    [self.category removeObjectAtIndex:indexPath.row];
    [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
    [tableView reloadData];
}


else if (editingStyle == UITableViewCellEditingStyleInsert)
{
    // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    [tableView reloadData];

}

}

- (void)insertNewObject
{
// Display the UIAlertView
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:NSLocalizedString(@"new category",nil) message:NSLocalizedString(@"enter new category",nil) delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) otherButtonTitles:NSLocalizedString(@"Done", nil) ,nil];

alert.alertViewStyle = UIAlertViewStylePlainTextInput;
[alert show];
}



// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
NSObject* objectToMove = [self.category objectAtIndex:fromIndexPath.row];
[self.category removeObjectAtIndex:fromIndexPath.row];
[self.category insertObject:objectToMove atIndex:toIndexPath.row];
}

// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the item to be re-orderable.
return YES;
[self.tableView reloadData];


}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (self.searchDisplayController.isActive)
{
    [self performSegueWithIdentifier:@"DetailView" sender:self];
}


    KategorienDetailTableViewController *categories = [[KategorienDetailTableViewController alloc]init];

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Accessories"])
        categories.gewaehltInt = 0;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Blouses"])
        categories.gewaehltInt = 1;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Bras"])
        categories.gewaehltInt = 2;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Caps"])
        categories.gewaehltInt = 3;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Cardigans & Sweaters"])
        categories.gewaehltInt = 4;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Dresses"])
        categories.gewaehltInt = 5;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Hot-Pants"])
        categories.gewaehltInt = 6;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Jackets & Coats"])
        categories.gewaehltInt = 7;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Jackettes"])
        categories.gewaehltInt = 8;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Jeans & Pants"])
        categories.gewaehltInt = 9;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Leggins"])
        categories.gewaehltInt = 10;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Longsleeves"])
        categories.gewaehltInt = 11;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Shirts"])
        categories.gewaehltInt = 12;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Shoes"])
        categories.gewaehltInt = 13;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Shorts"])
        categories.gewaehltInt = 14;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Skirts"])
        categories.gewaehltInt = 15;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Suits"])
        categories.gewaehltInt = 16;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Swimwear"])
        categories.gewaehltInt = 17;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Tights"])
        categories.gewaehltInt = 18;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Tops"])
        categories.gewaehltInt = 19;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"T-Shirts"])
        categories.gewaehltInt = 20;

    if ([[self.category objectAtIndex:indexPath.row] isEqual:@"Underwear"])
        categories.gewaehltInt = 21;



    //[categories setTitle:[self.category objectAtIndex:indexPath.row]];
    //[self.navigationController pushViewController:categories animated:YES];



   // [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

#pragma mark - Navigation
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if([segue.identifier isEqualToString:@"DetailView"])
{
    KategorienDetailTableViewController *controller = (KategorienDetailTableViewController *)segue.destinationViewController;
    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Accessories"])
        controller.gewaehltInt = 0;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Blouses"])
        controller.gewaehltInt = 1;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Bras"])
        controller.gewaehltInt = 2;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Caps"])
        controller.gewaehltInt = 3;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Cardigans & Sweaters"])
        controller.gewaehltInt = 4;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Dresses"])
        controller.gewaehltInt = 5;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Hot-Pants"])
        controller.gewaehltInt = 6;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Jackets & Coats"])
        controller.gewaehltInt = 7;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Jackettes"])
        controller.gewaehltInt = 8;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Jeans & Pants"])
        controller.gewaehltInt = 9;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Leggins"])
        controller.gewaehltInt = 10;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Longsleeves"])
        controller.gewaehltInt = 11;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Shirts"])
        controller.gewaehltInt = 12;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Shoes"])
        controller.gewaehltInt = 13;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Shorts"])
        controller.gewaehltInt = 14;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Skirts"])
        controller.gewaehltInt = 15;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Suits"])
        controller.gewaehltInt = 16;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Swimwear"])
        controller.gewaehltInt = 17;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Tights"])
        controller.gewaehltInt = 18;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Tops"])
        controller.gewaehltInt = 19;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"T-Shirts"])
        controller.gewaehltInt = 20;

    if ([[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row] isEqual:@"Underwear"])
        controller.gewaehltInt = 21;
    [controller setTitle:[self.category objectAtIndex:[self.tableView indexPathForSelectedRow].row]];
}
}


#pragma mark - UIAlertView Delegate Methods

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
//Only do the following actions if user hit the Fertig Button
if (buttonIndex == 1)
{
    NSString *tmpTextField = [alertView textFieldAtIndex:0].text;

    if (!category)
    {
        category = [[NSMutableArray alloc]init];
    }

    [category insertObject:tmpTextField atIndex:0];

    NSIndexPath *indexPath1 = [NSIndexPath indexPathForRow:0 inSection:0];

    [self.tableView insertRowsAtIndexPaths:@[indexPath1] withRowAnimation:UITableViewRowAnimationFade];
}
}

#pragma mark iAd Delegate Methods

-(void)bannerViewDidLoadAd:(ADBannerView *)banner
{

[UIView beginAnimations:nil context:nil];

[UIView setAnimationDuration:0];

[banner setAlpha:1];

[UIView commitAnimations];

}

-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{

[UIView beginAnimations:nil context:nil];

[UIView setAnimationDuration:1];

[banner setAlpha:0];

[UIView commitAnimations];

}




@end

这是我的DetailViewController .h文件:

#import <UIKit/UIKit.h>
#import "KategorienTableViewController.h"

@interface KategorienDetailTableViewController : UITableViewController
{
NSMutableArray *accessoriesArray;
NSMutableArray *blousesArray;
NSMutableArray *brasArray;
NSMutableArray *capsArray;
NSMutableArray *cardigansandsweatersArray;
NSMutableArray *dressesArray;
NSMutableArray *hotpantsArray;
NSMutableArray *jacketsandcoatsArray;
NSMutableArray *jackettesArray;
NSMutableArray *jeansandpantsArray;
NSMutableArray *legginsArray;
NSMutableArray *longsleevesArray;
NSMutableArray *shirtsArray;
NSMutableArray *shoesArray;
NSMutableArray *shortsArray;
NSMutableArray *skirtsArray;
NSMutableArray *suitsArray;
NSMutableArray *swimwearArray;
NSMutableArray *tightsArray;
NSMutableArray *topsArray;
NSMutableArray *tshirtsArray;
NSMutableArray *underwearArray;
}
@property int gewaehltInt;
@property KategorienTableViewController *categories;
@end

最后,我的DetailViewController .m文件:

#import "KategorienDetailTableViewController.h"

@interface KategorienDetailTableViewController ()

@end

@implementation KategorienDetailTableViewController
@synthesize gewaehltInt;
@synthesize categories;


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

- (void)viewDidLoad
{
[super viewDidLoad];
accessoriesArray = [[NSMutableArray alloc]initWithObjects:@"accessories1",@"accessories2",@"accessories3",@"accessories4", nil];
blousesArray = [[NSMutableArray alloc]initWithObjects:@"blouses1",@"blouses2",@"blouses3",@"blouses4", nil];
brasArray= [[NSMutableArray alloc]initWithObjects:@"bras1",@"bras2",@"bras3",@"bras4", nil];;
capsArray= [[NSMutableArray alloc]initWithObjects:@"Endkontrdolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
cardigansandsweatersArray= [[NSMutableArray alloc]initWithObjects:@"Endkontarolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
dressesArray= [[NSMutableArray alloc]initWithObjects:@"Endkontrocsdclle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
hotpantsArray= [[NSMutableArray alloc]initWithObjects:@"Endkonsdv<trolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
jacketsandcoatsArray= [[NSMutableArray alloc]initWithObjects:@"En<vrdkontrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
jackettesArray= [[NSMutableArray alloc]initWithObjects:@"Endkont<rvwrwrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
jeansandpantsArray= [[NSMutableArray alloc]initWithObjects:@"Endgi kontrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
legginsArray= [[NSMutableArray alloc]initWithObjects:@"Endkontra 4tolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
longsleevesArray= [[NSMutableArray alloc]initWithObjects:@"Endkoj zrntrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
shirtsArray= [[NSMutableArray alloc]initWithObjects:@"Endkontr< wolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
shoesArray= [[NSMutableArray alloc]initWithObjects:@"Endkontr jdrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
shortsArray= [[NSMutableArray alloc]initWithObjects:@"Endkon fe<trolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
skirtsArray= [[NSMutableArray alloc]initWithObjects:@"Endkonj rtrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
suitsArray= [[NSMutableArray alloc]initWithObjects:@"Endkon wgetrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
swimwearArray= [[NSMutableArray alloc]initWithObjects:@"Endk djontrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
tightsArray= [[NSMutableArray alloc]initWithObjects:@"Endkoune56ntrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
topsArray= [[NSMutableArray alloc]initWithObjects:@"Endkon4 wtatrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
tshirtsArray= [[NSMutableArray alloc]initWithObjects:@"Endk 6ontrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;
underwearArray= [[NSMutableArray alloc]initWithObjects:@"Ena 53zdkontrolle",@"Versand",@"Verpackung",@"Foto's des Produktes", nil];;

// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;

// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (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
{

if (self.gewaehltInt == 0)
{
    return [accessoriesArray count];
}
if (self.gewaehltInt == 1)
{
    return [blousesArray count];
}
if (self.gewaehltInt == 2)
{
    return [brasArray count];
}
if (self.gewaehltInt == 3)
{
    return [capsArray count];
}
if (self.gewaehltInt == 4)
{
    return [cardigansandsweatersArray count];
}
if (self.gewaehltInt == 5)
{
    return [dressesArray count];
}
if (self.gewaehltInt == 6)
{
    return [hotpantsArray count];
}
if (self.gewaehltInt == 7)
{
    return [jacketsandcoatsArray count];
}
if (self.gewaehltInt == 8)
{
    return [jackettesArray count];
}
if (self.gewaehltInt == 9)
{
    return [jeansandpantsArray count];
}
if (self.gewaehltInt == 10)
{
    return [legginsArray count];
}
if (self.gewaehltInt == 11)
{
    return [longsleevesArray count];
}
if (self.gewaehltInt == 12)
{
    return [shirtsArray count];
}
if (self.gewaehltInt == 13)
{
    return [shoesArray count];
}
if (self.gewaehltInt == 14)
{
    return [shortsArray count];
}
if (self.gewaehltInt == 15)
{
    return [skirtsArray count];
}
if (self.gewaehltInt == 16)
{
    return [suitsArray count];
}
if (self.gewaehltInt == 17)
{
    return [swimwearArray count];
}
if (self.gewaehltInt == 18)
{
    return [tightsArray count];
}
if (self.gewaehltInt == 19)
{
    return [topsArray count];
}
if (self.gewaehltInt == 20)
{
    return [tshirtsArray count];
}
if (self.gewaehltInt == 21)
{
    return [underwearArray count];
}

else
{
    return 1;
}
[self.tableView reloadData];

}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier1 = @"DetailCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1 forIndexPath:indexPath];
if (cell == nil){
    cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1];
}

// Configure the cell...
if (self.gewaehltInt == 0) cell.textLabel.text = [accessoriesArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 1) cell.textLabel.text = [blousesArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 2) cell.textLabel.text = [brasArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 3) cell.textLabel.text = [capsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 4) cell.textLabel.text = [cardigansandsweatersArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 5) cell.textLabel.text = [dressesArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 6) cell.textLabel.text = [hotpantsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 7) cell.textLabel.text = [jacketsandcoatsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 8) cell.textLabel.text = [jackettesArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 9) cell.textLabel.text = [jeansandpantsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 10) cell.textLabel.text = [legginsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 11) cell.textLabel.text = [longsleevesArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 12) cell.textLabel.text = [shirtsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 13) cell.textLabel.text = [shoesArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 14) cell.textLabel.text = [shortsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 15) cell.textLabel.text = [skirtsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 16) cell.textLabel.text = [suitsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 17) cell.textLabel.text = [swimwearArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 18) cell.textLabel.text = [tightsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 19) cell.textLabel.text = [topsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 20) cell.textLabel.text = [tshirtsArray objectAtIndex:indexPath.row];
if (self.gewaehltInt == 21) cell.textLabel.text = [underwearArray objectAtIndex:indexPath.row];


return cell;
}
@end

2 个答案:

答案 0 :(得分:0)

转到项目导航器中项目的storyboard文件,找到其视图控制器Custom Class设置为“KategorienTableViewDetailControllerViewController”的Scene。将其更改为“KategorienDetailTableViewController”,如果这是您要分配的类。

我假设您将KategorienTableViewDetailControllerViewController重命名为KategorienDetailTableViewController,但更改未在故事板分配中生效。

答案 1 :(得分:0)

转到Storyboard,选择ViewController,然后在右侧窗格中,单击Attributes Inspector Box中的右箭头,在最右侧单击右箭头,当它悬停在它上面时显示Connections Inspectorr。 / p>

然后您将看到所有链接的对象,尝试删除您认为已删除的对象。

如果这不起作用,请检查ViewController中的dealloc方法,有时会在那里释放对象。