0

これを調べるのに何時間も費やしましたが、まだ解決策が見つかりません。これは、ユーザーが経験したことに関するグラフです。

  • ユーザーは写真を撮るか、カメラロールから写真を撮ります
  • いずれかを取る (または選択する) とすぐに、captionView が閉じます。
  • captionView が閉じるとすぐに、別のビューからの startUploads が開始されます
  • ユーザーが startUploads が入っているビューを開くことにした場合、アップロードされたものを見ることができます

プロセスについて少し知ったので、いくつか問題があります。アップロードが終了したら、フェードアウトさせたいです。私はそれを行う方法を知っていますが、何らかの理由で呼び出すと、self.theTableViewnull が返されます。@property (nonatomic, retain)....h に aが@sythesize theTableView;あり、.m に a があります。

別の質問で、 を実行するときにstartUploads、ここで NSMutableArray を開始する必要があることがわかりました (したがって、UItableView でも同じことができると思いました)。ここに私が持っているものがあります:

- (id)initWithNibNamed:(NSString *)nibName bundle:(NSBundle *)bundle {
self = [super initWithNibNamed:nibName bundle:bundle];
if (self) {
    processList = [[NSMutableArray alloc] init];
    self.theTableView = [[UITableView alloc] init];
    NSLog(@"thetableview: %@", theTableView);
}
return self;
}

がどのように呼び出されるかを確認したい場合に備えてstartUploads、コードは次のとおりです。

processViewController *testtest = [[processViewController alloc] initWithNibName:@"processView.xib" bundle:nil];
//testtest.processList = [[NSMutableArray alloc] initWithNig];
NSLog(@"Different:displayProcessVC BEFORE STARTING UPLOAD, processList = %@", testtest.processList);
NSLog(@"Different:displayProcessVC BEFORE STARTING UPLOAD, theTableView = %@", testtest.theTableView);
[testtest startUploads];
NSLog(@"Different:displayProcessVC AFTER STARTING UPLOAD, processList = %@", testtest.processList);
NSLog(@"Different:displayProcessVC AFTER STARTING UPLOAD, theTableView = %@", testtest.theTableView);
[testtest release];

ただし(null)、コンソールにはまだ表示されます。

助けてください!
コールトン

編集1:

これがnilになっている場所です:

- (void)deleteOneRow: (NSString *)theString {
int theInt = [processList indexOfObject:theString];
[processList removeObjectAtIndex:theInt];
NSArray *deleteIndexPaths = [[NSArray alloc] initWithObjects: [NSIndexPath indexPathForRow:theInt inSection:0], nil];
NSLog(@"theTableView: %@", self.theTableView);
[self.theTableView beginUpdates];
[self.theTableView deleteRowsAtIndexPaths:deleteIndexPaths withRowAnimation:UITableViewRowAnimationFade];
[self.theTableView endUpdates];
}
4

1 に答える 1

0

UITableView の指定された初期化子は-initWithFrame:style:あり、リークしています。-viewDidLoad代わりにこれを試してください。

self.theTableView = [[[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStylePlain] autorelease];

于 2011-04-11T00:49:39.823 に答える