小编Sam*_*Sam的帖子

iPhone UITableView部分

我一直在编写一个UITableView,每个单元格都会推出一个新的视图,我只想添加两个新的部分,一个是男性,一个是女性,第一个和第二个声音需要在男性部分,第三个声音需要在女性部分.

#import "FirstLevelViewController.h"
#import "SecondLevelViewController.h"
#import "DisclosureDetailController.h"
#import "SecondVoiceController.h"
#import "ThirdVoiceController.h"



@implementation FirstLevelViewController
@synthesize controllers;

-(void)viewDidLoad {
    self.title = @"Voices";

    NSMutableArray *male = [[NSMutableArray alloc] init];


    DisclosureDetailController *th = [DisclosureDetailController alloc];
    th.title = @"First Voice";
    [male addObject:th];
    [th release];

    SecondVoiceController *array2 = [SecondVoiceController alloc];
    array2.title = @"Second Voice";
    [male addObject:array2];
    [array2 release];

    ThirdVoiceController *array3 = [ThirdVoiceController alloc];
    array3.title = @"Third Voice";
    [male addObject:array3];
    [array3 release];




    self.controllers = male;
    [male release];
    [super viewDidLoad];
}

-(void)viewDidUnload {

    self.controllers = nil;
    [super viewDidUnload]; …
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch objective-c uitableview

8
推荐指数
1
解决办法
3万
查看次数

标签 统计

cocoa-touch ×1

iphone ×1

objective-c ×1

uitableview ×1