我为我讲解电话在几个窗户重复使用,制作了图形部分。 例如:带有物体描述的盒子。
Which is the best way to make it? Is it with a UIVIewController
?.
@interface DescriptionBox : UIViewController
{
...
}
然后,我把它放在一个窗口上:
@implementation WindowOne
- (void)loadView {
...
DescriptionBox *component = [[DescriptionBox alloc] initWithFrame:CGRectMake(100, 100, 50, 50)];
[[self view] addSubview:[component view]];
}
其他:
@implementation WindowTwo
- (void)loadView {
...
DescriptionBox *component = [[DescriptionBox alloc] initWithFrame:CGRectMake(100, 100, 50, 50)];
[[self view] addSubview:[component view]];
}