我已经看到了如何创建自己的自定义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]];