以下の内容はhttps://anton0825.hatenablog.com/entry/20120621/1341389606より取得しました。


UIViewController初期化で不具合

以下のようなコードを書いたらViewとControllerの参照関係がおかしくなった。

- (void)viewDidLoad {
    [super viewDidLoad];
    if (self.delegate){
        self.currerntViewController = [[ChartGridViewController alloc] initWithView:self.chartGridView];
        self.switchViewController = [[ChartGridViewController alloc] initWithView:self.chartGridView];
    }
}

initWithViewで同じViewインスタンスを渡してるから、二つのControllerが同じViewを参照してしまっている。これに気付かずかなり困った。。




以上の内容はhttps://anton0825.hatenablog.com/entry/20120621/1341389606より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14