0

iOSでは、基本的に次のように画像を表示したい:

テーブルに 2 つの列が必要です。最初の列の画像は固定されており、2 番目の列では、画像をスクロールするために行に水平スクロールが必要です。画像を選択すると、別のビューに移動する必要があります。

4

2 に答える 2

0

このチュートリアルなどに従う必要があります。

最初の画像を修正する方法の詳細については、本を読んでゼロから始めるよりも良い方法はありません。

于 2013-03-21T09:35:44.960 に答える
0
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
    }

    if(indexPath.row == 0){

        //Normar cell

    }else if(indexPath.row == 1){

        //add ScrollVeiw
    }
}

およびセルの高さ

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

    if (indexPath.row == 1) {
        //height for scrollview

    }
}

これがあなたを助けることを願っています。

ではごきげんよう !!!

于 2013-03-21T09:36:47.363 に答える