0

I have a UIView, for which I implemented the init method. This works for me because I always initialize my UIViews with the simple code below.

MYView *view = [[MYView alloc] init];
[self.view addSubview:view];
[view setFrame:CGRectMake(0,0,99,99)];

QUESTION: Can this view be used with storyboards? or do I need to implement other "init" methods? Also, what happens if someone instantiates the view with initWithFrame? Do I need to implement all the "init" methods to handle all these cases?

4

1 に答える 1

2

ストーリーボードと XIB ファイルはinitWithCoder:メソッドを使用します。

于 2013-02-18T02:26:42.720 に答える