UIViewController自定义init方法不显示

时间:2014-04-03 02:56:52

标签: ios uiviewcontroller

我已经看到了如何创建自己的自定义init方法,我有一个看起来像这样的

- (id)initWithArray:(NSArray *)array
{
    if ((self = [super init])) {
        currentArray = array;
        NSLog(@"%@", currentArray);
    }

    return self;
}

然而,当我尝试调用它时,我永远看不到 initWithArray 这就是我称之为的方式。

if (![pictureViewController.view superview]) {
    pictureViewController= [[PictureViewController alloc] init];
    pictureViewController.stackRotationController = stackRotationController;
    [pictureViewController ini = pluginsMutableArray]; // cannot see initWithArray
    [pictureViewController.view setBackgroundColor:[UIColor whiteColor]];
    pictureViewController.view.frame = CGRectMake(0.0, ScreenHeight, ScreenWidth, ScreenHeight);
    pictureViewController.prefToolBar.frame = CGRectMake(0.0, 0.0, ScreenWidth, 45.0);
    [pictureViewController.view addSubview:pictureViewController.prefToolBar];
    [[UIToolbar appeara}nce] setBarTintColor:[UIColor colorWithRed:colorController.oRed/255.0 green:colorController.oGreen/255.0 blue:colorController.oBlue/255.0 alpha:1.0]];

0 个答案:

没有答案