PlistReader *pList = [[PlistReader alloc] init];
[pList initWithFileName:@"CountryDetails"];
CountryClass *objcountry =(CountryClass*) [pList getCountryInfoById:countryId];
CCSprite *flag = [CCSprite spriteWithFile:objcountry.ImageUrl];
flag.position = ccp(200, 265);
flag.scale = .255;
NSString *tempdata = objcountry.ShortDetail;//error line sigabrt
TextViewTopFlagData = [[UITextView alloc]init];
TextViewTopFlagData.text = [NSString stringWithFormat:@"this is pakistan"];//countryInfo.ShortDetail;
TextViewTopFlagData.frame = CGRectMake(260,17, 105, 75);
TextViewTopFlagData.backgroundColor = [UIColor clearColor];
[TextViewTopFlagData setEditable:NO];
Привет, я получаю ошибку sigabrt на линии, о которой я упоминаю, что objcountry.ShortDetail также является типом NSString, так почему он получает ошибку, sigabrt может помочь любому
когда я помещаю NSString * tempdata = objcountry.ShortDetail; // строка ошибки sigabrt перед строкой спрайта, она не выдает ошибки, но когда я возвращаю ее после строки спрайта, она снова получает эту ошибку, поэтому любой может объяснить мне, что
вот структура кантри-класса
// CountryClass.h
//
// CountryClass.h
// NationalAntemsAndFlags
//
// Created by mac on 12/17/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CountryClass : NSObject
{
NSString *Name ;
NSString *ImageUrl;
NSString *AnthemUrl;
NSString *ShortDetail;
NSString *completeDetails;
int LocationX ;
int LocationY ;
}
@property (nonatomic,retain) IBOutlet NSString *Name;
@property (nonatomic,retain) IBOutlet NSString *ImageUrl;
@property (nonatomic,retain) IBOutlet NSString *AnthemUrl;
@property (nonatomic,retain) IBOutlet NSString *ShortDetail;
@property (nonatomic,retain) IBOutlet NSString *completeDetails;
@property (nonatomic) IBOutlet int LocationY;
@property (nonatomic) IBOutlet int LocationX;
@end
// countryClass.m
//
// CountryClass.m
// NationalAntemsAndFlags
//
// Created by mac on 12/17/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "CountryClass.h"
@implementation CountryClass
@synthesize Name,ImageUrl,AnthemUrl,ShortDetail,completeDetails,LocationX,LocationY;
@end
это структура countryClass, и я пытался [сохранить страну], но ничего не произошло