Tôi có thông báo lỗi sau trong bảng điều khiển khi sử dụng NSThread "Đã cố gắng lấy khóa web từ một chủ đề khác với chuỗi chính hoặc chuỗi web. Đây có thể là kết quả của việc gọi đến UIKit từ chuỗi thứ cấp. .."cách giải quyết lỗi khi sử dụng chuỗi?
tôi có nộp mẫu mã của tôi ở đây
- (void)viewDidLoad {
appDeleg = (NewAshley_MedisonAppDelegate *)[[UIApplication sharedApplication] delegate];
[[self tblView1] setRowHeight:80.0];
[super viewDidLoad];
self.title = @"Under Ground";
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
[NSThread detachNewThreadSelector:@selector(CallParser) toTarget:self withObject:nil];
}
-(void)CallParser {
Parsing *parsing = [[Parsing alloc] init];
[parsing DownloadAndParseUnderground];
[parsing release];
[self Update_View];
//[myIndicator stopAnimating];
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}
here "DownloadAndParseUnderground" là phương pháp downloding dữ liệu từ feed rss và
-(void) Update_View{
[self.tblView1 reloadData];
}
wh phương pháp en Update_View được gọi là tableView tải lại dữ liệu và trong cellForRowAtIndexPath tạo lỗi và không hiển thị tùy chỉnh tế bào
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
CustomTableviewCell *cell = (CustomTableviewCell *) [tblView1 dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"customCell"
owner:self
options:nil];
cell = objCustCell;
objCustCell = nil;
}
Cả hai câu trả lời đã được downvoted, tại sao? – BoltClock
Đọc câu trả lời, đó là vì cả hai đều sai (hoặc không thể đọc được - điều gì đang xảy ra với 'u trên tất cả ??!?). – bbum